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 TypeMethodDescriptionvoidaddBinding(T anObj, Binding aBinding) Adds the individual binding at the given index to given UI node.voidenableEvents(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.intgetBindingCount(T anObj) Returns the number of bindings associated with given UI node.abstract ObjectReturns the individual child object for given object and index.Returns first child with matching name, recursively, depth first.abstract intgetChildCount(T anObj) Returns the number of children for given object.abstract UIHelperReturns 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 ObjectgetKeyValue(Object anObj, String aKey) Returns a key value.abstract StringReturns the name of the given object.abstract UIOwnerReturns given component's owner.abstract ObjectReturns 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.intgetSelectedIndex(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.voidInitializes the given object to send Events to target.voidinitUIDeep(T anObj, UIOwner anOwner) Initializes the given object and its children to send Events to target.booleanReturns whether given UI node is enabled.abstract booleanisEnabled(T anObj, UIEvent.Type aType) Returns whether given event is enabled.booleanisPropertyName(T anObj, String aPropertyName) Returns whether a given property name is valid for given object.booleanisValueAdjusting(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.booleanremoveBinding(T anObj, String aPropertyName) Removes the binding with given property name from given UI node.voidSets the action for a node.voidsetEnabled(T anObj, boolean aValue) Sets whether given UI node is enabled.abstract voidsetEnabled(T anObj, UIEvent.Type aType, boolean aValue) Returns whether given event is enabled.voidsetItemDisplayKey(T anObj, String aKey) Sets the display key for UI node item.voidSets the items for an object.voidSets the items for an object.protected voidsetKeyValue(Object anObj, String aKey, Object aValue) Sets a KeyValue.abstract voidSets given component's owner.voidsetSelectedIndex(T anObj, int anIndex) Sets the selected index property of given object to given value.voidsetSelectedIndexes(T anObj, int[] theIndexes) Sets the selected index property of given object to given value.voidsetSelectedItem(T anObj, Object aValue) Sets the selected object property of given object to given value.voidSets the text property of given object to given string.voidSets 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.
-