Package org.jppf.ui.utils
Class TreeTableUtils
java.lang.Object
org.jppf.ui.utils.TreeTableUtils
Collection utility methods for manipulating a JTreeTable and its model.
- Author:
- Laurent Cohen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultMutableTreeNodefindComponent(DefaultMutableTreeNode parent, String uuid) Find the tree node with the specified component uuid in the children of the specified parent.static DefaultMutableTreeNodefindTreeNode(DefaultMutableTreeNode root, String uuid, TreeNodeFilter filter) Find the tree node with the specified component uuid in the children of the specified parent.static StringgetNodeIconPath(org.jppf.management.JPPFManagementInfo info) Get the path to an icon for the node given its state.static intinsertIndex(DefaultMutableTreeNode parent, org.jppf.client.monitoring.AbstractComponent<?> comp) Find the position at which to insert a driver, using the sorted lexical order of driver names.
-
Constructor Details
-
TreeTableUtils
public TreeTableUtils()
-
-
Method Details
-
insertIndex
public static int insertIndex(DefaultMutableTreeNode parent, org.jppf.client.monitoring.AbstractComponent<?> comp) Find the position at which to insert a driver, using the sorted lexical order of driver names.- Parameters:
parent- the parent tree node for the driver to insert.comp- the driver to insert.- Returns:
- the index at which to insert the driver, or -1 if the driver is already in the tree.
-
findComponent
Find the tree node with the specified component uuid in the children of the specified parent.- Parameters:
parent- the parent tree node for the component to find.uuid- uuid of the component to find.- Returns:
- a
DefaultMutableTreeNodeor null if the driver could not be found.
-
getNodeIconPath
Get the path to an icon for the node given its state.- Parameters:
info- represents the the node.- Returns:
- the path to an icon.
-
findTreeNode
public static DefaultMutableTreeNode findTreeNode(DefaultMutableTreeNode root, String uuid, TreeNodeFilter filter) Find the tree node with the specified component uuid in the children of the specified parent.- Parameters:
root- the parent tree node for the component to find.uuid- uuid of the component to find.filter- a filter that may reject a certain type of nodes, may benull.- Returns:
- a
DefaultMutableTreeNodeor null if the driver could not be found.
-