All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----java.awt.Component | +----java.awt.Container | +----java.awt.Panel | +----de.unikl.AWTNode.cfContainer | +----de.unikl.AWTNode.NodeContainer | +----de.unikl.AWTNode.RescanNode
Assume you have a directory tree view. If you look at the files it is clear that they can be deleted or renamed but if they are stored in your tree and you delete the correspondig file on the harddisk the tree is not updated! Thus there must be a mechanism which can be used do update a tree, or better to re-create a tree.
To achieve this goal you can use the new Variable [lRescan]:
Each time you "open" the NodeContainer (this means the state of the checkbox changes from true to false) the Object checks whether the variable lRescan is true or not. If lRescan is true, this means that the node should be updated and theObject calls the method Rescan.
the default in the method Rescan is : do nothing As an example a fairly simple implementation for a Directory would do the following steps:
simpliest solution
1. remove all sons of this node
2. re-read the directory
3. insert all the sons in the directoy to the current node
(this solution is simple and slow)
public RescanNode(Component desc)
public void setState(boolean check)
public void Rescan()
public boolean getRescan()
public void setRescan(boolean lRescan)
All Packages Class Hierarchy This Package Previous Next Index