Class SwingEvent
- java.lang.Object
- 
- com.inductiveautomation.snap.ui.UIEvent
- 
- com.inductiveautomation.snap.swing.SwingEvent
 
 
- 
 public class SwingEvent extends UIEvent This class encapsulates information for UI changes, like button clicks, text field entries, list selections, etc..
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classSwingEvent.TimerEventA timer event.- 
Nested classes/interfaces inherited from class com.inductiveautomation.snap.ui.UIEventUIEvent.Type
 
- 
 - 
Constructor SummaryConstructors Constructor Description SwingEvent(java.util.EventObject anEvent, javax.swing.JComponent aComponent)Creates a new SwingEvent.SwingEvent(java.util.EventObject anEvent, javax.swing.JComponent aComponent, UIEvent.Type aType)Creates a new RibsEvent.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconsume()Consume event.java.awt.AWTEventgetAWTEvent()Returns the AWT event.intgetClickCount()Returns the click count for a mouse event.java.awt.ColorgetColorValue()Returns the Color value encapsulated by the event widget.javax.swing.JComponentgetComponent()Returns the target component, if event target was component shape.java.awt.dnd.DropTargetDragEventgetDragDragEvent()Returns the drop event.java.awt.dnd.DropTargetDropEventgetDragDropEvent()Returns the drop event.SwingDraggergetDragger()Returns a Dragger for this event.java.awt.dnd.DragGestureEventgetDragGestureEvent()Returns the drop gesture event.java.util.List<java.io.File>getDropFiles()Returns the drop files, if drop files.java.lang.StringgetDropString()Returns the drop string, if drop event.java.util.EventObjectgetEvent()Returns the event as an EventObject.intgetEventID()Returns the event id.SwingHelpergetHelper()Returns the Ribs Helper for event widget.java.awt.event.InputEventgetInputEvent()Returns the input event.chargetKeyChar()Returns the event key char.intgetKeyCode()Returns the event keycode.java.awt.event.KeyEventgetKeyEvent()Returns the key event.java.awt.PointgetLocation()Returns the location for a mouse event or drop event.intgetMenuShortcutKeyMask()Returns the menu shortcut key mask.java.awt.event.MouseEventgetMouseEvent()Returns the mouse event.protected java.lang.StringgetPropertyChangePropertyName()Return PropertyChangeEvent property name.javax.swing.event.ListSelectionEventgetSelectionEvent()Returns the selection event.RMShapegetShape()Returns the target as shape, if shape.SwingTimergetTimer()Returns the timer.javax.swing.event.TreeSelectionEventgetTreeSelectionEvent()Returns the tree selection event.protected UIEvent.TypegetType(java.lang.Object anEvent)Computes the event type from EventObject.java.lang.ObjectgetValue()Override to provide value for DragDrop event.booleangetValueIsAdjusting()Returns whether event widget or internal event is currently in a continuous state of change.intgetX()Returns the mouse event x.intgetY()Returns the mouse event y.booleanisAltDown()Returns whether alt key is down.booleanisAWTEvent()Returns whether event is AWT event.booleanisCommandDown()Returns whether command menu shortcut key is down (command on Mac or control on other platforms).booleanisComponent()Returns whether target is a component.booleanisControlDown()Returns whether control key is down.booleanisDownArrow()Returns whether key is down arrow.booleanisDragDragEvent()Returns the drop event.booleanisEnterKey()Returns whether key is enter key.booleanisEscapeKey()Returns whether key is escape key.booleanisInputEvent()Returns whether event is input event.booleanisLeftArrow()Returns whether key is left arrow.booleanisMenuShortcutKeyPressed()Returns whether menu shortcut key is pressed.booleanisMetaDown()Returns whether "meta" key is down (the command key on Mac with no equivalent on Windows).booleanisRightArrow()Returns whether key is right arrow.booleanisShiftDown()Returns whether shift key is down.booleanisUpArrow()Returns whether key is up arrow.- 
Methods inherited from class com.inductiveautomation.snap.ui.UIEventequals, 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 Detail- 
SwingEventpublic SwingEvent(java.util.EventObject anEvent, javax.swing.JComponent aComponent)Creates a new SwingEvent.
 - 
SwingEventpublic SwingEvent(java.util.EventObject anEvent, javax.swing.JComponent aComponent, UIEvent.Type aType)Creates a new RibsEvent.
 
- 
 - 
Method Detail- 
getShapepublic RMShape getShape() Returns the target as shape, if shape.
 - 
isComponentpublic boolean isComponent() Returns whether target is a component.
 - 
getComponentpublic javax.swing.JComponent getComponent() Returns the target component, if event target was component shape.
 - 
getEventpublic java.util.EventObject getEvent() Returns the event as an EventObject.
 - 
getTypeprotected UIEvent.Type getType(java.lang.Object anEvent) Computes the event type from EventObject.
 - 
getPropertyChangePropertyNameprotected java.lang.String getPropertyChangePropertyName() Return PropertyChangeEvent property name.- Specified by:
- getPropertyChangePropertyNamein class- UIEvent
 
 - 
isAWTEventpublic boolean isAWTEvent() Returns whether event is AWT event.
 - 
getAWTEventpublic java.awt.AWTEvent getAWTEvent() Returns the AWT event.
 - 
getEventIDpublic int getEventID() Returns the event id.
 - 
isInputEventpublic boolean isInputEvent() Returns whether event is input event.
 - 
getInputEventpublic java.awt.event.InputEvent getInputEvent() Returns the input event.
 - 
isShiftDownpublic boolean isShiftDown() Returns whether shift key is down.
 - 
isControlDownpublic boolean isControlDown() Returns whether control key is down.
 - 
isAltDownpublic boolean isAltDown() Returns whether alt key is down.
 - 
isMetaDownpublic boolean isMetaDown() Returns whether "meta" key is down (the command key on Mac with no equivalent on Windows).
 - 
isCommandDownpublic boolean isCommandDown() Returns whether command menu shortcut key is down (command on Mac or control on other platforms).
 - 
isMenuShortcutKeyPressedpublic boolean isMenuShortcutKeyPressed() Returns whether menu shortcut key is pressed.
 - 
getMenuShortcutKeyMaskpublic int getMenuShortcutKeyMask() Returns the menu shortcut key mask.
 - 
getMouseEventpublic java.awt.event.MouseEvent getMouseEvent() Returns the mouse event.
 - 
getClickCountpublic int getClickCount() Returns the click count for a mouse event.
 - 
getLocationpublic java.awt.Point getLocation() Returns the location for a mouse event or drop event.
 - 
getXpublic int getX() Returns the mouse event x.
 - 
getYpublic int getY() Returns the mouse event y.
 - 
getKeyEventpublic java.awt.event.KeyEvent getKeyEvent() Returns the key event.
 - 
getKeyCodepublic int getKeyCode() Returns the event keycode.
 - 
getKeyCharpublic char getKeyChar() Returns the event key char.
 - 
isLeftArrowpublic boolean isLeftArrow() Returns whether key is left arrow.
 - 
isRightArrowpublic boolean isRightArrow() Returns whether key is right arrow.
 - 
isUpArrowpublic boolean isUpArrow() Returns whether key is up arrow.
 - 
isDownArrowpublic boolean isDownArrow() Returns whether key is down arrow.
 - 
isEnterKeypublic boolean isEnterKey() Returns whether key is enter key.
 - 
isEscapeKeypublic boolean isEscapeKey() Returns whether key is escape key.
 - 
isDragDragEventpublic boolean isDragDragEvent() Returns the drop event.
 - 
getDragDragEventpublic java.awt.dnd.DropTargetDragEvent getDragDragEvent() Returns the drop event.
 - 
getDragDropEventpublic java.awt.dnd.DropTargetDropEvent getDragDropEvent() Returns the drop event.
 - 
getDropStringpublic java.lang.String getDropString() Returns the drop string, if drop event.
 - 
getDropFilespublic java.util.List<java.io.File> getDropFiles() Returns the drop files, if drop files.
 - 
getDragGestureEventpublic java.awt.dnd.DragGestureEvent getDragGestureEvent() Returns the drop gesture event.
 - 
getDraggerpublic SwingDragger getDragger() Returns a Dragger for this event.
 - 
getValuepublic java.lang.Object getValue() Override to provide value for DragDrop event.
 - 
getSelectionEventpublic javax.swing.event.ListSelectionEvent getSelectionEvent() Returns the selection event.
 - 
getTreeSelectionEventpublic javax.swing.event.TreeSelectionEvent getTreeSelectionEvent() Returns the tree selection event.
 - 
getValueIsAdjustingpublic boolean getValueIsAdjusting() Returns whether event widget or internal event is currently in a continuous state of change.
 - 
getColorValuepublic java.awt.Color getColorValue() Returns the Color value encapsulated by the event widget.
 - 
getTimerpublic SwingTimer getTimer() Returns the timer.
 - 
getHelperpublic SwingHelper getHelper() Returns the Ribs Helper for event widget.
 
- 
 
-