|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.util.AbstractDisposable | +--gumbo.visualize.data.DataModel | +--gumbo.visualize.data.WholeModel
An abstract data model representing a meaningful and self-consistent set of client data suitable for viewing as a whole. This is an important distinction for view layout and display, where all of a model's parts must be considered together, as a complete set.
A whole model is a node in a "whole model tree", and a root node in a "part model tree". The whole model tree contains nested whole models. The part model tree contains nested part models that make up the whole model. Subclasses of whole and part models can impose restrictions on how the trees can be structured.
Nested Class Summary | |
static class |
WholeModel.GlobalWholeTree
Global tree used for all whole model tree nodes. |
Method Summary | |
protected void |
addPartModel(PartModel child)
Used by subclasses to add a part model as a child in this model's part model tree. |
protected void |
checkAddPartModel(PartModel child)
Safely returns if a part model can be added as a child in this model's part model tree. |
void |
disposeAll()
Like dispose(), but also recursively disposes any child whole models. |
java.util.List |
findAllPartModelSubs(java.util.Collection types,
java.util.List retVal)
Convenience method that calls findPartModelSubs on all descendants in this model's whole model tree. |
java.util.List |
findPartModelSubs(java.util.Collection types,
java.util.List retVal)
Finds descendants in this model's part model tree. |
WholeModel |
findWholeModelRoot()
Convenience method for getting the root in this model's whole model tree. |
java.util.List |
findWholeModelSubs(java.util.Collection types,
java.util.List retVal)
Finds descendants in this model's whole model tree. |
java.util.List |
findWholeModelSupers(java.util.Collection types,
java.util.List retVal)
Finds ancestors in this model's whole model tree. |
abstract PartModelField.EventOut |
getAddedPartModelOut()
Sends the part model after it is added to this whole model. |
Group |
getPartModelChildren()
Gets an immutable view of the children of this model in its part model tree. |
abstract PartModelField.EventOut |
getRemovingPartModelOut()
Sends the part model before it is removed from this whole model. |
Group |
getWholeModelChildren()
Gets an immutable view of the children of this model in its whole model tree. |
WholeModel |
getWholeModelParent()
Gets the parent of this model in its whole model tree. |
protected void |
implDispose()
Disposes part model children (recursively), and then disposes this model. |
protected void |
removePartModel(PartModel child)
Used by subclasses to remove a part model as a child in this model's part model tree, and to dispose it. |
Methods inherited from class gumbo.visualize.data.DataModel |
getClientData, getClientId, initDataModel, setClientData |
Methods inherited from class gumbo.util.AbstractDisposable |
dispose, isDisposed |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public WholeModel getWholeModelParent()
public Group getWholeModelChildren()
public WholeModel findWholeModelRoot()
public java.util.List findWholeModelSupers(java.util.Collection types, java.util.List retVal)
types
- Whole model types (Class) to include. If null, all types
are included (a normal trace).retVal
- Return value object. The models (WholeModel), possibly
including this model. Reflects the relative height of the models
in the lineage. Use a SetList for speed. Never null.
public java.util.List findWholeModelSubs(java.util.Collection types, java.util.List retVal)
types
- Part model types (Class) to include. If null, all types
are included (a normal trace).retVal
- Return value object. The models (WholeModel), possibly
including this model. Reflects the relative depth of the models
in the subtree. Use a SetList for speed. Never null.
public Group getPartModelChildren()
public java.util.List findPartModelSubs(java.util.Collection types, java.util.List retVal)
types
- Part model types (Class) to include. If null, all types
are included (a normal trace).retVal
- Return value object. The models (PartModel), excluding
this model. Reflects the relative depth of the models
in the subtree. Use a SetList for speed. Never null.
public java.util.List findAllPartModelSubs(java.util.Collection types, java.util.List retVal)
types
- Part model types (Class) to include. If null, all types
are included (a normal trace).retVal
- Return value object. The models (PartModel). Reflects
the relative order and depth of the whole and part models in their
subtrees. Use a SetList for speed. Never null.
public void disposeAll()
public abstract PartModelField.EventOut getAddedPartModelOut()
public abstract PartModelField.EventOut getRemovingPartModelOut()
protected void checkAddPartModel(PartModel child)
child
- The potential child model. Never null.
java.lang.IllegalStateException
- This object has been disposed.
java.lang.IllegalArgumentException
- Child is null.protected final void addPartModel(PartModel child)
child
- The model to be added. Never null.
protected final void removePartModel(PartModel child)
child
- The model to be removed. Ignored if null or missing.protected void implDispose()
implDispose
in class DataModel
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |