public class ParseTreeTablePresentation extends Object
Constructor and Description |
---|
ParseTreeTablePresentation(DetailAST parseTree)
Constructor initialise root node.
|
Modifier and Type | Method and Description |
---|---|
Object |
getChild(Object parent,
int index)
Returns the child of parent at index.
|
int |
getChildCount(Object parent)
Returns the number of children of parent.
|
Class<?> |
getColumnClass(int column)
Returns type of specified column number.
|
int |
getColumnCount()
Returns number of available columns.
|
String |
getColumnName(int column)
Returns name for specified column number.
|
int |
getIndexOfChild(Object parent,
Object child)
Return the index of child in parent.
|
Object |
getRoot()
Returns value of root.
|
Object |
getValueAt(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(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 String getColumnName(int column)
column
- the column numbercolumn
.public Class<?> getColumnClass(int column)
column
- the column numbercolumn
.public Object getValueAt(Object node, int column)
node
- the nodecolumn
- the column numbernode
, at column number column
.public Object getChild(Object parent, int index)
parent
- the node to get a child from.index
- the index of a child.public int getChildCount(Object parent)
parent
- the node to count children for.public boolean isLeaf(Object node)
node
- the node to check.public int getIndexOfChild(Object parent, 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–2018. All rights reserved.