Class TreeLayoutAdaptor

java.lang.Object
org.antlr.v4.gui.TreeLayoutAdaptor
All Implemented Interfaces:
org.abego.treelayout.TreeForTreeLayout<Tree>

public class TreeLayoutAdaptor extends Object implements org.abego.treelayout.TreeForTreeLayout<Tree>
Adaptor ANTLR trees to TreeForTreeLayout.
  • Field Details

    • root

      private Tree root
  • Constructor Details

    • TreeLayoutAdaptor

      public TreeLayoutAdaptor(Tree root)
  • Method Details

    • isLeaf

      public boolean isLeaf(Tree node)
      Specified by:
      isLeaf in interface org.abego.treelayout.TreeForTreeLayout<Tree>
    • isChildOfParent

      public boolean isChildOfParent(Tree node, Tree parentNode)
      Specified by:
      isChildOfParent in interface org.abego.treelayout.TreeForTreeLayout<Tree>
    • getRoot

      public Tree getRoot()
      Specified by:
      getRoot in interface org.abego.treelayout.TreeForTreeLayout<Tree>
    • getLastChild

      public Tree getLastChild(Tree parentNode)
      Specified by:
      getLastChild in interface org.abego.treelayout.TreeForTreeLayout<Tree>
    • getFirstChild

      public Tree getFirstChild(Tree parentNode)
      Specified by:
      getFirstChild in interface org.abego.treelayout.TreeForTreeLayout<Tree>
    • getChildrenReverse

      public Iterable<Tree> getChildrenReverse(Tree node)
      Specified by:
      getChildrenReverse in interface org.abego.treelayout.TreeForTreeLayout<Tree>
    • getChildren

      public Iterable<Tree> getChildren(Tree node)
      Specified by:
      getChildren in interface org.abego.treelayout.TreeForTreeLayout<Tree>