|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemath.author.toc.ASyncTreeNodeDecorator
public class ASyncTreeNodeDecorator
This class implements a background engine that asynchronously fetches the decoration for the tree-nodes (currently title and type) and notifies the tree when the decoration is written to.
| Field Summary | |
|---|---|
protected static boolean |
DEBUG
|
protected static org.apache.commons.logging.Log |
log
|
| Constructor Summary | |
|---|---|
ASyncTreeNodeDecorator(TreeModel treeModel,
MBaseRef mbaseRef)
Starts operating and listens toe the tree-model events. |
|
| Method Summary | |
|---|---|
void |
addNodeToDecorate(OJref refElt,
TreePath path)
To be called when needing to explicitly set the node to updated. |
void |
checkWholeTree()
|
void |
treeNodesChanged(TreeModelEvent e)
Calls #addNoteToDecorate for all nodes that are updated and that contain a null
info. |
void |
treeNodesInserted(TreeModelEvent e)
Calls #addNoteToDecorate for all nodes that are updated and that contain a null
info. |
void |
treeNodesRemoved(TreeModelEvent e)
Does nothing. |
void |
treeStructureChanged(TreeModelEvent e)
Calls #addNoteToDecorate for all nodes children of the root change that contain a
null info in their OJref. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.commons.logging.Log log
protected static final boolean DEBUG
| Constructor Detail |
|---|
public ASyncTreeNodeDecorator(TreeModel treeModel,
MBaseRef mbaseRef)
treeModel - The model to listen to eventsmbaseRef - The mbase to extract information from| Method Detail |
|---|
public void treeNodesChanged(TreeModelEvent e)
#addNoteToDecorate for all nodes that are updated and that contain a null
info.
treeNodesChanged in interface TreeModelListenere - The change-event from which all paths are extractedpublic void treeNodesInserted(TreeModelEvent e)
#addNoteToDecorate for all nodes that are updated and that contain a null
info.
treeNodesInserted in interface TreeModelListenere - The change-event from which all paths are extractedpublic void treeNodesRemoved(TreeModelEvent e)
treeNodesRemoved in interface TreeModelListenere - The change-event from which all paths are extractedpublic void treeStructureChanged(TreeModelEvent e)
#addNoteToDecorate for all nodes children of the root change that contain a
null info in their OJref.
treeStructureChanged in interface TreeModelListenere - The change-event from which all paths are extractedpublic void checkWholeTree()
public void addNodeToDecorate(OJref refElt,
TreePath path)
refElt - the user-object of the node from which to extract the ID and where the OJElement.setInfo(java.lang.Object) will be called setting as result a Hashtable with keys type
(the result of MBaseRef.getTypeString(org.activemath.abstractcontent.MBaseID)) and titles for the result of MBaseRef.getTypeString(org.activemath.abstractcontent.MBaseID).path - the path allowing us to build the events
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||