public class ParseTreeTablePresentation extends java.lang.Object
| Constructor and Description |
|---|
ParseTreeTablePresentation(DetailAST parseTree)
Constructor initialise root node.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getChild(java.lang.Object parent,
int index)
Returns the child of parent at index.
|
int |
getChildCount(java.lang.Object parent)
Returns the number of children of parent.
|
java.lang.Class<?> |
getColumnClass(int column)
Returns type of specified column number.
|
int |
getColumnCount()
Returns number of available columns.
|
java.lang.String |
getColumnName(int column)
Returns name for specified column number.
|
int |
getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
Return the index of child in parent.
|
java.lang.Object |
getRoot()
Returns value of root.
|
java.lang.Object |
getValueAt(java.lang.Object node,
int column)
Returns the value to be displayed for node at column number.
|
boolean |
isCellEditable(int column)
Indicates whether the the value for node
node, at column number column is
editable. |
boolean |
isLeaf(java.lang.Object node)
Whether the node is a leaf.
|
protected void |
setParseMode(MainFrameModel.ParseMode mode)
Set parse mode.
|
protected void |
setParseTree(DetailAST parseTree)
Set parse tree.
|
public ParseTreeTablePresentation(DetailAST parseTree)
parseTree - DetailAST parse tree.protected final void setParseTree(DetailAST parseTree)
parseTree - DetailAST parse tree.protected void setParseMode(MainFrameModel.ParseMode mode)
mode - ParseMode enumpublic int getColumnCount()
public java.lang.String getColumnName(int column)
column - the column numbercolumn.public java.lang.Class<?> getColumnClass(int column)
column - the column numbercolumn.public java.lang.Object getValueAt(java.lang.Object node, int column)
node - the nodecolumn - the column numbernode, at column number column.public java.lang.Object getChild(java.lang.Object parent, int index)
parent - the node to get a child from.index - the index of a child.public int getChildCount(java.lang.Object parent)
parent - the node to count children for.public java.lang.Object getRoot()
public boolean isLeaf(java.lang.Object node)
node - the node to check.public int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
parent
or child is null, returns -1.
If either parent or child don't
belong to this tree model, returns -1.parent - a node in the tree, obtained from this data source.child - the node we are interested in.child or parent are null
or don't belong to this tree model.public boolean isCellEditable(int column)
node, at column number column is
editable.column - the column numberCopyright © 2001-2020. All Rights Reserved.