|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.tree.DefaultMutableTreeNode | +--org.objectweb.jac.aspects.gui.AbstractNode | +--org.objectweb.jac.aspects.gui.ObjectNode
This class represents a tree node for an object.
Field Summary |
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Constructor Summary | |
ObjectNode(TreeView model,
Object value,
Object substance,
FieldItem relation,
boolean showRelations)
Constructor. |
Method Summary | |
int |
addNode(ObjectNode node)
Insert a node at the correct place (considering sorting) |
void |
fieldUpdated(Object substance,
FieldItem collection,
Object value,
Object param)
Upcalled when a field was modified. |
protected ObjectNode |
findNode(FieldItem relation,
Object userObject)
Find a node in the children. |
FieldItem |
getRelation()
Returns the relation (reference or collection) the substance of the node belongs to. |
Object |
getSubstance()
Returns the substance of this node. |
void |
objectUpdated(Object substance,
Object param)
The callback method. |
void |
onAdd(Object substance,
CollectionItem collection,
Object value,
Object added,
Object param)
Upcalled when an item is added in a collection. |
void |
onChange(Object substance,
CollectionItem collection,
Object value,
Object param)
Upcalled when the collection is changed (with a set or other methods such as clear, removeAll, addAll, ...). |
void |
onRemove(Object substance,
CollectionItem collection,
Object value,
Object removed,
Object param)
Upcalled when an item is removed from a collection. |
protected void |
rebuildData()
Rebuild the data of this node again. |
void |
removeAllChildren()
|
String |
toString()
|
void |
unregisterEvents()
Unregisters from the events this node is notified. |
void |
updateChildren()
|
Methods inherited from class org.objectweb.jac.aspects.gui.AbstractNode |
areChildrenUptodate, getIcon, getText, getToolTip, isLeaf, setChildrenUptodate, setLeaf, setModel, setParent |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ObjectNode(TreeView model, Object value, Object substance, FieldItem relation, boolean showRelations)
model
- the tree modelto notify when changes occurvalue
- the value that the node representssubstance
- the owner of the relationrelation
- the relation the value is part ofMethod Detail |
public int addNode(ObjectNode node)
node
- the node to insert
public void removeAllChildren()
removeAllChildren
in class DefaultMutableTreeNode
public FieldItem getRelation()
public Object getSubstance()
protected void rebuildData()
public void unregisterEvents()
unregisterEvents
in class AbstractNode
protected ObjectNode findNode(FieldItem relation, Object userObject)
relation
- the relation the requested node must be part ofuserObject
- the userObject value the requested node must have
public void objectUpdated(Object substance, Object param)
ObjectUpdate
objectUpdated
in interface ObjectUpdate
substance
- the updated objectparam
- extra dataViewControlWrapper.registerObject(Wrappee,ObjectUpdate,Object)
public void fieldUpdated(Object substance, FieldItem collection, Object value, Object param)
FieldUpdate
fieldUpdated
in interface FieldUpdate
substance
- the object of which a field was updatedcollection
- the updated fieldvalue
- new value of the vieldparam
- extra infos (unused)ViewControlWrapper.registerField(Wrappee,FieldItem,FieldUpdate,Object)
public void onChange(Object substance, CollectionItem collection, Object value, Object param)
CollectionUpdate
onChange
in interface CollectionUpdate
substance
- the object of which a field was updatedcollection
- the updated collectionvalue
- the new collectionparam
- extra dataViewControlWrapper.registerCollection(Wrappee,CollectionItem,CollectionUpdate,Object)
public void onAdd(Object substance, CollectionItem collection, Object value, Object added, Object param)
CollectionUpdate
onAdd
in interface CollectionUpdate
substance
- the object of which a collection was updatedcollection
- the updated collectionvalue
- the collection's valueadded
- the value added to the collectionparam
- extra data (e.g. index)ViewControlWrapper.registerCollection(Wrappee,CollectionItem,CollectionUpdate,Object)
public void onRemove(Object substance, CollectionItem collection, Object value, Object removed, Object param)
CollectionUpdate
onRemove
in interface CollectionUpdate
substance
- the object of which a collection was updatedcollection
- the updated collectionvalue
- the collection's valueremoved
- the removed itemparam
- extra data (e.g. index)ViewControlWrapper.registerCollection(Wrappee,CollectionItem,CollectionUpdate,Object)
public void updateChildren()
public String toString()
toString
in class DefaultMutableTreeNode
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |