Package com.jbstrap.core.event
Class BrowserEvent
java.lang.Object
com.jbstrap.core.event.BaseEvent
com.jbstrap.core.event.BrowserEvent
- Direct Known Subclasses:
AnimationEvent
,KeyboardEvent
,MouseEvent
,TouchEvent
,WheelEvent
Browser event
This class contains the basic event information and the browser event information. The information contained are:
- The client on which the event occurred
- The ID of the component on which the event occurred
- The event's type
- The instance of the component on which the event occurred
- The event ID
- If the event is trusted
- The number of mouse clicks
- The event phase
- If event is a bubbling event
- If the event's default action can be prevented
- Marks if the event had defaultPrevented() called.
- If the event is composed or not
- The ID of the client, on which the event occurred
- Since:
- 4.0
- Author:
- JBStrap
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Determines if the event can be bubbled.Determines if the event can cancel its default actionGets the ID of the client on which the event occurredDetermines if the event is composedDetermines if the event has previously called the defaultPrevented() method.Determines the number or mouse clicks.Gets the current event phaseDetermines if the event is trustedgetType()
Gets the event nameMethods inherited from class com.jbstrap.core.event.BaseEvent
getClient, getComponent, getEventId, getEventType, getSenderId
-
Constructor Details
-
BrowserEvent
public BrowserEvent()
-
-
Method Details
-
getIsTrusted
Determines if the event is trusted- Returns:
true
, if it is trusted, otherwisefalse
-
getDetail
Determines the number or mouse clicks.
- Returns:
- The number of mouse clicks
-
getType
Gets the event name- Returns:
- The event name
-
getEventPhase
Gets the current event phase
- Returns:
The number representing the current phase.
The possible values:
- 0 = NONE - Phase can't be defined
- 1 = CAPTURING_PHASE - The event is in the capturing phase
- 2 = AT_TARGET - The event is in the at target phase
- 3 = BUBBLING_PHASE - The event is in the bubbling phase
-
getBubbles
Determines if the event can be bubbled.- Returns:
true
, if it can be, otherwisefalse
-
getCancelable
Determines if the event can cancel its default action- Returns:
true
, if it can, otherwisefalse
-
getDefaultPrevented
Determines if the event has previously called the defaultPrevented() method.- Returns:
true
, if it the method was called, otherwisefalse
-
getComposed
Determines if the event is composed- Returns:
true
, if it is, otherwisefalse
-
getClientId
Gets the ID of the client on which the event occurred- Returns:
- The ID of the client
-
fireEvent
public void fireEvent()
-