Package com.inductiveautomation.snap.ui
Class UIEvent
java.lang.Object
com.inductiveautomation.snap.ui.UIEvent
- Direct Known Subclasses:
SwingEvent
Represents a UI event sent to a UIOwner.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionUIEvent()Creates a new UIEvent.UIEvent(Object anEvent, Object aTarget, UIEvent.Type aType) Creates a new UIEvent with given event, event target and property name. -
Method Summary
Modifier and TypeMethodDescriptionvoidconsume()Consumes the event.booleanReturns whether widget is equal to given name.Returns the Boolean value encapsulated by the event widget.booleanReturns the Boolean value encapsulated by the event widget.getEvent()Returns the platform specific event, if available.<T> TReturns the platform specific event as given class.Returns the Float value encapsulated by the event widget.abstract UIHelperReturns the UI Helper for event target.Returns the Integer value encapsulated by the event widget.getName()Returns the name of the event (or the name of the Event Target).protected abstract StringReturns whether event is property change.Returns the property name.intReturns the selected index for encapsulated widget.Returns the selected item for encapsulated widget.<T> TgetSelectedItem(Class<T> aClass) Returns the selected item for encapsulated widget.Returns the String value encapsulated by the event widget.Returns the event target.<T> TReturns the target of the event as given class.getText()Returns text for encapsulated widget.booleanReturns whether this event triggers a UI reset.getType()Returns the event type.protected abstract UIEvent.TypeReturns the UIEventType from given Event object.getValue()Returns the value encapsulated by the event widget.booleanReturns whether event represents component with given name.booleanReturns whether event is action event.booleanReturns whether event is drop event.booleanReturns whether event is drag enter.booleanReturns whether event is any drag event.booleanReturns whether event is drag exit.booleanReturns whether event is DragGesture event.booleanReturns whether event is drag over.booleanReturns whether event is DragSourceEnd event.booleanReturns whether event is DragSourceEnter event.booleanReturns whether event is DragSourceExit event.booleanReturns whether event is FocusGained.booleanReturns whether event is FocusLost.booleanReturns whether event is key event.booleanReturns whether event is key finished.booleanReturns whether event is key pressed.booleanReturns whether event is key released.booleanReturns whether event is key typed.booleanReturns whether event is mouse clicked.booleanReturns whether event is mouse dragged.booleanReturns whether event is mouse entered.booleanReturns whether event is mouse event.booleanReturns whether event is mouse exited.booleanReturns whether event is mouse finished.booleanReturns whether event is mouse moved.booleanReturns whether event is mouse pressed.booleanReturns whether event is mouse released.booleanReturns whether event is property change.booleanReturns whether event is selection event.booleanReturns whether event is timer event.booleanReturns whether event widget or internal event is currently in a continuous state of change.booleanReturns whether event is value change event.protected voidSets the platform specific event, if available.voidReturns the name of the event (or the name of the Event Target).protected voidSets the event target.voidsetTriggersReset(boolean aValue) Sets whether this event triggers a UI reset.voidsetType(UIEvent.Type aType) Sets the event type.voidSets the value encapsulated by the event widget.toString()Standard toString implementation.
-
Constructor Details
-
UIEvent
public UIEvent()Creates a new UIEvent. -
UIEvent
Creates a new UIEvent with given event, event target and property name.
-
-
Method Details
-
getName
Returns the name of the event (or the name of the Event Target). -
setName
Returns the name of the event (or the name of the Event Target). -
getEvent
Returns the platform specific event, if available. -
setEvent
Sets the platform specific event, if available. -
getEvent
Returns the platform specific event as given class. -
getType
Returns the event type. -
setType
Sets the event type. -
getType
Returns the UIEventType from given Event object. -
getTarget
Returns the event target. -
setTarget
Sets the event target. -
getTarget
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
Returns whether event is property change. -
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
Returns whether event represents component with given name. -
equals
Returns whether widget is equal to given name. -
getValue
Returns the value encapsulated by the event widget. -
setValue
Sets the value encapsulated by the event widget. -
getStringValue
Returns the String value encapsulated by the event widget. -
getBoolValue
public boolean getBoolValue()Returns the Boolean value encapsulated by the event widget. -
getBooleanValue
Returns the Boolean value encapsulated by the event widget. -
getIntValue
Returns the Integer value encapsulated by the event widget. -
getFloatValue
Returns the Float value encapsulated by the event widget. -
getText
Returns text for encapsulated widget. -
getSelectedIndex
public int getSelectedIndex()Returns the selected index for encapsulated widget. -
getSelectedItem
Returns the selected item for encapsulated widget. -
getSelectedItem
Returns the selected item for encapsulated widget. -
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
Standard toString implementation.
-