de.grogra.pf.ui.tree
Class UITreePipeline

java.lang.Object
  extended by de.grogra.util.TreeModelSupport
      extended by de.grogra.util.Tree
          extended by de.grogra.util.MutableTree
              extended by de.grogra.pf.ui.tree.UITreePipeline
All Implemented Interfaces:
RegistryContext, UINodeHandler, UITree, Disposable, MutableTreeModel, java.util.EventListener, javax.swing.event.TreeModelListener, javax.swing.tree.TreeModel

public class UITreePipeline
extends MutableTree
implements UITree, javax.swing.event.TreeModelListener, RegistryContext


Nested Class Summary
 class UITreePipeline.Node
           
static interface UITreePipeline.Transformer
           
 
Field Summary
 
Fields inherited from class de.grogra.util.Tree
root
 
Fields inherited from class de.grogra.util.TreeModelSupport
NODES_CHANGED, NODES_INSERTED, NODES_REMOVED, STRUCTURE_CHANGED
 
Fields inherited from interface de.grogra.pf.ui.tree.UINodeHandler
ACTION_DELETE, ACTION_OPEN, ACTION_RENAME, ACTION_SELECT, GET_IMMEDIATE_LISTENER_METHOD, GET_SELECTABLE_METHOD, NODE_TYPE_MASK, NT_CHECKBOX_ITEM, NT_CHOICE_GROUP, NT_CHOICE_ITEM, NT_DIRECTORY, NT_DIRECTORY_MASK, NT_FILL, NT_GROUP, NT_ITEM, NT_ITEM_GROUP, NT_LINK, NT_MOUSE_MOTION, NT_SELECTABLE, NT_SEPARATOR, NT_SPECIAL, NT_UNDEFINED
 
Constructor Summary
UITreePipeline()
           
 
Method Summary
 void add(UITreePipeline.Transformer t)
           
 void addTree(UITreePipeline.Node dest, int pos, UITree s, java.lang.Object root, ObjectToBoolean filter, java.util.Comparator comp)
           
protected  void allListenersRemoved()
           
 UITreePipeline.Node copyTree(UITree s, java.lang.Object root, ObjectToBoolean filter)
           
protected  UITreePipeline.Node createInitialTree()
           
 void dispose()
           
protected  void disposeImpl()
           
 void eventOccured(java.lang.Object node, java.util.EventObject event)
           
protected  void firstListenerAdded()
           
 Context getContext()
           
 java.lang.Object getDescription(java.lang.Object node, java.lang.String type)
           
 java.lang.String getName(java.lang.Object node)
           
 java.lang.Object getParameter(java.lang.String key, java.lang.Object defaultValue)
           
 Registry getRegistry()
          Returns the Registry which is linked with this instance.
 UITree getSource()
           
 java.lang.Object getSourceRoot()
           
 int getType(java.lang.Object node)
           
 void initialize(UITree source, java.lang.Object sourceRoot, Map params)
           
 java.lang.Object invoke(java.lang.Object node, java.lang.String method, java.lang.Object arg)
           
 boolean isAvailable(java.lang.Object node)
           
protected  boolean isAvailable(UITree s, java.lang.Object node)
           
 boolean isEnabled(java.lang.Object node)
           
 boolean isLeaf(java.lang.Object node)
           
 boolean nodesEqual(java.lang.Object a, java.lang.Object b)
           
 void remove(UITreePipeline.Transformer t)
           
 java.lang.Object resolveLink(java.lang.Object node)
           
 void treeNodesChanged(javax.swing.event.TreeModelEvent e)
           
 void treeNodesInserted(javax.swing.event.TreeModelEvent e)
           
 void treeNodesRemoved(javax.swing.event.TreeModelEvent e)
           
 void treeStructureChanged(javax.swing.event.TreeModelEvent e)
           
 void update()
           
 
Methods inherited from class de.grogra.util.MutableTree
insert, remove, remove, setRoot, valueForPathChanged
 
Methods inherited from class de.grogra.util.Tree
findFirst, findMax, findMax, getChild, getChildCount, getIndexOfChild, getIndexOfChild, getParent, getRoot, hasValidPath, nodesEqual
 
Methods inherited from class de.grogra.util.TreeModelSupport
addTreeModelListener, clearListeners, fireTreeModelEvent, fireTreeModelEvent, fireTreeModelEvent, fireTreeModelEvent, hasListeners, removeTreeModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.grogra.pf.ui.tree.UITree
getParent
 
Methods inherited from interface javax.swing.tree.TreeModel
addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, removeTreeModelListener, valueForPathChanged
 

Constructor Detail

UITreePipeline

public UITreePipeline()
Method Detail

add

public void add(UITreePipeline.Transformer t)

addTree

public void addTree(UITreePipeline.Node dest,
                    int pos,
                    UITree s,
                    java.lang.Object root,
                    ObjectToBoolean filter,
                    java.util.Comparator comp)

allListenersRemoved

protected void allListenersRemoved()
Overrides:
allListenersRemoved in class TreeModelSupport

copyTree

public UITreePipeline.Node copyTree(UITree s,
                                    java.lang.Object root,
                                    ObjectToBoolean filter)

createInitialTree

protected UITreePipeline.Node createInitialTree()

dispose

public final void dispose()
Specified by:
dispose in interface Disposable
Overrides:
dispose in class MutableTree

disposeImpl

protected void disposeImpl()

eventOccured

public void eventOccured(java.lang.Object node,
                         java.util.EventObject event)
Specified by:
eventOccured in interface UINodeHandler

firstListenerAdded

protected void firstListenerAdded()
Overrides:
firstListenerAdded in class TreeModelSupport

getContext

public Context getContext()
Specified by:
getContext in interface UITree

getDescription

public java.lang.Object getDescription(java.lang.Object node,
                                       java.lang.String type)
Specified by:
getDescription in interface UINodeHandler

getName

public java.lang.String getName(java.lang.Object node)
Specified by:
getName in interface UINodeHandler

getParameter

public java.lang.Object getParameter(java.lang.String key,
                                     java.lang.Object defaultValue)

getRegistry

public Registry getRegistry()
Description copied from interface: RegistryContext
Returns the Registry which is linked with this instance.

Specified by:
getRegistry in interface RegistryContext
Returns:
the registry linked with this instance

getSource

public UITree getSource()

getSourceRoot

public java.lang.Object getSourceRoot()

getType

public int getType(java.lang.Object node)
Specified by:
getType in interface UINodeHandler

initialize

public void initialize(UITree source,
                       java.lang.Object sourceRoot,
                       Map params)

invoke

public java.lang.Object invoke(java.lang.Object node,
                               java.lang.String method,
                               java.lang.Object arg)
Specified by:
invoke in interface UINodeHandler

isAvailable

public boolean isAvailable(java.lang.Object node)
Specified by:
isAvailable in interface UINodeHandler

isAvailable

protected boolean isAvailable(UITree s,
                              java.lang.Object node)

isEnabled

public boolean isEnabled(java.lang.Object node)
Specified by:
isEnabled in interface UINodeHandler

isLeaf

public boolean isLeaf(java.lang.Object node)
Specified by:
isLeaf in interface UINodeHandler
Specified by:
isLeaf in interface javax.swing.tree.TreeModel
Overrides:
isLeaf in class Tree

nodesEqual

public boolean nodesEqual(java.lang.Object a,
                          java.lang.Object b)
Specified by:
nodesEqual in interface UINodeHandler

remove

public void remove(UITreePipeline.Transformer t)

resolveLink

public java.lang.Object resolveLink(java.lang.Object node)
Specified by:
resolveLink in interface UINodeHandler

treeNodesChanged

public void treeNodesChanged(javax.swing.event.TreeModelEvent e)
Specified by:
treeNodesChanged in interface javax.swing.event.TreeModelListener

treeNodesInserted

public void treeNodesInserted(javax.swing.event.TreeModelEvent e)
Specified by:
treeNodesInserted in interface javax.swing.event.TreeModelListener

treeNodesRemoved

public void treeNodesRemoved(javax.swing.event.TreeModelEvent e)
Specified by:
treeNodesRemoved in interface javax.swing.event.TreeModelListener

treeStructureChanged

public void treeStructureChanged(javax.swing.event.TreeModelEvent e)
Specified by:
treeStructureChanged in interface javax.swing.event.TreeModelListener

update

public void update()
Specified by:
update in interface UITree