Class JTreeHpr<T extends JTree>
java.lang.Object
com.inductiveautomation.snap.ui.UIHelper<T>
com.inductiveautomation.snap.swing.SwingHelper<T>
com.inductiveautomation.snap.swing.helpers.JComponentHpr<T>
com.inductiveautomation.snap.swing.helpers.JTreeHpr<T>
This class is a simple JTree subclass to support Ribs archival and to support Ribs unified accessor model.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidIf expand is true, expands all nodes in the tree.protected static ListfindTreeObjectPath(TreeModel aModel, Object aNode, Object aValue) Finds a tree object.intgetChildCount(T anObj) Override to suppress children.getRibsModel(JTree aTree) Returns a Ribs tree model for a given tree, if available.intgetSelectedIndex(T aTree) Returns the selected index property of given object.getSelectedItem(T aTree) Returns the selected object property of given object.protected static ObjectgetTreeNodeObject(Object aNode) Returns a value for a tree node.Returns a component's value as a string.voidOverride to install TreeSelectionListener.static voidreloadTree(JTree aTree, boolean doPreserveSelection, boolean doPreserveExpanded) Reloads tree.voidsetSelectedIndex(T aTree, int aValue) Sets the selected index property of given object to given value.voidsetSelectedItem(T aTree, Object aValue) Sets the selected object property of given object to given value.Methods inherited from class com.inductiveautomation.snap.swing.helpers.JComponentHpraddBinding, createEventAdapter, getAutosizing, getBinding, getBindingCount, getBindings, getChangeListener, getChild, getConstraints, getEventAdapter, getName, getOwner, getParent, getPropertyNamesImpl, getSendActionOnFocusLost, getSendActionOnFocusLostDefault, isEnabled, removeBinding, setConstraints, setEnabled, setOwner, setSendActionOnFocusLostMethods inherited from class com.inductiveautomation.snap.swing.SwingHelpergetHelper, getSwingHelper, getSwingHelperMethods inherited from class com.inductiveautomation.snap.ui.UIHelperenableEvents, getAction, getBinding, getChild, getItemDisplayKey, getItems, getKeyValue, getPropertyNameMapped, getPropertyNames, getSelectedIndexes, getSelectedIndexs, getText, initUIDeep, isEnabled, isPropertyName, isValueAdjusting, removeBinding, setAction, setEnabled, setItemDisplayKey, setItems, setItems, setKeyValue, setSelectedIndexes, setText, setValue
- 
Constructor Details- 
JTreeHprpublic JTreeHpr()
 
- 
- 
Method Details- 
getChildCountOverride to suppress children.- Overrides:
- getChildCountin class- JComponentHpr<T extends JTree>
 
- 
initUIOverride to install TreeSelectionListener.- Overrides:
- initUIin class- JComponentHpr<T extends JTree>
 
- 
getValueReturns a component's value as a string.
- 
getRibsModelReturns a Ribs tree model for a given tree, if available.
- 
reloadTreeReloads tree.
- 
expandAllIf expand is true, expands all nodes in the tree. Otherwise, collapses all nodes in the tree.
- 
getSelectedIndexReturns the selected index property of given object.- Overrides:
- getSelectedIndexin class- UIHelper<T extends JTree>
 
- 
setSelectedIndexSets the selected index property of given object to given value.- Overrides:
- setSelectedIndexin class- UIHelper<T extends JTree>
 
- 
getSelectedItemReturns the selected object property of given object.- Overrides:
- getSelectedItemin class- UIHelper<T extends JTree>
 
- 
setSelectedItemSets the selected object property of given object to given value.- Overrides:
- setSelectedItemin class- UIHelper<T extends JTree>
 
- 
findTreeObjectPathFinds a tree object.
- 
getTreeNodeObjectReturns a value for a tree node.
 
-