Class KeyPressEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<LeafletMap>
org.vaadin.addons.componentfactory.leaflet.layer.events.LeafletEvent
org.vaadin.addons.componentfactory.leaflet.layer.events.KeyboardEvent
org.vaadin.addons.componentfactory.leaflet.layer.events.KeyPressEvent
- All Implemented Interfaces:
Serializable
Event fired by a
LeafletMap when the user presses a key from the keyboard that produces a
character value while the map is focused.- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionKeyPressEvent(LeafletMap source, boolean fromClient, String layerId, String key, String code, int keyCode, boolean shiftKey, boolean altKey, boolean ctrlKey) Creates a new key press event. -
Method Summary
Methods inherited from class org.vaadin.addons.componentfactory.leaflet.layer.events.KeyboardEvent
getCode, getKey, getKeyCode, isAltKey, isCtrlKey, isShiftKey, toStringMethods inherited from class org.vaadin.addons.componentfactory.leaflet.layer.events.LeafletEvent
getLayerId, getTypeMethods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, getUI, isFromClient, unregisterListener
-
Constructor Details
-
KeyPressEvent
public KeyPressEvent(LeafletMap source, boolean fromClient, @EventData("event.detail.target.options.uuid") String layerId, @EventData("event.detail.originalEvent.key") String key, @EventData("event.detail.originalEvent.code") String code, @EventData("event.detail.originalEvent.keyCode") int keyCode, @EventData("event.detail.originalEvent.shiftKey") boolean shiftKey, @EventData("event.detail.originalEvent.altKey") boolean altKey, @EventData("event.detail.originalEvent.ctrlKey") boolean ctrlKey) Creates a new key press event.- Parameters:
source- the map that fired the eventfromClient-trueif the event originated from the client sidelayerId- the identifier of the layer the event is associated withkey- the key value of the key represented by the eventcode- the code of the key that triggered the eventkeyCode- the Unicode character code of the key that triggered the eventshiftKey- whether the "SHIFT" key was pressed when the event was triggeredaltKey- whether the "ALT" key was pressed when the event was triggeredctrlKey- whether the "CTRL" key was pressed when the event was triggered
-