Class TouchEventInit
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.dom.events.EventInit
-
- org.pepstock.charba.client.dom.events.TouchEventInit
-
public final class TouchEventInit extends EventInit
Initialization object for aNativeTouchEvent
.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description TouchEventInit()
Creates an empty objectTouchEventInit(List<Touch> touches)
Creates an object with an array of objects for every point of contact currently touching the surface.TouchEventInit(Touch... touches)
Creates an object with an array of objects for every point of contact currently touching the surface.
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description List<Touch>
getChangedTouches()
Returns a list of objects for every point of contact which contributed to the event.int
getDetail()
When non-zero, provides the current (or next, depending on the event) click count.
For click events, is the current click count.
For mousedown or mouseup events, is 1 plus the current click count.
For all other, is always zero.org.pepstock.charba.client.dom.events.ModifiersHandler
getModifiersHandler()
List<Touch>
getTargetTouches()
Returns a list of objects for every point of contact that is touching the surface and started on the element that is the target of the current event.List<Touch>
getTouches()
Returns a list of objects for every point of contact currently touching the surface.default boolean
isAltKey()
Returns true if the alt key was down when the mouse event was fired.default boolean
isCtrlKey()
Returns true if the control key was down when the mouse event was fired.default boolean
isMetaKey()
Returns true if the meta key was down when the mouse event was fired.default boolean
isShiftKey()
Returns true if the shift key was down when the mouse event was fired.default void
setAltKey(boolean alt)
Sets true if the alt key was down when the mouse event was fired.void
setChangedTouches(List<Touch> touches)
Sets a list of objects for every point of contact which contributed to the event.void
setChangedTouches(Touch... touches)
Sets an array of objects for every point of contact which contributed to the event.default void
setCtrlKey(boolean ctrl)
Sets true if the control key was down when the mouse event was fired.void
setDetail(int detail)
Sets non-zero, provides the current (or next, depending on the event) click count.
For click events, is the current click count.
For mousedown or mouseup events, is 1 plus the current click count.
For all other, is always zerodefault void
setMetaKey(boolean meta)
Sets true if the meta key was down when the mouse event was fired.default void
setShiftKey(boolean shift)
Sets true if the shift key was down when the mouse event was fired.void
setTargetTouches(List<Touch> touches)
Sets a list of objects for every point of contact that is touching the surface and started on the element that is the target of the current eventvoid
setTargetTouches(Touch... touches)
Sets an array of objects for every point of contact that is touching the surface and started on the element that is the target of the current event.void
setTouches(List<Touch> touches)
Sets an array of objects for every point of contact currently touching the surface.void
setTouches(Touch... touches)
Sets an array of objects for every point of contact currently touching the surface.-
Methods inherited from class org.pepstock.charba.client.dom.events.EventInit
isBubbles, isCancelable, setBubbles, setCancelable
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkAndGetColor, checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Constructor Detail
-
TouchEventInit
public TouchEventInit()
Creates an empty object
-
TouchEventInit
public TouchEventInit(Touch... touches)
Creates an object with an array of objects for every point of contact currently touching the surface.- Parameters:
touches
- an array of objects for every point of contact currently touching the surface
-
-
Method Detail
-
getModifiersHandler
public org.pepstock.charba.client.dom.events.ModifiersHandler getModifiersHandler()
-
setChangedTouches
public void setChangedTouches(Touch... touches)
Sets an array of objects for every point of contact which contributed to the event.- Parameters:
touches
- an array of objects for every point of contact which contributed to the event
-
setChangedTouches
public void setChangedTouches(List<Touch> touches)
Sets a list of objects for every point of contact which contributed to the event.- Parameters:
touches
- a list of objects for every point of contact which contributed to the event
-
getChangedTouches
public List<Touch> getChangedTouches()
Returns a list of objects for every point of contact which contributed to the event.- Returns:
- a list of objects for every point of contact which contributed to the event.
-
setTargetTouches
public void setTargetTouches(Touch... touches)
Sets an array of objects for every point of contact that is touching the surface and started on the element that is the target of the current event.- Parameters:
touches
- an array of objects for every point of contact that is touching the surface and started on the element that is the target of the current event
-
setTargetTouches
public void setTargetTouches(List<Touch> touches)
Sets a list of objects for every point of contact that is touching the surface and started on the element that is the target of the current event- Parameters:
touches
- a list of objects for every point of contact that is touching the surface and started on the element that is the target of the current event
-
getTargetTouches
public List<Touch> getTargetTouches()
Returns a list of objects for every point of contact that is touching the surface and started on the element that is the target of the current event.- Returns:
- a list of objects for every point of contact that is touching the surface and started on the element that is the target of the current event
-
setTouches
public void setTouches(Touch... touches)
Sets an array of objects for every point of contact currently touching the surface.- Parameters:
touches
- an array of objects for every point of contact currently touching the surface
-
setTouches
public void setTouches(List<Touch> touches)
Sets an array of objects for every point of contact currently touching the surface.- Parameters:
touches
- an array of objects for every point of contact currently touching the surface
-
getTouches
public List<Touch> getTouches()
Returns a list of objects for every point of contact currently touching the surface.- Returns:
- a list of objects for every point of contact currently touching the surface.
-
isAltKey
public default boolean isAltKey()
Returns true if the alt key was down when the mouse event was fired.- Returns:
- true if the alt key was down when the mouse event was fired
-
setAltKey
public default void setAltKey(boolean alt)
Sets true if the alt key was down when the mouse event was fired.- Parameters:
alt
- true if the alt key was down when the mouse event was fired
-
isCtrlKey
public default boolean isCtrlKey()
Returns true if the control key was down when the mouse event was fired.- Returns:
- true if the control key was down when the mouse event was fired
-
setCtrlKey
public default void setCtrlKey(boolean ctrl)
Sets true if the control key was down when the mouse event was fired.- Parameters:
ctrl
- true if the control key was down when the mouse event was fired
-
isMetaKey
public default boolean isMetaKey()
Returns true if the meta key was down when the mouse event was fired.- Returns:
- true if the meta key was down when the mouse event was fired
-
setMetaKey
public default void setMetaKey(boolean meta)
Sets true if the meta key was down when the mouse event was fired.- Parameters:
meta
- true if the meta key was down when the mouse event was fired
-
isShiftKey
public default boolean isShiftKey()
Returns true if the shift key was down when the mouse event was fired.- Returns:
- true if the shift key was down when the mouse event was fired
-
setShiftKey
public default void setShiftKey(boolean shift)
Sets true if the shift key was down when the mouse event was fired.- Parameters:
shift
- true if the shift key was down when the mouse event was fired
-
getDetail
public final int getDetail()
When non-zero, provides the current (or next, depending on the event) click count.
For click events, is the current click count.
For mousedown or mouseup events, is 1 plus the current click count.
For all other, is always zero.- Returns:
- When non-zero, provides the current (or next, depending on the event) click count.
For click events, is the current click count.
For mousedown or mouseup events, is 1 plus the current click count.
For all other, is always zero
-
setDetail
public final void setDetail(int detail)
Sets non-zero, provides the current (or next, depending on the event) click count.
For click events, is the current click count.
For mousedown or mouseup events, is 1 plus the current click count.
For all other, is always zero- Parameters:
detail
- non-zero, provides the current (or next, depending on the event) click count.
For click events, is the current click count.
For mousedown or mouseup events, is 1 plus the current click count.
For all other, is always zero
-
-