Class JTreeHpr<T extends javax.swing.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>
 
 
 
 
- 
 public class JTreeHpr<T extends javax.swing.JTree> extends JComponentHpr<T> This class is a simple JTree subclass to support Ribs archival and to support Ribs unified accessor model.
- 
- 
Constructor SummaryConstructors Constructor Description JTreeHpr()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidexpandAll(javax.swing.JTree aTree, boolean expand)If expand is true, expands all nodes in the tree.protected static java.util.ListfindTreeObjectPath(javax.swing.tree.TreeModel aModel, java.lang.Object aNode, java.lang.Object aValue)Finds a tree object.intgetChildCount(T anObj)Override to suppress children.RJTreeModelgetRibsModel(javax.swing.JTree aTree)Returns a Ribs tree model for a given tree, if available.intgetSelectedIndex(T aTree)Returns the selected index property of given object.java.lang.ObjectgetSelectedItem(T aTree)Returns the selected object property of given object.protected static java.lang.ObjectgetTreeNodeObject(java.lang.Object aNode)Returns a value for a tree node.java.lang.ObjectgetValue(T aTree, java.lang.String aPropertyName)Returns a component's value as a string.voidinitUI(T aTree, UIOwner anOwner)Override to install TreeSelectionListener.static voidreloadTree(javax.swing.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, java.lang.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, setSendActionOnFocusLost
 - 
Methods inherited from class com.inductiveautomation.snap.swing.SwingHelpergetHelper, getSwingHelper, getSwingHelper
 - 
Methods 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
 
- 
 
- 
- 
- 
Method Detail- 
getChildCountpublic int getChildCount(T anObj) Override to suppress children.- Overrides:
- getChildCountin class- JComponentHpr<T extends javax.swing.JTree>
 
 - 
initUIpublic void initUI(T aTree, UIOwner anOwner) Override to install TreeSelectionListener.- Overrides:
- initUIin class- JComponentHpr<T extends javax.swing.JTree>
 
 - 
getValuepublic java.lang.Object getValue(T aTree, java.lang.String aPropertyName) Returns a component's value as a string.
 - 
getRibsModelpublic RJTreeModel getRibsModel(javax.swing.JTree aTree) Returns a Ribs tree model for a given tree, if available.
 - 
reloadTreepublic static void reloadTree(javax.swing.JTree aTree, boolean doPreserveSelection, boolean doPreserveExpanded)Reloads tree.
 - 
expandAllpublic static void expandAll(javax.swing.JTree aTree, boolean expand)If expand is true, expands all nodes in the tree. Otherwise, collapses all nodes in the tree.
 - 
getSelectedIndexpublic int getSelectedIndex(T aTree) Returns the selected index property of given object.- Overrides:
- getSelectedIndexin class- UIHelper<T extends javax.swing.JTree>
 
 - 
setSelectedIndexpublic void setSelectedIndex(T aTree, int aValue) Sets the selected index property of given object to given value.- Overrides:
- setSelectedIndexin class- UIHelper<T extends javax.swing.JTree>
 
 - 
getSelectedItempublic java.lang.Object getSelectedItem(T aTree) Returns the selected object property of given object.- Overrides:
- getSelectedItemin class- UIHelper<T extends javax.swing.JTree>
 
 - 
setSelectedItempublic void setSelectedItem(T aTree, java.lang.Object aValue) Sets the selected object property of given object to given value.- Overrides:
- setSelectedItemin class- UIHelper<T extends javax.swing.JTree>
 
 - 
findTreeObjectPathprotected static java.util.List findTreeObjectPath(javax.swing.tree.TreeModel aModel, java.lang.Object aNode, java.lang.Object aValue)Finds a tree object.
 - 
getTreeNodeObjectprotected static java.lang.Object getTreeNodeObject(java.lang.Object aNode) Returns a value for a tree node.
 
- 
 
-