com.photoviewer.client.ui
Class TreeManager
java.lang.Object
com.photoviewer.client.ui.TreeManager
- public class TreeManager
- extends java.lang.Object
TreeManager's responsibilities are to build the directory tree from the
FileObject (DOM-like) tree. It must be able to build a Date-ordered tree
as well from this same FileObject directory tree (created from directory.zip).
- Author:
- John De Regnaucourt
Method Summary |
void |
build(int mode)
Build the tree either sorted by category (natural directory order) or by date. |
java.util.Vector |
getFilesForSelectedNode()
|
int |
getMode()
|
void |
nodeSelected()
Handle the event when a user clicks on a tree node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DATE
public static final int DATE
- See Also:
- Constant Field Values
CATEGORY
public static final int CATEGORY
- See Also:
- Constant Field Values
TreeManager
public TreeManager(PhotoViewer thinlet,
ThumbManager thumbMgr,
FileObject root)
- Constructor
- Parameters:
thinlet
- Thinlet reference to make Thinlet API availableroot
- FileObject root of the 'xml' directory tree
build
public void build(int mode)
- Build the tree either sorted by category (natural directory order) or by date.
- Parameters:
mode
- int flag indicating CATEGORY or DATE.
getFilesForSelectedNode
public java.util.Vector getFilesForSelectedNode()
- Returns:
- a Vector of FileObjects that are direct m_children of the selected node.
getMode
public int getMode()
- Returns:
- int CATEGORY or DATE indicating the mode that the tree is reflecting
nodeSelected
public void nodeSelected()
- Handle the event when a user clicks on a tree node. The contained files should be
displayed, and the "current image" should be the 1st in the list (the user has not yet
picked one in the list.) This allows the user to go to screen or full-screen mode on the
first image in the list.