Class SwingForester.Leaf

java.lang.Object
eu.bandm.tools.graficUtils.SwingForester.TreeProxy
eu.bandm.tools.graficUtils.SwingForester.Leaf
All Implemented Interfaces:
TreeNode
Enclosing class:
SwingForester

public final class SwingForester.Leaf extends SwingForester.TreeProxy
Tree node with no sub-nodes, representing a field of primitive type. (Or of reference type, when no internal information shall be displayed.)
  • Constructor Details

    • Leaf

      public Leaf(@Opt @Opt TreeNode parent, @Opt @Opt String label, Object source)
      Only constructor.
      Parameters:
      parent - the tree node under which the new node will be placed (only null for top-most node)
      label - the visible label text
      source - the object to display, in most cases simply a boxed primitiv value.
  • Method Details

    • valueToString

      public String valueToString()
      Deliver the string represetnation of the value field, but replaced for html print-out, see SwingForester.setHTML(boolean).
      Specified by:
      valueToString in class SwingForester.TreeProxy
    • getChildAt

      public TreeNode getChildAt(int index)
      Must never be called.
      Throws:
      UnsupportedOperationException
    • getChildCount

      public int getChildCount()
      . Returns constantly zero.
    • getIndex

      public int getIndex(TreeNode child)
      . Returns constantly -1.
    • getAllowsChildren

      public boolean getAllowsChildren()
      . Returns constantly false.
    • isLeaf

      public boolean isLeaf()
      . Returns constantly true.
    • children

      public Enumeration<TreeNode> children()
      . Returns constantly an empty collection.