Enum EventPhase
- java.lang.Object
-
- java.lang.Enum<EventPhase>
-
- org.pepstock.charba.client.dom.enums.EventPhase
-
- All Implemented Interfaces:
Serializable
,Comparable<EventPhase>
public enum EventPhase extends Enum<EventPhase>
Enumerates the phases of the event flow which is currently being evaluated.- Author:
- Andrea "Stock" Stocchero
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AT_TARGET
The event has arrived at the event's target.BUBBLING
The event is propagating back up through the target's ancestors in reverse order, starting with the parent, and eventually reaching the containing window.CAPTURING
The event is not being processed at this time.NONE
The event is not being processed at this time..
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EventPhase
get(int eventPhase)
Scans all items of enumeration to get the right phase related to passed argument.int
value()
Returns the numeric representation of the phase.static EventPhase
valueOf(String name)
Returns the enum constant of this type with the specified name.static EventPhase[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final EventPhase NONE
The event is not being processed at this time..
-
CAPTURING
public static final EventPhase CAPTURING
The event is not being processed at this time.
-
AT_TARGET
public static final EventPhase AT_TARGET
The event has arrived at the event's target.
-
BUBBLING
public static final EventPhase BUBBLING
The event is propagating back up through the target's ancestors in reverse order, starting with the parent, and eventually reaching the containing window.
-
-
Method Detail
-
values
public static EventPhase[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EventPhase c : EventPhase.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EventPhase valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
value
public int value()
Returns the numeric representation of the phase.- Returns:
- the numeric representation of the phase
-
get
public static final EventPhase get(int eventPhase)
Scans all items of enumeration to get the right phase related to passed argument.- Parameters:
eventPhase
- specifies the current evaluation phase of the event flow- Returns:
- the related event phase.
If not found, returns alwaysNONE
.
-
-