Package com.inductiveautomation.snap.ui
Class UIHelper<T>
java.lang.Object
com.inductiveautomation.snap.ui.UIHelper<T>
- Direct Known Subclasses:
RMViewerOwnerHpr
,SwingHelper
A class to provide utility methods for UI components.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBinding
(T anObj, Binding aBinding) Adds the individual binding at the given index to given UI node.void
enableEvents
(T anObj, UIEvent.Type... theTypes) Called to enable events.Returns the action for a node.getBinding
(T anObj, int anIndex) Returns the individual binding at the given index for given UI node.getBinding
(T anObj, String aPropertyName) Returns the individual binding for the given property name.int
getBindingCount
(T anObj) Returns the number of bindings associated with given UI node.abstract Object
Returns the individual child object for given object and index.Returns first child with matching name, recursively, depth first.abstract int
getChildCount
(T anObj) Returns the number of children for given object.abstract UIHelper
Returns the Helper object for a given object.getItemDisplayKey
(T anObj) Sets the display key for UI node item.Returns the items for an object.protected Object
getKeyValue
(Object anObj, String aKey) Returns a key value.abstract String
Returns the name of the given object.abstract UIOwner
Returns given component's owner.abstract Object
Returns the parent object for given object.getPropertyNameMapped
(T anObj, String aPropertyName) Returns a mapped property name name.getPropertyNames
(T anObj) Returns the property names for helper's instance class.getPropertyNamesImpl
(T anObj) Returns the property names for helper's instance class.int
getSelectedIndex
(T anObj) Returns the selected index property of given object.int[]
getSelectedIndexes
(T anObj) int[]
getSelectedIndexs
(T anObj) Returns the selected index property of given object.getSelectedItem
(T anObj) Returns the selected object property of given object.Returns the text property of given object.Returns an object's value for given property name.void
Initializes the given object to send Events to target.void
initUIDeep
(T anObj, UIOwner anOwner) Initializes the given object and its children to send Events to target.boolean
Returns whether given UI node is enabled.abstract boolean
isEnabled
(T anObj, UIEvent.Type aType) Returns whether given event is enabled.boolean
isPropertyName
(T anObj, String aPropertyName) Returns whether a given property name is valid for given object.boolean
isValueAdjusting
(T anObj) Returns whether UI node value is adjusting.removeBinding
(T anObj, int anIndex) Removes the binding at the given index from given UI node.boolean
removeBinding
(T anObj, String aPropertyName) Removes the binding with given property name from given UI node.void
Sets the action for a node.void
setEnabled
(T anObj, boolean aValue) Sets whether given UI node is enabled.abstract void
setEnabled
(T anObj, UIEvent.Type aType, boolean aValue) Returns whether given event is enabled.void
setItemDisplayKey
(T anObj, String aKey) Sets the display key for UI node item.void
Sets the items for an object.void
Sets the items for an object.protected void
setKeyValue
(Object anObj, String aKey, Object aValue) Sets a KeyValue.abstract void
Sets given component's owner.void
setSelectedIndex
(T anObj, int anIndex) Sets the selected index property of given object to given value.void
setSelectedIndexes
(T anObj, int[] theIndexes) Sets the selected index property of given object to given value.void
setSelectedItem
(T anObj, Object aValue) Sets the selected object property of given object to given value.void
Sets the text property of given object to given string.void
Sets an object's value for given property name.
-
Constructor Details
-
UIHelper
public UIHelper()
-
-
Method Details
-
getName
Returns the name of the given object. -
getOwner
Returns given component's owner. -
setOwner
Sets given component's owner. -
initUI
Initializes the given object to send Events to target. -
initUIDeep
Initializes the given object and its children to send Events to target. -
getParent
Returns the parent object for given object. -
getChildCount
Returns the number of children for given object. -
getChild
Returns the individual child object for given object and index. -
getChild
Returns first child with matching name, recursively, depth first. -
isPropertyName
Returns whether a given property name is valid for given object. -
getPropertyNames
Returns the property names for helper's instance class. -
getPropertyNamesImpl
Returns the property names for helper's instance class. -
getPropertyNameMapped
Returns a mapped property name name. -
getAction
Returns the action for a node. -
setAction
Sets the action for a node. -
getBindingCount
Returns the number of bindings associated with given UI node. -
getBinding
Returns the individual binding at the given index for given UI node. -
getBinding
Returns the individual binding for the given property name. -
addBinding
Adds the individual binding at the given index to given UI node. -
removeBinding
Removes the binding at the given index from given UI node. -
removeBinding
Removes the binding with given property name from given UI node. -
getValue
Returns an object's value for given property name. -
setValue
Sets an object's value for given property name. -
getText
Returns the text property of given object. -
setText
Sets the text property of given object to given string. -
getItems
Returns the items for an object. -
setItems
Sets the items for an object. -
setItems
Sets the items for an object. -
getItemDisplayKey
Sets the display key for UI node item. -
setItemDisplayKey
Sets the display key for UI node item. -
getSelectedIndex
Returns the selected index property of given object. -
setSelectedIndex
Sets the selected index property of given object to given value. -
getSelectedIndexs
Returns the selected index property of given object.Kept in case someone is using reflection with the misspelling
-
getSelectedIndexes
-
setSelectedIndexes
Sets the selected index property of given object to given value. -
getSelectedItem
Returns the selected object property of given object. -
setSelectedItem
Sets the selected object property of given object to given value. -
isValueAdjusting
Returns whether UI node value is adjusting. -
isEnabled
Returns whether given UI node is enabled. -
setEnabled
Sets whether given UI node is enabled. -
isEnabled
Returns whether given event is enabled. -
setEnabled
Returns whether given event is enabled. -
getKeyValue
Returns a key value. -
setKeyValue
Sets a KeyValue. -
enableEvents
Called to enable events. -
getHelper
Returns the Helper object for a given object.
-