Class TreeTableUtils

java.lang.Object
org.jppf.ui.utils.TreeTableUtils

public final class TreeTableUtils extends Object
Collection utility methods for manipulating a JTreeTable and its model.
Author:
Laurent Cohen
  • 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

      public static DefaultMutableTreeNode findComponent(DefaultMutableTreeNode parent, String uuid)
      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 DefaultMutableTreeNode or null if the driver could not be found.
    • getNodeIconPath

      public static String getNodeIconPath(org.jppf.management.JPPFManagementInfo info)
      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 be null.
      Returns:
      a DefaultMutableTreeNode or null if the driver could not be found.