Class BrowserEvent

java.lang.Object
com.jbstrap.core.event.BaseEvent
com.jbstrap.core.event.BrowserEvent
Direct Known Subclasses:
AnimationEvent, KeyboardEvent, MouseEvent, TouchEvent, WheelEvent

public class BrowserEvent extends BaseEvent

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
  • Constructor Details

    • BrowserEvent

      public BrowserEvent()
  • Method Details

    • getIsTrusted

      public Boolean getIsTrusted()
      Determines if the event is trusted
      Returns:
      true, if it is trusted, otherwise false
    • getDetail

      public Long getDetail()

      Determines the number or mouse clicks.

      Returns:
      The number of mouse clicks
    • getType

      public String getType()
      Gets the event name
      Returns:
      The event name
    • getEventPhase

      public Long 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

      public Boolean getBubbles()
      Determines if the event can be bubbled.
      Returns:
      true, if it can be, otherwise false
    • getCancelable

      public Boolean getCancelable()
      Determines if the event can cancel its default action
      Returns:
      true, if it can, otherwise false
    • getDefaultPrevented

      public Boolean getDefaultPrevented()
      Determines if the event has previously called the defaultPrevented() method.
      Returns:
      true, if it the method was called, otherwise false
    • getComposed

      public Boolean getComposed()
      Determines if the event is composed
      Returns:
      true, if it is, otherwise false
    • getClientId

      public String getClientId()
      Gets the ID of the client on which the event occurred
      Returns:
      The ID of the client
    • fireEvent

      public void fireEvent()
      Specified by:
      fireEvent in class BaseEvent