|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jaret.util.ui.timebars.model.AbstractTimeBarModel
de.jaret.util.ui.timebars.model.StdHierarchicalTimeBarModel
public class StdHierarchicalTimeBarModel
An implementation of of a "normal" TimeBarModel based on a hierarchical model and a viewstate. Intended for internal use when using a hierarchical model. MAYBE Filter some of the events out of the node for visibility (will not hurt if not ...)
| Field Summary | |
|---|---|
protected boolean |
_hideRoot
if set to true the roor node will be seen expanded and will not be represented by a row. |
protected HierarchicalTimeBarModel |
_hModel
the underlying hierarchical model. |
protected HierarchicalViewState |
_hvs
hierarchical viewstate holding the folded/unfolded information. |
protected java.util.List<TimeBarNode> |
_rows
list of timebar nodes (that are the rows of the model). |
| Fields inherited from class de.jaret.util.ui.timebars.model.AbstractTimeBarModel |
|---|
_listenerList, _maxDate, _minDate |
| Constructor Summary | |
|---|---|
StdHierarchicalTimeBarModel(HierarchicalTimeBarModel hModel,
HierarchicalViewState hvs)
Construct a new model. |
|
| Method Summary | |
|---|---|
boolean |
getHideRoot()
Retrieve whether the root node is included in the outgoing model. |
TimeBarNode |
getNextSibling(TimeBarNode node)
Retrieve the next sibling of a given node. |
TimeBarRow |
getRow(int rowIdx)
Return the row for the given index. |
int |
getRowCount()
Get the number of rows in the model. |
boolean |
moreSiblings(TimeBarNode node,
int level)
Check whether there are sibling nodes for a given node on a specified level. |
void |
nodeAdded(TimeBarNode parent,
TimeBarNode newChild)
Called when a node has been added. |
void |
nodeExpanded(TimeBarNode node)
Handle expansion of a node. |
int |
nodeExpanded2(TimeBarNode node)
Handle expansion of a node. |
void |
nodeFolded(TimeBarNode node)
Handle folding of a node. |
void |
nodeRemoved(TimeBarNode parent,
TimeBarNode removedChild)
Called whenever a node is removed. |
void |
setHideRoot(boolean hideRoot)
Set whether the root node should be represented in the flat outgoing model. |
| Methods inherited from class de.jaret.util.ui.timebars.model.AbstractTimeBarModel |
|---|
addTimeBarModelListener, elementAdded, elementChanged, elementRemoved, fireElementAdded, fireElementChanged, fireElementRemoved, fireHeaderChanged, fireModelDataChanged, fireRowAdded, fireRowDataChanged, fireRowRemoved, getMaxDate, getMinDate, getRowForInterval, headerChanged, remTimeBarModelListener, rowDataChanged, updateMinMax |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.jaret.util.ui.timebars.model.TimeBarRowListener |
|---|
elementAdded, elementChanged, elementRemoved, headerChanged, rowDataChanged |
| Field Detail |
|---|
protected java.util.List<TimeBarNode> _rows
protected HierarchicalTimeBarModel _hModel
protected HierarchicalViewState _hvs
protected boolean _hideRoot
| Constructor Detail |
|---|
public StdHierarchicalTimeBarModel(HierarchicalTimeBarModel hModel,
HierarchicalViewState hvs)
hModel - hierachical modelhvs - hierarchical viewstate| Method Detail |
|---|
public boolean moreSiblings(TimeBarNode node,
int level)
node - node to checklevel - level
public TimeBarNode getNextSibling(TimeBarNode node)
node - node to search sibling for
public TimeBarRow getRow(int rowIdx)
getRow in interface TimeBarModelrowIdx - index of the row
public int getRowCount()
getRowCount in interface TimeBarModel
public void nodeAdded(TimeBarNode parent,
TimeBarNode newChild)
nodeAdded in interface TimeBarNodeListenerparent - Parent of the new node.newChild - the new node.
public void nodeRemoved(TimeBarNode parent,
TimeBarNode removedChild)
nodeRemoved in interface TimeBarNodeListenerparent - parent of the removed node.removedChild - the removed node.public void nodeExpanded(TimeBarNode node)
nodeExpanded in interface HierarchicalViewStateListenernode - the has been expandedpublic int nodeExpanded2(TimeBarNode node)
node - the has been expanded
public void nodeFolded(TimeBarNode node)
nodeFolded in interface HierarchicalViewStateListenernode - node that has been foldedpublic boolean getHideRoot()
true when the root node is included in the resulting flat modelpublic void setHideRoot(boolean hideRoot)
hideRoot - set to true if the root node should not be included in the outgoing flat model
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||