Enum PointerEventType
- java.lang.Object
-
- java.lang.Enum<PointerEventType>
-
- org.pepstock.charba.client.dom.enums.PointerEventType
-
- All Implemented Interfaces:
Serializable
,Comparable<PointerEventType>
,Key
,IsEvent
public enum PointerEventType extends Enum<PointerEventType> implements IsEvent
Enumerates the DOM event type of the pointer (mouse, touch and pen).- Author:
- Andrea "Stock" Stocchero
-
-
Enum Constant Summary
Enum Constants Enum Constant Description GOT_POINTER_CAPTURE
This event is fired when an element receives pointer capture.LOST_POINTER_CAPTURE
This event is fired after pointer capture is released for a pointer.POINTER_CANCEL
A browser fires this event if it concludes the pointer will no longer be able to generate events (for example the related device is deactivated).POINTER_DOWN
The event is fired when a pointer becomes active.
ForPointerType.MOUSE
, it is fired when the device transitions from no buttons pressed to at least one button pressed.
ForPointerType.TOUCH
, it is fired when physical contact is made with the digitizer.
ForPointerType.PEN
, it is fired when the stylus makes physical contact with the digitizer.
Note: For touchscreen browsers that allow direct manipulation, aPOINTER_DOWN
event triggers implicit pointer capture, which causes the target to capture all subsequent pointer events as if they were occurring over the capturing target.
Accordingly,POINTER_OVER
,POINTER_ENTER
,POINTER_LEAVE
, andPOINTER_OUT
will not fire as long as this capture is set.
The capture can be released manually by calling element.releasePointerCapture on the target element, or it will be implicitly released after aPOINTER_UP
orPOINTER_CANCEL
event.POINTER_ENTER
This event is fired when a pointing device is moved into the hit test boundaries of an element or one of its descendants, including as a result of aPOINTER_DOWN
event from a device that does not support hover (seePOINTER_DOWN
).
This event type is similar toPOINTER_OVER
, but differs in that it does not bubble.POINTER_LEAVE
This event is fired when a pointing device is moved out of the hit test boundaries of an element.
ForPointerType.PEN
devices, this event is fired when the stylus leaves the hover range detectable by the digitizer.POINTER_MOVE
This event is fired when a pointer changes coordinates.POINTER_OUT
This event is fired for several reasons including: pointing device is moved out of the hit test boundaries of an element; firing thePOINTER_UP
event for a device that does not support hover; after firing thePOINTER_CANCEL
event when a pen stylus leaves the hover range detectable by the digitizer.POINTER_OVER
This event is fired when a pointing device is moved into an element's hit test boundaries.POINTER_UP
This event is fired when a pointer is no longer active.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
value()
Returns the name value of propertystatic PointerEventType
valueOf(String name)
Returns the enum constant of this type with the specified name.static PointerEventType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
POINTER_OVER
public static final PointerEventType POINTER_OVER
This event is fired when a pointing device is moved into an element's hit test boundaries.
-
POINTER_ENTER
public static final PointerEventType POINTER_ENTER
This event is fired when a pointing device is moved into the hit test boundaries of an element or one of its descendants, including as a result of aPOINTER_DOWN
event from a device that does not support hover (seePOINTER_DOWN
).
This event type is similar toPOINTER_OVER
, but differs in that it does not bubble.
-
POINTER_DOWN
public static final PointerEventType POINTER_DOWN
The event is fired when a pointer becomes active.
ForPointerType.MOUSE
, it is fired when the device transitions from no buttons pressed to at least one button pressed.
ForPointerType.TOUCH
, it is fired when physical contact is made with the digitizer.
ForPointerType.PEN
, it is fired when the stylus makes physical contact with the digitizer.
Note: For touchscreen browsers that allow direct manipulation, aPOINTER_DOWN
event triggers implicit pointer capture, which causes the target to capture all subsequent pointer events as if they were occurring over the capturing target.
Accordingly,POINTER_OVER
,POINTER_ENTER
,POINTER_LEAVE
, andPOINTER_OUT
will not fire as long as this capture is set.
The capture can be released manually by calling element.releasePointerCapture on the target element, or it will be implicitly released after aPOINTER_UP
orPOINTER_CANCEL
event.
-
POINTER_MOVE
public static final PointerEventType POINTER_MOVE
This event is fired when a pointer changes coordinates.
-
POINTER_UP
public static final PointerEventType POINTER_UP
This event is fired when a pointer is no longer active.
-
POINTER_CANCEL
public static final PointerEventType POINTER_CANCEL
A browser fires this event if it concludes the pointer will no longer be able to generate events (for example the related device is deactivated).
-
POINTER_OUT
public static final PointerEventType POINTER_OUT
This event is fired for several reasons including: pointing device is moved out of the hit test boundaries of an element; firing thePOINTER_UP
event for a device that does not support hover; after firing thePOINTER_CANCEL
event when a pen stylus leaves the hover range detectable by the digitizer.
-
POINTER_LEAVE
public static final PointerEventType POINTER_LEAVE
This event is fired when a pointing device is moved out of the hit test boundaries of an element.
ForPointerType.PEN
devices, this event is fired when the stylus leaves the hover range detectable by the digitizer.
-
GOT_POINTER_CAPTURE
public static final PointerEventType GOT_POINTER_CAPTURE
This event is fired when an element receives pointer capture.
-
LOST_POINTER_CAPTURE
public static final PointerEventType LOST_POINTER_CAPTURE
This event is fired after pointer capture is released for a pointer.
-
-
Method Detail
-
values
public static PointerEventType[] 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 (PointerEventType c : PointerEventType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PointerEventType 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
-
-