Class SwingEvent
java.lang.Object
com.inductiveautomation.snap.ui.UIEvent
com.inductiveautomation.snap.swing.SwingEvent
This class encapsulates information for UI changes, like button clicks, text field entries, list selections, etc..
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.inductiveautomation.snap.ui.UIEvent
UIEvent.Type
-
Constructor Summary
ConstructorsConstructorDescriptionSwingEvent
(EventObject anEvent, JComponent aComponent) Creates a new SwingEvent.SwingEvent
(EventObject anEvent, JComponent aComponent, UIEvent.Type aType) Creates a new RibsEvent. -
Method Summary
Modifier and TypeMethodDescriptionvoid
consume()
Consume event.Returns the AWT event.int
Returns the click count for a mouse event.Returns the Color value encapsulated by the event widget.Returns the target component, if event target was component shape.Returns the drop event.Returns the drop event.Returns a Dragger for this event.Returns the drop gesture event.Returns the drop files, if drop files.Returns the drop string, if drop event.getEvent()
Returns the event as an EventObject.int
Returns the event id.Returns the Ribs Helper for event widget.Returns the input event.char
Returns the event key char.int
Returns the event keycode.Returns the key event.Returns the location for a mouse event or drop event.int
Returns the menu shortcut key mask.Returns the mouse event.protected String
Return PropertyChangeEvent property name.Returns the selection event.getShape()
Returns the target as shape, if shape.getTimer()
Returns the timer.Returns the tree selection event.protected UIEvent.Type
Computes the event type from EventObject.getValue()
Override to provide value for DragDrop event.boolean
Returns whether event widget or internal event is currently in a continuous state of change.int
getX()
Returns the mouse event x.int
getY()
Returns the mouse event y.boolean
Returns whether alt key is down.boolean
Returns whether event is AWT event.boolean
Returns whether command menu shortcut key is down (command on Mac or control on other platforms).boolean
Returns whether target is a component.boolean
Returns whether control key is down.boolean
Returns whether key is down arrow.boolean
Returns the drop event.boolean
Returns whether key is enter key.boolean
Returns whether key is escape key.boolean
Returns whether event is input event.boolean
Returns whether key is left arrow.boolean
Returns whether menu shortcut key is pressed.boolean
Returns whether "meta" key is down (the command key on Mac with no equivalent on Windows).boolean
Returns whether key is right arrow.boolean
Returns whether shift key is down.boolean
Returns whether key is up arrow.Methods inherited from class com.inductiveautomation.snap.ui.UIEvent
equals, getBooleanValue, getBoolValue, getEvent, getFloatValue, getIntValue, getName, getPropertyName, getSelectedIndex, getSelectedItem, getSelectedItem, getStringValue, getTarget, getTarget, getText, getTriggersReset, getType, is, isActionEvent, isDragDropEvent, isDragEnter, isDragEvent, isDragExit, isDragGesture, isDragOver, isDragSourceEnd, isDragSourceEnter, isDragSourceExit, isFocusGained, isFocusLost, isKeyEvent, isKeyFinished, isKeyPressed, isKeyReleased, isKeyTyped, isMouseClicked, isMouseDragged, isMouseEntered, isMouseEvent, isMouseExited, isMouseFinished, isMouseMoved, isMousePressed, isMouseReleased, isPropertyChangeEvent, isSelectionEvent, isTimerEvent, isValueAdjusting, isValueChangeEvent, setEvent, setName, setTarget, setTriggersReset, setType, setValue, toString
-
Constructor Details
-
SwingEvent
Creates a new SwingEvent. -
SwingEvent
Creates a new RibsEvent.
-
-
Method Details
-
getShape
Returns the target as shape, if shape. -
isComponent
public boolean isComponent()Returns whether target is a component. -
getComponent
Returns the target component, if event target was component shape. -
getEvent
Returns the event as an EventObject. -
getType
Computes the event type from EventObject. -
getPropertyChangePropertyName
Return PropertyChangeEvent property name.- Specified by:
getPropertyChangePropertyName
in classUIEvent
-
isAWTEvent
public boolean isAWTEvent()Returns whether event is AWT event. -
getAWTEvent
Returns the AWT event. -
getEventID
public int getEventID()Returns the event id. -
isInputEvent
public boolean isInputEvent()Returns whether event is input event. -
getInputEvent
Returns the input event. -
isShiftDown
public boolean isShiftDown()Returns whether shift key is down. -
isControlDown
public boolean isControlDown()Returns whether control key is down. -
isAltDown
public boolean isAltDown()Returns whether alt key is down. -
isMetaDown
public boolean isMetaDown()Returns whether "meta" key is down (the command key on Mac with no equivalent on Windows). -
isCommandDown
public boolean isCommandDown()Returns whether command menu shortcut key is down (command on Mac or control on other platforms). -
isMenuShortcutKeyPressed
public boolean isMenuShortcutKeyPressed()Returns whether menu shortcut key is pressed. -
getMenuShortcutKeyMask
public int getMenuShortcutKeyMask()Returns the menu shortcut key mask. -
getMouseEvent
Returns the mouse event. -
getClickCount
public int getClickCount()Returns the click count for a mouse event. -
getLocation
Returns the location for a mouse event or drop event. -
getX
public int getX()Returns the mouse event x. -
getY
public int getY()Returns the mouse event y. -
getKeyEvent
Returns the key event. -
getKeyCode
public int getKeyCode()Returns the event keycode. -
getKeyChar
public char getKeyChar()Returns the event key char. -
isLeftArrow
public boolean isLeftArrow()Returns whether key is left arrow. -
isRightArrow
public boolean isRightArrow()Returns whether key is right arrow. -
isUpArrow
public boolean isUpArrow()Returns whether key is up arrow. -
isDownArrow
public boolean isDownArrow()Returns whether key is down arrow. -
isEnterKey
public boolean isEnterKey()Returns whether key is enter key. -
isEscapeKey
public boolean isEscapeKey()Returns whether key is escape key. -
isDragDragEvent
public boolean isDragDragEvent()Returns the drop event. -
getDragDragEvent
Returns the drop event. -
getDragDropEvent
Returns the drop event. -
getDropString
Returns the drop string, if drop event. -
getDropFiles
Returns the drop files, if drop files. -
getDragGestureEvent
Returns the drop gesture event. -
getDragger
Returns a Dragger for this event. -
getValue
Override to provide value for DragDrop event. -
getSelectionEvent
Returns the selection event. -
getTreeSelectionEvent
Returns the tree selection event. -
getValueIsAdjusting
public boolean getValueIsAdjusting()Returns whether event widget or internal event is currently in a continuous state of change. -
getColorValue
Returns the Color value encapsulated by the event widget. -
getTimer
Returns the timer. -
getHelper
Returns the Ribs Helper for event widget. -
consume
public void consume()Consume event.
-