com.imagero.swing.tree.handler
Interface Handler

All Known Implementing Classes:
FileHandler, HTTPHandler, URLFileHandler, com.imagero.swing.tree.handler.ZipHandler

public interface Handler

HTreeNode delegates work to Handler.
Handler can populate and refresh HTreeNode's chiidren
Such important things as isLeaf(), getAllowsChildren() and toString() also delegated to Handler.
HandlerFactory is used to get proper Handler for HTreeNode content.
Handler should register itself by HandlerFactory.
To determine if particular Handler can handle supplied Object, HandlerFactory calls Handler's method canHandle(Object o). If HandlerFactory finds more then 1 Handler, then method isGeneric() used to determine which Handler should be used. For example for *.zip file FileHandler and FileZipHandler returns true from canHandle(), however FileHandler is generic and so FileZipHandler is choosed by HandlerFactory


Method Summary
 boolean canHandle(java.lang.Object o)
           
 boolean getAllowsChildren(HTreeNode node)
           
 TreeNodeComparator getComparator()
           
 boolean isGeneric()
           
 boolean isLeaf(HTreeNode node)
           
 boolean populateChildren(HTreeNode node, boolean descend, boolean refreshNodes)
           
 java.lang.String toString(HTreeNode node)
           
 

Method Detail

populateChildren

public boolean populateChildren(HTreeNode node,
                                boolean descend,
                                boolean refreshNodes)
                         throws java.io.IOException
Throws:
java.io.IOException

getAllowsChildren

public boolean getAllowsChildren(HTreeNode node)

isLeaf

public boolean isLeaf(HTreeNode node)

toString

public java.lang.String toString(HTreeNode node)

canHandle

public boolean canHandle(java.lang.Object o)

isGeneric

public boolean isGeneric()

getComparator

public TreeNodeComparator getComparator()