Class ParseTreeTableModel
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.gui.ParseTreeTableModel
-
-
Constructor Summary
Constructors Constructor Description ParseTreeTableModel(DetailAST parseTree)Initialise pModel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTreeModelListener(TreeModelListener listener)ObjectgetChild(Object parent, int index)intgetChildCount(Object parent)Class<?>getColumnClass(int column)Returns type of specified column number.intgetColumnCount()Returns number of available column.StringgetColumnName(int column)Returns column name of specified column number.intgetIndexOfChild(Object parent, Object child)ObjectgetRoot()ObjectgetValueAt(Object node, int column)Returns the value to be displayed for node at column number.booleanisCellEditable(int column)Indicates whether the the value for nodenode, at column numbercolumnis editable.booleanisLeaf(Object node)voidremoveTreeModelListener(TreeModelListener listener)protected voidsetParseMode(MainFrameModel.ParseMode mode)Set parse mode.protected voidsetParseTree(DetailAST parseTree)Sets parse tree.voidvalueForPathChanged(TreePath path, Object newValue)
-
-
-
Constructor Detail
-
ParseTreeTableModel
public ParseTreeTableModel(DetailAST parseTree)
Initialise pModel.- Parameters:
parseTree- DetailAST parse tree.
-
-
Method Detail
-
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 nodecolumn- the column number- Returns:
- the value to be displayed for node
node, at column numbercolumn.
-
getChildCount
public int getChildCount(Object parent)
- Specified by:
getChildCountin interfaceTreeModel
-
valueForPathChanged
public void valueForPathChanged(TreePath path, Object newValue)
- Specified by:
valueForPathChangedin interfaceTreeModel
-
getIndexOfChild
public int getIndexOfChild(Object parent, Object child)
- Specified by:
getIndexOfChildin interfaceTreeModel
-
addTreeModelListener
public void addTreeModelListener(TreeModelListener listener)
- Specified by:
addTreeModelListenerin interfaceTreeModel
-
removeTreeModelListener
public void removeTreeModelListener(TreeModelListener listener)
- Specified by:
removeTreeModelListenerin interfaceTreeModel
-
isCellEditable
public boolean isCellEditable(int column)
Indicates whether the the value for nodenode, at column numbercolumnis editable.- Parameters:
column- the column number- Returns:
- true if editable
-
-