Class TreeViewer

    • Field Detail

      • LIGHT_RED

        public static final Color LIGHT_RED
      • treeLayout

        protected org.abego.treelayout.TreeLayout<Tree> treeLayout
      • highlightedNodes

        protected List<Tree> highlightedNodes
      • fontName

        protected String fontName
      • fontStyle

        protected int fontStyle
      • fontSize

        protected int fontSize
      • font

        protected Font font
      • gapBetweenLevels

        protected double gapBetweenLevels
      • gapBetweenNodes

        protected double gapBetweenNodes
      • nodeWidthPadding

        protected int nodeWidthPadding
      • nodeHeightPadding

        protected int nodeHeightPadding
      • arcSize

        protected int arcSize
      • scale

        protected double scale
      • boxColor

        protected Color boxColor
      • highlightedBoxColor

        protected Color highlightedBoxColor
      • borderColor

        protected Color borderColor
      • textColor

        protected Color textColor
    • Constructor Detail

      • TreeViewer

        public TreeViewer​(List<String> ruleNames,
                          Tree tree)
    • Method Detail

      • getUseCurvedEdges

        public boolean getUseCurvedEdges()
      • setUseCurvedEdges

        public void setUseCurvedEdges​(boolean useCurvedEdges)
      • paintEdges

        protected void paintEdges​(Graphics g,
                                  Tree parent)
      • paintBox

        protected void paintBox​(Graphics g,
                                Tree tree)
      • getText

        protected String getText​(Tree tree)
      • setTreeTextProvider

        public void setTreeTextProvider​(TreeTextProvider treeTextProvider)
      • setFontSize

        public void setFontSize​(int sz)
      • setFontName

        public void setFontName​(String name)
      • addHighlightedNodes

        public void addHighlightedNodes​(Collection<Tree> nodes)
        Slow for big lists of highlighted nodes
      • removeHighlightedNodes

        public void removeHighlightedNodes​(Collection<Tree> nodes)
      • isHighlighted

        protected boolean isHighlighted​(Tree node)
      • getHighlightedNodeIndex

        protected int getHighlightedNodeIndex​(Tree node)
      • getArcSize

        public int getArcSize()
      • setArcSize

        public void setArcSize​(int arcSize)
      • getBoxColor

        public Color getBoxColor()
      • setBoxColor

        public void setBoxColor​(Color boxColor)
      • getHighlightedBoxColor

        public Color getHighlightedBoxColor()
      • setHighlightedBoxColor

        public void setHighlightedBoxColor​(Color highlightedBoxColor)
      • getBorderColor

        public Color getBorderColor()
      • setBorderColor

        public void setBorderColor​(Color borderColor)
      • getTextColor

        public Color getTextColor()
      • setTextColor

        public void setTextColor​(Color textColor)
      • getTree

        protected org.abego.treelayout.TreeForTreeLayout<Tree> getTree()
      • setTree

        public void setTree​(Tree root)
      • getTreeLayoutAdaptor

        public org.abego.treelayout.TreeForTreeLayout<Tree> getTreeLayoutAdaptor​(Tree root)
        Get an adaptor for root that indicates how to walk ANTLR trees. Override to change the adapter from the default of TreeLayoutAdaptor
      • getScale

        public double getScale()
      • setScale

        public void setScale​(double scale)
      • setRuleNames

        public void setRuleNames​(List<String> ruleNames)