Package com.inductiveautomation.snap.ui
Class UIOwner<EVENT extends UIEvent,UITYPE> 
java.lang.Object
com.inductiveautomation.snap.ui.UIOwner<EVENT,UITYPE> 
- Direct Known Subclasses:
- RMViewerOwner,- SwingOwner
A base controller class class that manages a SwingPanel usually loaded from a rib file.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final UIEvent.Typestatic final UIEvent.Typestatic final UIEvent.Typestatic final UIEvent.Typestatic final UIEvent.Typestatic final UIEvent.Typestatic final UIEvent.Typestatic final UIEvent.Typestatic final UIEvent.Typestatic final UIEvent.Typestatic final UIEvent.Typestatic final UIEvent.Typestatic final UIEvent.Typestatic final UIEvent.Typestatic final UIEvent.Typestatic final UIEvent.Type
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract voidaddKeyActionEvent(String aName, String aKey) Configures an ActionEvent to be sent to owner for given name and key description (in KeyStroke string format).voidaddNodeBinding(Object anObj, String aPropertyName, String aKeyPath) Adds a binding to a UI node.protected abstract UITYPEcreateUI()Creates the UI panel.voiddisableEvents(Object anObj, UIEvent.Type... theTypes) Enables events on given object.voidenableEvents(Object anObj, UIEvent.Type... theTypes) Enables events on given object.protected ObjectgetBindingModelValue(Binding aBinding) Returns the key value for a given binding.protected ObjectgetBindingNodeValue(Binding aBinding) Returns the UI node value for the given binding.getConversionMap(String aName) Returns a named map to perform value conversions.protected ObjectgetConversionMapKey(String aConversionMapName, Object aValue) Converts a UI node value to binder object value using conversion key map.Returns the map of maps, each of which is used to perform value conversions.getConversionMapValue(String aConversionMapName, Object aKey) Converts a binder object value to UI node using conversion key map.Returns the first focus UI node for when window/dialog is made visible.getModelValue(String aKey) Returns the model value for given key expression from this UIOwner.protected UITYPEReturns the specific UI child node for given object (name, event or node).Returns the specific UI child node with the given name.<T extends UITYPE>
 TReturns the specific UI child node with the given name as the given class.getNodeAction(Object anObj) Returns a node action.booleangetNodeBoolValue(Object anObj) Returns the boolean value for a given name or UI node.floatgetNodeFloatValue(Object anObj) Returns the float value for a given name or UI node.protected abstract UIHelpergetNodeHelper(Object anObj) Returns the helper for a given UI node.intgetNodeIntValue(Object anObj) Returns the int value for a given name or UI node.getNodeItemDisplayKey(Object anObj, String aKey) Returns the display key for given name or UI node.getNodeItems(Object anObj) Returns the items for a given name or UI node.intgetNodeSelectedIndex(Object anObj) Returns the selected index for given name or UI node.getNodeSelectedItem(Object anObj) Returns the selected item for given name or UI node.getNodeStringValue(Object anObj) Returns the string value for a given name or UI node.getNodeText(Object anObj) Returns the text value for a given name or UI node.getNodeValue(Object anObj) Returns the object value for a given name or UI node.getUI()Returns the main UI node.<T extends UITYPE>
 TReturns the main UI node with the given name as the given class.protected UIHelpergetUIHpr()Returns the helper for a given object.protected voidinitUI()Initializes the UI panel.protected voidInitialize UI.protected abstract booleanReturns whether current thread is event thread.voidisNodeEnabled(Object anObj) Returns whether given name or UI node is enabled.booleanisNodeValueAdjusting(Object anObj) Returns whether given name or UI node is currently being modified.booleanReturns whether Ribs' send event facility is disabled (so controls can be updated without triggering response).booleanisUISet()Returns whether UI has been set.protected voidCalled to reset bindings and resetUI().protected voidprocessRespondUI(EVENT anEvent) Called to invoke respondUI().abstract voidrequestFocus(Object anObj) Focuses given UI node (name or node).voidResets UI later.protected voidresetNodeBindings(Object anObj) Reset bindings for UI node (recurses for children).protected voidresetUI()Reset UI controls.protected voidRespond to UI controls.abstract voidRuns the given runnable in the next event.voidrunLaterDelayed(int aDelay, Runnable aRunnable) Runs the runnable after the given delay in milliseconds.voidrunLaterOnce(String aName, Runnable aRunnable) Invokes the given runnable for name once (cancels unexecuted previous runLater registered with same name).voidSends an event for a UI node.abstract voidSends an event for a UI node (name or node).protected voidsendNodeAction(Object anObj, String anAction) Sends a node action.protected voidsetBindingModelValue(Binding aBinding) Sets the key value for the given binding from the UI node.protected voidsetBindingNodeValue(Binding aBinding) Sets the UI node value for the given binding from the key value.voidsetFirstFocus(Object anObj) Sets the first focus UI node.voidsetModelValue(String aKey, Object aValue) Sets the model value for given key expression and value for this UIOwner.voidsetNodeAction(Object anObj, String anAction) Sets a node action.voidsetNodeEnabled(Object anObj, boolean aValue) Sets whether given name or UI node is enabled.voidsetNodeItemDisplayKey(Object anObj, String aKey) Sets the display key for given name or UI node.voidsetNodeItems(Object anObj, Object... theItems) Sets the items for a given name or UI node.voidsetNodeItems(Object anObj, List theItems) Sets the items for a given name or UI node.voidsetNodeSelectedIndex(Object anObj, int aValue) Sets the selected index for given name or UI node.voidsetNodeSelectedItem(Object anObj, Object anItem) Sets the selected item for given name or UI node.voidsetNodeText(Object anObj, String aValue) Sets the object value for a given name or UI node.voidsetNodeValue(Object anObj, Object aValue) Sets the object value for a given name or UI node.booleansetSendEventDisabled(boolean aFlag) Sets whether Ribs' send event facility is disabled (so controls can be updated without triggering response).
- 
Field Details- 
KeyPressed
- 
KeyReleased
- 
KeyTyped
- 
KeyFinished
- 
MousePressed
- 
MouseDragged
- 
MouseReleased
- 
MouseClicked
- 
MouseFinished
- 
MouseEntered
- 
MouseMoved
- 
MouseExited
- 
DragEnter
- 
DragOver
- 
DragExit
- 
DragDrop
- 
KeyEvents
- 
MouseEvents
- 
DragEvents
 
- 
- 
Constructor Details- 
UIOwnerpublic UIOwner()
 
- 
- 
Method Details- 
isUISetpublic boolean isUISet()Returns whether UI has been set.
- 
getUIReturns the main UI node.
- 
getUIReturns the main UI node with the given name as the given class.
- 
createUICreates the UI panel.
- 
initUIprotected void initUI()Initializes the UI panel.
- 
initUIInitialize UI.
- 
resetUIprotected void resetUI()Reset UI controls.
- 
respondUIRespond to UI controls.
- 
resetLaterpublic void resetLater()Resets UI later.
- 
processResetUIprotected void processResetUI()Called to reset bindings and resetUI().
- 
processRespondUICalled to invoke respondUI().
- 
getNodeReturns the specific UI child node with the given name.
- 
getNodeReturns the specific UI child node for given object (name, event or node).
- 
getNodeReturns the specific UI child node with the given name as the given class.
- 
getNodeValueReturns the object value for a given name or UI node.
- 
setNodeValueSets the object value for a given name or UI node.
- 
getNodeStringValueReturns the string value for a given name or UI node.
- 
getNodeBoolValueReturns the boolean value for a given name or UI node.
- 
getNodeIntValueReturns the int value for a given name or UI node.
- 
getNodeFloatValueReturns the float value for a given name or UI node.
- 
getNodeTextReturns the text value for a given name or UI node.
- 
setNodeTextSets the object value for a given name or UI node.
- 
getNodeItemsReturns the items for a given name or UI node.
- 
setNodeItemsSets the items for a given name or UI node.
- 
setNodeItemsSets the items for a given name or UI node.
- 
getNodeItemDisplayKeyReturns the display key for given name or UI node.
- 
setNodeItemDisplayKeySets the display key for given name or UI node.
- 
getNodeSelectedIndexReturns the selected index for given name or UI node.
- 
setNodeSelectedIndexSets the selected index for given name or UI node.
- 
getNodeSelectedItemReturns the selected item for given name or UI node.
- 
setNodeSelectedItemSets the selected item for given name or UI node.
- 
isNodeEnabledReturns whether given name or UI node is enabled.
- 
setNodeEnabledSets whether given name or UI node is enabled.
- 
isNodeValueAdjustingReturns whether given name or UI node is currently being modified.
- 
getNodeHelperReturns the helper for a given UI node.
- 
getNodeActionReturns a node action.
- 
setNodeActionSets a node action.
- 
sendNodeActionSends a node action.
- 
addNodeBindingAdds a binding to a UI node.
- 
resetNodeBindingsReset bindings for UI node (recurses for children).
- 
getBindingNodeValueReturns the UI node value for the given binding.
- 
setBindingNodeValueSets the UI node value for the given binding from the key value.
- 
getBindingModelValueReturns the key value for a given binding.
- 
setBindingModelValueSets the key value for the given binding from the UI node.
- 
getFirstFocusReturns the first focus UI node for when window/dialog is made visible.
- 
setFirstFocusSets the first focus UI node.
- 
requestFocusFocuses given UI node (name or node).
- 
getConversionMapsReturns the map of maps, each of which is used to perform value conversions.
- 
getConversionMapReturns a named map to perform value conversions.
- 
getConversionMapKeyConverts a UI node value to binder object value using conversion key map.
- 
getConversionMapValueConverts a binder object value to UI node using conversion key map.
- 
enableEventsEnables events on given object.
- 
disableEventsEnables events on given object.
- 
sendEventSends an event for a UI node (name or node).
- 
sendEventSends an event for a UI node.
- 
isSendEventDisabledpublic boolean isSendEventDisabled()Returns whether Ribs' send event facility is disabled (so controls can be updated without triggering response).
- 
setSendEventDisabledpublic boolean setSendEventDisabled(boolean aFlag) Sets whether Ribs' send event facility is disabled (so controls can be updated without triggering response).
- 
addKeyActionEventConfigures an ActionEvent to be sent to owner for given name and key description (in KeyStroke string format).- See Also:
 
- 
runLaterRuns the given runnable in the next event.
- 
runLaterDelayedRuns the runnable after the given delay in milliseconds.
- 
runLaterOnceInvokes the given runnable for name once (cancels unexecuted previous runLater registered with same name).
- 
isEventThreadprotected abstract boolean isEventThread()Returns whether current thread is event thread.
- 
getUIHprReturns the helper for a given object.
- 
getModelValueReturns the model value for given key expression from this UIOwner.
- 
setModelValueSets the model value for given key expression and value for this UIOwner.
 
-