Class FormatTree

java.lang.Object
eu.bandm.tools.util.ui.SwingForester
eu.bandm.tools.formatDiagnosis.FormatTree

public class FormatTree extends SwingForester
  • Field Details

    • CONTENT_PREFIX_PRINTED

      public static final int CONTENT_PREFIX_PRINTED
      See Also:
  • Constructor Details

    • FormatTree

      public FormatTree()
  • Method Details

    • createNode

      protected FormatTree.Inner1 createNode(TreeNode parent, String label, Object source)
    • growBranch

      @Opt protected @Opt FormatTree.Inner1 growBranch(TreeNode parent, String label, Object source)
      Description copied from class: SwingForester
      Generate representation for one single object. Derived class must differentiated whether the type of the object shall be displayed as a subtree. In this case it will call return the result of one of SwingForester.growCollection(String,TreeNode,String,Collection), SwingForester.growMap(TreeNode,String,Map), or SwingForester.growMultimap(TreeNode,String,Multimap). Otherwise it simply returns null, and a graphic leaf node will be generated by the caller (which is SwingForester.testForBranch(javax.swing.tree.@eu.bandm.tools.annotations.Opt TreeNode,java.lang.@eu.bandm.tools.annotations.Opt String,java.lang.Object)).
      Specified by:
      growBranch in class SwingForester
      Parameters:
      parent - the tree node under which the new node will be placed
      label - the visible label text
      source - the object to display, often simply a boxed primitive value.
      Returns:
      a lazy node with overridden eval() method, or a self-defined leaf node, or null to request a leaf node with default appearance
    • makeSwingFrame

      public static JFrame makeSwingFrame(Format f, String windowname, boolean isHtml)
      Generate a swing tree representation in a Swing JFrame. The caller must invoke .setVisible(true). This method is intended for debugging.
      Parameters:
      f - the Format to display
      windowname - the Title of the window
      isHtml - if tree labels use html features