|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jaret.util.ui.table.model.AbstractJaretTableModel
de.jaret.util.ui.table.model.StdHierarchicalTableModel
public class StdHierarchicalTableModel
Implementation of a "normal" jaret table model based on a hierarchical jaret table model. The StdHierarchicalmodel will listen on propchanges if the nodes are PropertyObservables.
| Field Summary | |
|---|---|
protected java.util.List<IColumn> |
_cols
the list of columns. |
protected boolean |
_excludeRootNode
|
protected IHierarchicalJaretTableModel |
_hModel
the hierarchical model this "normal" model maps. |
protected IHierarchicalTableViewState |
_hvs
the hierarchical viewstate responsible for node visibility. |
protected java.util.List<ITableNode> |
_rows
Current row list = list of visible nodes. |
| Fields inherited from class de.jaret.util.ui.table.model.AbstractJaretTableModel |
|---|
_listeners |
| Constructor Summary | |
|---|---|
StdHierarchicalTableModel(IHierarchicalJaretTableModel hModel,
IHierarchicalTableViewState hvs)
Construct a new stdhierarchical table model for a viewstate and a hierarchical model. |
|
| Method Summary | |
|---|---|
void |
addColumn(IColumn column)
Add a column to the list of columns. |
IColumn |
getColumn(int idx)
Retrieve a column specified by it's index. |
int |
getColumnCount()
Retrieve the number of columns. |
boolean |
getExcludeRootNode()
Check whether the root node should be excluded. |
ITableNode |
getNextSibling(ITableNode node)
Return the next sibling of a node. |
IRow |
getRow(int rowIdx)
Retrieve a specific row. |
int |
getRowCount()
Return the number of rows in the model. |
boolean |
isVisible(ITableNode node)
Check whether a node is visible. |
boolean |
moreSiblings(ITableNode node,
int level)
Check whether more siblings exist for a given node on a given level. |
void |
nodeAdded(ITableNode parent,
ITableNode newChild)
Called when a node has been added. |
void |
nodeExpanded(ITableNode node)
Node has been expanded. |
void |
nodeFolded(ITableNode node)
Node has been folded/collapsed. |
void |
nodeRemoved(ITableNode parent,
ITableNode removedChild)
Called whenever a node is removed. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
|
void |
setExcludeRootNode(boolean excludeRootNode)
Set whether the rot node should be excluded in the display. |
| Methods inherited from class de.jaret.util.ui.table.model.AbstractJaretTableModel |
|---|
addJaretTableModelListener, fireCellChanged, fireColumnAdded, fireColumnChanged, fireColumnRemoved, fireRowAdded, fireRowChanged, fireRowRemoved, fireTableDataChanged, getColumn, isEditable, removeJaretTableModelListener, setValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List<ITableNode> _rows
protected IHierarchicalJaretTableModel _hModel
protected IHierarchicalTableViewState _hvs
protected java.util.List<IColumn> _cols
protected boolean _excludeRootNode
| Constructor Detail |
|---|
public StdHierarchicalTableModel(IHierarchicalJaretTableModel hModel,
IHierarchicalTableViewState hvs)
hModel - hierarchical table modelhvs - hierarchical viewstate| Method Detail |
|---|
public boolean moreSiblings(ITableNode node,
int level)
node - nodelevel - level
public ITableNode getNextSibling(ITableNode node)
node - node to get the next sibling for
null if there is nonepublic boolean isVisible(ITableNode node)
node - node to check
public IRow getRow(int rowIdx)
getRow in interface IJaretTableModelrowIdx - index of the row
public int getRowCount()
getRowCount in interface IJaretTableModel
public void nodeAdded(ITableNode parent,
ITableNode newChild)
nodeAdded in interface ITableNodeListenerparent - Parent of the new node.newChild - the new node.
public void nodeRemoved(ITableNode parent,
ITableNode removedChild)
nodeRemoved in interface ITableNodeListenerparent - parent of the removed node.removedChild - the removed node.public void nodeExpanded(ITableNode node)
nodeExpanded in interface IHierarchicalTableViewStateListenernode - node that has been expanded.public void nodeFolded(ITableNode node)
nodeFolded in interface IHierarchicalTableViewStateListenernode - node that had been foldedpublic int getColumnCount()
getColumnCount in interface IJaretTableModelpublic IColumn getColumn(int idx)
getColumn in interface IJaretTableModelidx - index of the column to retrieve
public void addColumn(IColumn column)
addColumn in interface IJaretTableModelcolumn - column to addpublic boolean getExcludeRootNode()
public void setExcludeRootNode(boolean excludeRootNode)
excludeRootNode - true to hide the root nodepublic void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||