@JsType(isNative=true, namespace="Cesium", name="ScreenSpaceEventHandler") public class ScreenSpaceEventHandler extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ScreenSpaceEventHandler.Listener<T> |
Modifier and Type | Field and Description |
---|---|
static int |
mouseEmulationIgnoreMilliseconds
The amount of time, in milliseconds, that mouse events will be disabled after receiving any touch events,
such that any emulated mouse events will be ignored.
|
static int |
touchHoldDelayMilliseconds
The amount of time, in milliseconds, before a touch on the screen becomes a touch and hold.
|
Constructor and Description |
---|
ScreenSpaceEventHandler(com.google.gwt.dom.client.CanvasElement element)
Handles user input events.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Removes listeners held by this object.
|
Function |
getInputAction(Number type)
Returns the function to be executed on an input event.
|
Function |
getInputAction(Number type,
Number modifier)
Returns the function to be executed on an input event.
|
boolean |
isDestroyed()
Returns true if this object was destroyed; otherwise, false.
|
void |
removeInputAction(Number type)
Removes the function to be executed on an input event.
|
void |
removeInputAction(Number type,
Number modifier)
Removes the function to be executed on an input event.
|
void |
setInputAction(ScreenSpaceEventHandler.Listener action,
Number type)
Set a function to be executed on an input event.
|
void |
setInputAction(ScreenSpaceEventHandler.Listener action,
Number type,
Number modifier)
Set a function to be executed on an input event.
|
@JsProperty public static int mouseEmulationIgnoreMilliseconds
@JsProperty public static int touchHoldDelayMilliseconds
@JsConstructor public ScreenSpaceEventHandler(com.google.gwt.dom.client.CanvasElement element)
element
- The element to add events to. Default: document@JsMethod public void destroy()
isDestroyed()
@JsMethod public Function getInputAction(Number type)
type
- The ScreenSpaceEventType
of input event.setInputAction(org.cesiumjs.cs.core.ScreenSpaceEventHandler.Listener, java.lang.Number)
,
removeInputAction(java.lang.Number)
@JsMethod public Function getInputAction(Number type, Number modifier)
type
- The ScreenSpaceEventType
of input event.modifier
- A KeyboardEventModifier
key that is held when a type event occurs.setInputAction(org.cesiumjs.cs.core.ScreenSpaceEventHandler.Listener, java.lang.Number)
,
removeInputAction(java.lang.Number)
@JsMethod public boolean isDestroyed()
destroy()
@JsMethod public void removeInputAction(Number type)
type
- The ScreenSpaceEventType
of input event.setInputAction(org.cesiumjs.cs.core.ScreenSpaceEventHandler.Listener, java.lang.Number)
@JsMethod public void removeInputAction(Number type, Number modifier)
type
- The ScreenSpaceEventType
of input event.modifier
- A KeyboardEventModifier
key that is held when a type event occurs.getInputAction(java.lang.Number)
,
setInputAction(org.cesiumjs.cs.core.ScreenSpaceEventHandler.Listener, java.lang.Number)
@JsMethod public void setInputAction(ScreenSpaceEventHandler.Listener action, Number type)
action
- Function to be executed when the input event occurs.type
- The ScreenSpaceEventType
of input event.getInputAction(java.lang.Number)
,
removeInputAction(java.lang.Number)
@JsMethod public void setInputAction(ScreenSpaceEventHandler.Listener action, Number type, Number modifier)
action
- Function to be executed when the input event occurs.type
- The ScreenSpaceEventType
of input event.modifier
- A KeyboardEventModifier
key that is held when a type event occurs.getInputAction(java.lang.Number)
,
removeInputAction(java.lang.Number)
Copyright © 2019. All rights reserved.