Package com.inductiveautomation.snap.ui
Class UIEvent
- java.lang.Object
-
- com.inductiveautomation.snap.ui.UIEvent
-
- Direct Known Subclasses:
SwingEvent
public abstract class UIEvent extends java.lang.ObjectRepresents a UI event sent to a UIOwner.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUIEvent.TypeTypes for events.
-
Constructor Summary
Constructors Constructor Description UIEvent()Creates a new UIEvent.UIEvent(java.lang.Object anEvent, java.lang.Object aTarget, UIEvent.Type aType)Creates a new UIEvent with given event, event target and property name.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidconsume()Consumes the event.booleanequals(java.lang.String aName)Returns whether widget is equal to given name.java.lang.BooleangetBooleanValue()Returns the Boolean value encapsulated by the event widget.booleangetBoolValue()Returns the Boolean value encapsulated by the event widget.java.lang.ObjectgetEvent()Returns the platform specific event, if available.<T> TgetEvent(java.lang.Class<T> aClass)Returns the platform specific event as given class.java.lang.FloatgetFloatValue()Returns the Float value encapsulated by the event widget.abstract UIHelpergetHelper()Returns the UI Helper for event target.java.lang.IntegergetIntValue()Returns the Integer value encapsulated by the event widget.java.lang.StringgetName()Returns the name of the event (or the name of the Event Target).protected abstract java.lang.StringgetPropertyChangePropertyName()Returns whether event is property change.java.lang.StringgetPropertyName()Returns the property name.intgetSelectedIndex()Returns the selected index for encapsulated widget.java.lang.ObjectgetSelectedItem()Returns the selected item for encapsulated widget.<T> TgetSelectedItem(java.lang.Class<T> aClass)Returns the selected item for encapsulated widget.java.lang.StringgetStringValue()Returns the String value encapsulated by the event widget.java.lang.ObjectgetTarget()Returns the event target.<T> TgetTarget(java.lang.Class<T> aClass)Returns the target of the event as given class.java.lang.StringgetText()Returns text for encapsulated widget.booleangetTriggersReset()Returns whether this event triggers a UI reset.UIEvent.TypegetType()Returns the event type.protected abstract UIEvent.TypegetType(java.lang.Object anEvent)Returns the UIEventType from given Event object.java.lang.ObjectgetValue()Returns the value encapsulated by the event widget.booleanis(java.lang.String aName)Returns whether event represents component with given name.booleanisActionEvent()Returns whether event is action event.booleanisDragDropEvent()Returns whether event is drop event.booleanisDragEnter()Returns whether event is drag enter.booleanisDragEvent()Returns whether event is any drag event.booleanisDragExit()Returns whether event is drag exit.booleanisDragGesture()Returns whether event is DragGesture event.booleanisDragOver()Returns whether event is drag over.booleanisDragSourceEnd()Returns whether event is DragSourceEnd event.booleanisDragSourceEnter()Returns whether event is DragSourceEnter event.booleanisDragSourceExit()Returns whether event is DragSourceExit event.booleanisFocusGained()Returns whether event is FocusGained.booleanisFocusLost()Returns whether event is FocusLost.booleanisKeyEvent()Returns whether event is key event.booleanisKeyFinished()Returns whether event is key finished.booleanisKeyPressed()Returns whether event is key pressed.booleanisKeyReleased()Returns whether event is key released.booleanisKeyTyped()Returns whether event is key typed.booleanisMouseClicked()Returns whether event is mouse clicked.booleanisMouseDragged()Returns whether event is mouse dragged.booleanisMouseEntered()Returns whether event is mouse entered.booleanisMouseEvent()Returns whether event is mouse event.booleanisMouseExited()Returns whether event is mouse exited.booleanisMouseFinished()Returns whether event is mouse finished.booleanisMouseMoved()Returns whether event is mouse moved.booleanisMousePressed()Returns whether event is mouse pressed.booleanisMouseReleased()Returns whether event is mouse released.booleanisPropertyChangeEvent()Returns whether event is property change.booleanisSelectionEvent()Returns whether event is selection event.booleanisTimerEvent()Returns whether event is timer event.booleanisValueAdjusting()Returns whether event widget or internal event is currently in a continuous state of change.booleanisValueChangeEvent()Returns whether event is value change event.protected voidsetEvent(java.lang.Object anEvent)Sets the platform specific event, if available.voidsetName(java.lang.String aName)Returns the name of the event (or the name of the Event Target).protected voidsetTarget(java.lang.Object aTarget)Sets the event target.voidsetTriggersReset(boolean aValue)Sets whether this event triggers a UI reset.voidsetType(UIEvent.Type aType)Sets the event type.voidsetValue(java.lang.Object aValue)Sets the value encapsulated by the event widget.java.lang.StringtoString()Standard toString implementation.
-
-
-
Constructor Detail
-
UIEvent
public UIEvent()
Creates a new UIEvent.
-
UIEvent
public UIEvent(java.lang.Object anEvent, java.lang.Object aTarget, UIEvent.Type aType)Creates a new UIEvent with given event, event target and property name.
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of the event (or the name of the Event Target).
-
setName
public void setName(java.lang.String aName)
Returns the name of the event (or the name of the Event Target).
-
getEvent
public java.lang.Object getEvent()
Returns the platform specific event, if available.
-
setEvent
protected void setEvent(java.lang.Object anEvent)
Sets the platform specific event, if available.
-
getEvent
public <T> T getEvent(java.lang.Class<T> aClass)
Returns the platform specific event as given class.
-
getType
public UIEvent.Type getType()
Returns the event type.
-
setType
public void setType(UIEvent.Type aType)
Sets the event type.
-
getType
protected abstract UIEvent.Type getType(java.lang.Object anEvent)
Returns the UIEventType from given Event object.
-
getTarget
public java.lang.Object getTarget()
Returns the event target.
-
setTarget
protected void setTarget(java.lang.Object aTarget)
Sets the event target.
-
getTarget
public <T> T getTarget(java.lang.Class<T> aClass)
Returns the target of the event as given class.
-
isValueChangeEvent
public boolean isValueChangeEvent()
Returns whether event is value change event.
-
isPropertyChangeEvent
public boolean isPropertyChangeEvent()
Returns whether event is property change.
-
getPropertyChangePropertyName
protected abstract java.lang.String getPropertyChangePropertyName()
Returns whether event is property change.
-
getPropertyName
public java.lang.String getPropertyName()
Returns the property name.
-
isActionEvent
public boolean isActionEvent()
Returns whether event is action event.
-
isSelectionEvent
public boolean isSelectionEvent()
Returns whether event is selection event.
-
isTimerEvent
public boolean isTimerEvent()
Returns whether event is timer event.
-
isMouseEvent
public boolean isMouseEvent()
Returns whether event is mouse event.
-
isMousePressed
public boolean isMousePressed()
Returns whether event is mouse pressed.
-
isMouseDragged
public boolean isMouseDragged()
Returns whether event is mouse dragged.
-
isMouseReleased
public boolean isMouseReleased()
Returns whether event is mouse released.
-
isMouseClicked
public boolean isMouseClicked()
Returns whether event is mouse clicked.
-
isMouseFinished
public boolean isMouseFinished()
Returns whether event is mouse finished.
-
isMouseEntered
public boolean isMouseEntered()
Returns whether event is mouse entered.
-
isMouseMoved
public boolean isMouseMoved()
Returns whether event is mouse moved.
-
isMouseExited
public boolean isMouseExited()
Returns whether event is mouse exited.
-
isKeyEvent
public boolean isKeyEvent()
Returns whether event is key event.
-
isKeyPressed
public boolean isKeyPressed()
Returns whether event is key pressed.
-
isKeyReleased
public boolean isKeyReleased()
Returns whether event is key released.
-
isKeyTyped
public boolean isKeyTyped()
Returns whether event is key typed.
-
isKeyFinished
public boolean isKeyFinished()
Returns whether event is key finished.
-
isDragEvent
public boolean isDragEvent()
Returns whether event is any drag event.
-
isDragEnter
public boolean isDragEnter()
Returns whether event is drag enter.
-
isDragOver
public boolean isDragOver()
Returns whether event is drag over.
-
isDragExit
public boolean isDragExit()
Returns whether event is drag exit.
-
isDragDropEvent
public boolean isDragDropEvent()
Returns whether event is drop event.
-
isDragGesture
public boolean isDragGesture()
Returns whether event is DragGesture event.
-
isDragSourceEnter
public boolean isDragSourceEnter()
Returns whether event is DragSourceEnter event.
-
isDragSourceExit
public boolean isDragSourceExit()
Returns whether event is DragSourceExit event.
-
isDragSourceEnd
public boolean isDragSourceEnd()
Returns whether event is DragSourceEnd event.
-
isFocusGained
public boolean isFocusGained()
Returns whether event is FocusGained.
-
isFocusLost
public boolean isFocusLost()
Returns whether event is FocusLost.
-
is
public boolean is(java.lang.String aName)
Returns whether event represents component with given name.
-
equals
public boolean equals(java.lang.String aName)
Returns whether widget is equal to given name.
-
getValue
public java.lang.Object getValue()
Returns the value encapsulated by the event widget.
-
setValue
public void setValue(java.lang.Object aValue)
Sets the value encapsulated by the event widget.
-
getStringValue
public java.lang.String getStringValue()
Returns the String value encapsulated by the event widget.
-
getBoolValue
public boolean getBoolValue()
Returns the Boolean value encapsulated by the event widget.
-
getBooleanValue
public java.lang.Boolean getBooleanValue()
Returns the Boolean value encapsulated by the event widget.
-
getIntValue
public java.lang.Integer getIntValue()
Returns the Integer value encapsulated by the event widget.
-
getFloatValue
public java.lang.Float getFloatValue()
Returns the Float value encapsulated by the event widget.
-
getText
public java.lang.String getText()
Returns text for encapsulated widget.
-
getSelectedIndex
public int getSelectedIndex()
Returns the selected index for encapsulated widget.
-
getSelectedItem
public java.lang.Object getSelectedItem()
Returns the selected item for encapsulated widget.
-
getSelectedItem
public <T> T getSelectedItem(java.lang.Class<T> aClass)
Returns the selected item for encapsulated widget.
-
getHelper
public abstract UIHelper getHelper()
Returns the UI Helper for event target.
-
isValueAdjusting
public boolean isValueAdjusting()
Returns whether event widget or internal event is currently in a continuous state of change.
-
getTriggersReset
public boolean getTriggersReset()
Returns whether this event triggers a UI reset.
-
setTriggersReset
public void setTriggersReset(boolean aValue)
Sets whether this event triggers a UI reset.
-
consume
public void consume()
Consumes the event.
-
toString
public java.lang.String toString()
Standard toString implementation.- Overrides:
toStringin classjava.lang.Object
-
-