Class ParseTreeTableModel

java.lang.Object
com.puppycrawl.tools.checkstyle.gui.ParseTreeTableModel
All Implemented Interfaces:
TreeModel

public class ParseTreeTableModel extends Object implements TreeModel
The model that backs the parse tree in the GUI.
  • Constructor Details

    • ParseTreeTableModel

      public ParseTreeTableModel(DetailAST parseTree)
      Initialise pModel.
      Parameters:
      parseTree - DetailAST parse tree.
  • Method Details

    • setParseTree

      protected final void setParseTree(DetailAST parseTree)
      Sets parse tree.
      Parameters:
      parseTree - DetailAST parse tree.
    • setParseMode

      protected void setParseMode(MainFrameModel.ParseMode mode)
      Set parse mode.
      Parameters:
      mode - ParseMode enum
    • getColumnCount

      public int getColumnCount()
      Returns number of available column.
      Returns:
      the number of available column.
    • getColumnName

      public String getColumnName(int column)
      Returns column name of specified column number.
      Parameters:
      column - the column number
      Returns:
      the name for column number column.
    • getColumnClass

      public Class<?> getColumnClass(int column)
      Returns type of specified column number.
      Parameters:
      column - the column number
      Returns:
      the type for column number column.
    • getValueAt

      public Object getValueAt(Object node, int column)
      Returns the value to be displayed for node at column number.
      Parameters:
      node - the node
      column - the column number
      Returns:
      the value to be displayed for node node, at column number column.
    • getChild

      public Object getChild(Object parent, int index)
      Specified by:
      getChild in interface TreeModel
    • getChildCount

      public int getChildCount(Object parent)
      Specified by:
      getChildCount in interface TreeModel
    • valueForPathChanged

      public void valueForPathChanged(TreePath path, Object newValue)
      Specified by:
      valueForPathChanged in interface TreeModel
    • getRoot

      public Object getRoot()
      Specified by:
      getRoot in interface TreeModel
    • isLeaf

      public boolean isLeaf(Object node)
      Specified by:
      isLeaf in interface TreeModel
    • getIndexOfChild

      public int getIndexOfChild(Object parent, Object child)
      Specified by:
      getIndexOfChild in interface TreeModel
    • addTreeModelListener

      public void addTreeModelListener(TreeModelListener listener)
      Specified by:
      addTreeModelListener in interface TreeModel
    • removeTreeModelListener

      public void removeTreeModelListener(TreeModelListener listener)
      Specified by:
      removeTreeModelListener in interface TreeModel
    • isCellEditable

      public boolean isCellEditable(int column)
      Indicates whether the the value for node node, at column number column is editable.
      Parameters:
      column - the column number
      Returns:
      true if editable