Class FWTreeNode

All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode
Direct Known Subclasses:
FWKeyWordTreeNode, FWResultTreeNode, FWSimComponentsTreeNode, FWSimSolutionTreeNode

public class FWTreeNode extends DefaultMutableTreeNode
Tree node with localised text and tooltip, icon, startable function and optional popup image.
Author:
Andreas Enders
See Also:
  • Constructor Details

    • FWTreeNode

      public FWTreeNode(String aID, String aIconID, String aFunction, String aPopupImageID)
      Creates a node with localised caption and tooltip (<prefix>.tree.<id>).
      Parameters:
      aID - id of the node
      aIconID - image id of the icon, or empty
      aFunction - function started by the node, or empty
      aPopupImageID - image id of the popup, or null
    • FWTreeNode

      public FWTreeNode(String aID, String aCaption, String aToolTip, String aIconID, String aFunction, String aPopupImageID)
      Parameters:
      aID - id of the node
      aCaption - caption, or null for the localised text <prefix>.tree.<id>
      aToolTip - tooltip, or null for the localised text <prefix>.tree.<id>.tooltip
      aIconID - image id of the icon, or empty
      aFunction - function started by the node, or empty
      aPopupImageID - image id of the popup, or null
  • Method Details

    • getIcon

      public ImageIcon getIcon()
      Returns:
      the icon of the treenode
    • getText

      public String getText()
      Returns:
      the Text
    • getToolTipText

      public String getToolTipText()
      Returns:
      the toolTipText
    • getID

      public String getID()
      Returns:
      the id
    • getFunction

      public String getFunction()
      Returns:
      the function
    • isNodeStartable

      public boolean isNodeStartable()
      Returns:
      if node is startable
    • isPopupPossible

      public boolean isPopupPossible()
      Returns:
      if popup is allowed at this place: a localised popup image exists (the condition was inverted, a popup was only possible if the image was missing; attribute popupimageid not used in the configurations so far)
    • getPopupImage

      public ImageIcon getPopupImage()
      Returns:
      Icon used for Popup
    • toString

      public String toString()
      Overrides:
      toString in class DefaultMutableTreeNode
    • insert

      public void insert(MutableTreeNode aNewChild, int aChildIndex)
      Specified by:
      insert in interface MutableTreeNode
      Overrides:
      insert in class DefaultMutableTreeNode