de.grogra.pf.ui.tree
Class RegistryAdapter

java.lang.Object
  extended by de.grogra.pf.ui.tree.RegistryAdapter
All Implemented Interfaces:
RegistryContext, UINodeHandler, UITree, Disposable, javax.swing.tree.TreeModel

public class RegistryAdapter
extends java.lang.Object
implements UITree, RegistryContext


Field Summary
 
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
RegistryAdapter(Context context)
           
RegistryAdapter(Context context, Registry registry)
           
 
Method Summary
 void addTreeModelListener(javax.swing.event.TreeModelListener listener)
           
 void dispose()
           
 void eventOccured(java.lang.Object node, java.util.EventObject event)
           
 java.lang.Object getChild(java.lang.Object parent, int index)
           
 int getChildCount(java.lang.Object parent)
           
 Context getContext()
           
 java.lang.Object getDescription(java.lang.Object node, java.lang.String type)
           
 int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
           
 java.lang.String getName(java.lang.Object node)
           
 java.lang.Object getParent(java.lang.Object child)
           
 Registry getRegistry()
          Returns the Registry which is linked with this instance.
 java.lang.Object getRoot()
           
 int getType(java.lang.Object node)
           
 java.lang.Object invoke(java.lang.Object node, java.lang.String method, java.lang.Object arg)
           
 boolean isAvailable(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 removeTreeModelListener(javax.swing.event.TreeModelListener listener)
           
 java.lang.Object resolveLink(java.lang.Object node)
           
 void update()
           
 void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistryAdapter

public RegistryAdapter(Context context)

RegistryAdapter

public RegistryAdapter(Context context,
                       Registry registry)
Method Detail

addTreeModelListener

public void addTreeModelListener(javax.swing.event.TreeModelListener listener)
Specified by:
addTreeModelListener in interface javax.swing.tree.TreeModel

dispose

public void dispose()
Specified by:
dispose in interface Disposable

eventOccured

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

getChild

public java.lang.Object getChild(java.lang.Object parent,
                                 int index)
Specified by:
getChild in interface javax.swing.tree.TreeModel

getChildCount

public int getChildCount(java.lang.Object parent)
Specified by:
getChildCount in interface javax.swing.tree.TreeModel

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

getIndexOfChild

public int getIndexOfChild(java.lang.Object parent,
                           java.lang.Object child)
Specified by:
getIndexOfChild in interface javax.swing.tree.TreeModel

getName

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

getParent

public java.lang.Object getParent(java.lang.Object child)
Specified by:
getParent in interface UITree

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

getRoot

public java.lang.Object getRoot()
Specified by:
getRoot in interface javax.swing.tree.TreeModel

getType

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

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

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

nodesEqual

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

removeTreeModelListener

public void removeTreeModelListener(javax.swing.event.TreeModelListener listener)
Specified by:
removeTreeModelListener in interface javax.swing.tree.TreeModel

resolveLink

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

update

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

valueForPathChanged

public void valueForPathChanged(javax.swing.tree.TreePath path,
                                java.lang.Object newValue)
Specified by:
valueForPathChanged in interface javax.swing.tree.TreeModel