Package com.inductiveautomation.snap.ui
Class UIHelper<T>
- java.lang.Object
- 
- com.inductiveautomation.snap.ui.UIHelper<T>
 
- 
- Direct Known Subclasses:
- RMViewerOwnerHpr,- SwingHelper
 
 public abstract class UIHelper<T> extends java.lang.ObjectA class to provide utility methods for UI components.
- 
- 
Constructor SummaryConstructors Constructor Description UIHelper()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddBinding(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.java.lang.StringgetAction(T anObj)Returns the action for a node.BindinggetBinding(T anObj, int anIndex)Returns the individual binding at the given index for given UI node.BindinggetBinding(T anObj, java.lang.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 java.lang.ObjectgetChild(T anObj, int anIndex)Returns the individual child object for given object and index.java.lang.ObjectgetChild(T anObj, java.lang.String aName)Returns first child with matching name, recursively, depth first.abstract intgetChildCount(T anObj)Returns the number of children for given object.abstract UIHelpergetHelper(java.lang.Object anObj)Returns the Helper object for a given object.java.lang.StringgetItemDisplayKey(T anObj)Sets the display key for UI node item.java.util.ListgetItems(T anObj)Returns the items for an object.protected java.lang.ObjectgetKeyValue(java.lang.Object anObj, java.lang.String aKey)Returns a key value.abstract java.lang.StringgetName(T anObj)Returns the name of the given object.abstract UIOwnergetOwner(T anObj)Returns given component's owner.abstract java.lang.ObjectgetParent(T anObj)Returns the parent object for given object.java.lang.StringgetPropertyNameMapped(T anObj, java.lang.String aPropertyName)Returns a mapped property name name.java.util.List<java.lang.String>getPropertyNames(T anObj)Returns the property names for helper's instance class.protected java.util.List<java.lang.String>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.java.lang.ObjectgetSelectedItem(T anObj)Returns the selected object property of given object.java.lang.StringgetText(T anObj)Returns the text property of given object.java.lang.ObjectgetValue(T anObj, java.lang.String aPropertyName)Returns an object's value for given property name.voidinitUI(T anObj, UIOwner anOwner)Initializes 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.booleanisEnabled(T anObj)Returns whether given UI node is enabled.abstract booleanisEnabled(T anObj, UIEvent.Type aType)Returns whether given event is enabled.booleanisPropertyName(T anObj, java.lang.String aPropertyName)Returns whether a given property name is valid for given object.booleanisValueAdjusting(T anObj)Returns whether UI node value is adjusting.BindingremoveBinding(T anObj, int anIndex)Removes the binding at the given index from given UI node.booleanremoveBinding(T anObj, java.lang.String aPropertyName)Removes the binding with given property name from given UI node.voidsetAction(T anObj, java.lang.String anAction)Sets 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, java.lang.String aKey)Sets the display key for UI node item.voidsetItems(T anObj, java.lang.Object[] theItems)Sets the items for an object.voidsetItems(T anObj, java.util.List theItems)Sets the items for an object.protected voidsetKeyValue(java.lang.Object anObj, java.lang.String aKey, java.lang.Object aValue)Sets a KeyValue.abstract voidsetOwner(T anObj, UIOwner anOwner)Sets 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, java.lang.Object aValue)Sets the selected object property of given object to given value.voidsetText(T anObj, java.lang.String aString)Sets the text property of given object to given string.voidsetValue(T anObj, java.lang.String aPropertyName, java.lang.Object aValue)Sets an object's value for given property name.
 
- 
- 
- 
Method Detail- 
getNamepublic abstract java.lang.String getName(T anObj) Returns the name of the given object.
 - 
initUIpublic void initUI(T anObj, UIOwner anOwner) Initializes the given object to send Events to target.
 - 
initUIDeeppublic void initUIDeep(T anObj, UIOwner anOwner) Initializes the given object and its children to send Events to target.
 - 
getParentpublic abstract java.lang.Object getParent(T anObj) Returns the parent object for given object.
 - 
getChildCountpublic abstract int getChildCount(T anObj) Returns the number of children for given object.
 - 
getChildpublic abstract java.lang.Object getChild(T anObj, int anIndex) Returns the individual child object for given object and index.
 - 
getChildpublic java.lang.Object getChild(T anObj, java.lang.String aName) Returns first child with matching name, recursively, depth first.
 - 
isPropertyNamepublic boolean isPropertyName(T anObj, java.lang.String aPropertyName) Returns whether a given property name is valid for given object.
 - 
getPropertyNamespublic java.util.List<java.lang.String> getPropertyNames(T anObj) Returns the property names for helper's instance class.
 - 
getPropertyNamesImplprotected java.util.List<java.lang.String> getPropertyNamesImpl(T anObj) Returns the property names for helper's instance class.
 - 
getPropertyNameMappedpublic java.lang.String getPropertyNameMapped(T anObj, java.lang.String aPropertyName) Returns a mapped property name name.
 - 
getActionpublic java.lang.String getAction(T anObj) Returns the action for a node.
 - 
setActionpublic void setAction(T anObj, java.lang.String anAction) Sets the action for a node.
 - 
getBindingCountpublic int getBindingCount(T anObj) Returns the number of bindings associated with given UI node.
 - 
getBindingpublic Binding getBinding(T anObj, int anIndex) Returns the individual binding at the given index for given UI node.
 - 
getBindingpublic Binding getBinding(T anObj, java.lang.String aPropertyName) Returns the individual binding for the given property name.
 - 
addBindingpublic void addBinding(T anObj, Binding aBinding) Adds the individual binding at the given index to given UI node.
 - 
removeBindingpublic Binding removeBinding(T anObj, int anIndex) Removes the binding at the given index from given UI node.
 - 
removeBindingpublic boolean removeBinding(T anObj, java.lang.String aPropertyName) Removes the binding with given property name from given UI node.
 - 
getValuepublic java.lang.Object getValue(T anObj, java.lang.String aPropertyName) Returns an object's value for given property name.
 - 
setValuepublic void setValue(T anObj, java.lang.String aPropertyName, java.lang.Object aValue) Sets an object's value for given property name.
 - 
getTextpublic java.lang.String getText(T anObj) Returns the text property of given object.
 - 
setTextpublic void setText(T anObj, java.lang.String aString) Sets the text property of given object to given string.
 - 
getItemspublic java.util.List getItems(T anObj) Returns the items for an object.
 - 
setItemspublic void setItems(T anObj, java.util.List theItems) Sets the items for an object.
 - 
setItemspublic void setItems(T anObj, java.lang.Object[] theItems) Sets the items for an object.
 - 
getItemDisplayKeypublic java.lang.String getItemDisplayKey(T anObj) Sets the display key for UI node item.
 - 
setItemDisplayKeypublic void setItemDisplayKey(T anObj, java.lang.String aKey) Sets the display key for UI node item.
 - 
getSelectedIndexpublic int getSelectedIndex(T anObj) Returns the selected index property of given object.
 - 
setSelectedIndexpublic void setSelectedIndex(T anObj, int anIndex) Sets the selected index property of given object to given value.
 - 
getSelectedIndexspublic int[] getSelectedIndexs(T anObj) Returns the selected index property of given object.Kept in case someone is using reflection with the misspelling 
 - 
getSelectedIndexespublic int[] getSelectedIndexes(T anObj) 
 - 
setSelectedIndexespublic void setSelectedIndexes(T anObj, int[] theIndexes) Sets the selected index property of given object to given value.
 - 
getSelectedItempublic java.lang.Object getSelectedItem(T anObj) Returns the selected object property of given object.
 - 
setSelectedItempublic void setSelectedItem(T anObj, java.lang.Object aValue) Sets the selected object property of given object to given value.
 - 
isValueAdjustingpublic boolean isValueAdjusting(T anObj) Returns whether UI node value is adjusting.
 - 
isEnabledpublic boolean isEnabled(T anObj) Returns whether given UI node is enabled.
 - 
setEnabledpublic void setEnabled(T anObj, boolean aValue) Sets whether given UI node is enabled.
 - 
isEnabledpublic abstract boolean isEnabled(T anObj, UIEvent.Type aType) Returns whether given event is enabled.
 - 
setEnabledpublic abstract void setEnabled(T anObj, UIEvent.Type aType, boolean aValue) Returns whether given event is enabled.
 - 
getKeyValueprotected java.lang.Object getKeyValue(java.lang.Object anObj, java.lang.String aKey)Returns a key value.
 - 
setKeyValueprotected void setKeyValue(java.lang.Object anObj, java.lang.String aKey, java.lang.Object aValue)Sets a KeyValue.
 - 
enableEventspublic void enableEvents(T anObj, UIEvent.Type... theTypes) Called to enable events.
 - 
getHelperpublic abstract UIHelper getHelper(java.lang.Object anObj) Returns the Helper object for a given object.
 
- 
 
-