org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel
Class OjbMetaIndexDescriptorNode

java.lang.Object
  extended byorg.apache.ojb.tools.mapping.reversedb2.propertyEditors.EditableTreeNodeWithProperties
      extended byorg.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaTreeNode
          extended byorg.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaIndexDescriptorNode
All Implemented Interfaces:
ActionTarget, java.lang.Comparable, PropertyEditorTarget, java.io.Serializable, javax.swing.tree.TreeNode

public class OjbMetaIndexDescriptorNode
extends OjbMetaTreeNode

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaTreeNode
alChildren
 
Fields inherited from class org.apache.ojb.tools.mapping.reversedb2.propertyEditors.EditableTreeNodeWithProperties
propertyChangeDelegate
 
Constructor Summary
OjbMetaIndexDescriptorNode(DescriptorRepository pRepository, OjbMetaDataTreeModel pTreeModel, OjbMetaTreeNode pparent, IndexDescriptor pIndexDescriptor)
          Constructor for OjbMetaCollectionDescriptorNode
 
Method Summary
protected  boolean _load()
          Purpose of this method is to fill the children of the node.
 boolean actionListCachable()
          Some objects may alter the list of actions they present depending on the state they are in.
 boolean actionListStatic()
          Some objects may return a list of actions depending on the state they are in or the way they have been created.
 java.util.Iterator getActions()
          Get a bunch of java.util.Action objects that this object wants to offer in a context-menu.
 boolean getAllowsChildren()
           
 java.lang.Object getAssociatedDescriptor()
          Return the descriptor object this node is associated with.
 java.lang.Object getAttribute(java.lang.String strKey)
          Get an attribute of this node as Object.
 java.lang.Class getPropertyEditorClass()
          Return the property editor class for this PropertyEditorTarget.
 boolean isLeaf()
           
 void setAttribute(java.lang.String strKey, java.lang.Object value)
          Set an attribute of this node as Object.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaTreeNode
children, compareTo, getChildAt, getChildCount, getIndex, getOjbMetaTreeModel, getParent, getRepository, load
 
Methods inherited from class org.apache.ojb.tools.mapping.reversedb2.propertyEditors.EditableTreeNodeWithProperties
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OjbMetaIndexDescriptorNode

public OjbMetaIndexDescriptorNode(DescriptorRepository pRepository,
                                  OjbMetaDataTreeModel pTreeModel,
                                  OjbMetaTreeNode pparent,
                                  IndexDescriptor pIndexDescriptor)
Constructor for OjbMetaCollectionDescriptorNode

Method Detail

_load

protected boolean _load()
Description copied from class: OjbMetaTreeNode
Purpose of this method is to fill the children of the node. It should replace all children in alChildren (the arraylist containing the children) of this node and notify the TreeModel that a change has occurred.

Specified by:
_load in class OjbMetaTreeNode
See Also:
OjbMetaTreeNode._load()

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface javax.swing.tree.TreeNode
Specified by:
isLeaf in class OjbMetaTreeNode
See Also:
OjbMetaTreeNode.isLeaf()

getAllowsChildren

public boolean getAllowsChildren()
Specified by:
getAllowsChildren in interface javax.swing.tree.TreeNode
Specified by:
getAllowsChildren in class OjbMetaTreeNode
See Also:
OjbMetaTreeNode.getAllowsChildren()

setAttribute

public void setAttribute(java.lang.String strKey,
                         java.lang.Object value)
Description copied from class: EditableTreeNodeWithProperties
Set an attribute of this node as Object. This method is backed by a HashMap, so all rules of HashMap apply to this method. Fires a PropertyChangeEvent.

Specified by:
setAttribute in interface PropertyEditorTarget
Overrides:
setAttribute in class EditableTreeNodeWithProperties
See Also:
EditableTreeNodeWithProperties.setAttribute(String, Object)

getAttribute

public java.lang.Object getAttribute(java.lang.String strKey)
Description copied from class: EditableTreeNodeWithProperties
Get an attribute of this node as Object. This method is backed by a HashMap, so all rules of HashMap apply to this method.

Specified by:
getAttribute in interface PropertyEditorTarget
Overrides:
getAttribute in class EditableTreeNodeWithProperties
See Also:
EditableTreeNodeWithProperties.getAttribute(String)

getPropertyEditorClass

public java.lang.Class getPropertyEditorClass()
Description copied from interface: PropertyEditorTarget
Return the property editor class for this PropertyEditorTarget. Depending on the GUI implementation this could for example be an extension of JPanel. The Property editor is responsible for the layout, so the property editor has to know which properties this target has.

See Also:
PropertyEditorTarget#getPropertyEditorClass()

toString

public java.lang.String toString()

getActions

public java.util.Iterator getActions()
Description copied from interface: ActionTarget
Get a bunch of java.util.Action objects that this object wants to offer in a context-menu.

Returns:
an Iterator containing all the actions.
See Also:
ActionTarget#getActions()

actionListCachable

public boolean actionListCachable()
Description copied from interface: ActionTarget
Some objects may alter the list of actions they present depending on the state they are in. If this method returns true, the list of actions can be cached (i.e. the resulting GUI object can be cached and doesn't have to be regenerated all the time)

Returns:
true if the result of getActions() may be cached.
See Also:
ActionTarget#actionListCacheable()

actionListStatic

public boolean actionListStatic()
Description copied from interface: ActionTarget
Some objects may return a list of actions depending on the state they are in or the way they have been created. Others always return the same list of actions without any dependency on the state. If this is the case, this method should return true. Other objects may cache the list of actions and the depending GUI objects on a per-class basis instead of a per-object basis. If this method returns true, actionListCacheable has to return true as well, otherwise it would not make any sense to cache the information here.


getAssociatedDescriptor

public java.lang.Object getAssociatedDescriptor()
Return the descriptor object this node is associated with. E.g. if the node displays a class descriptor, the ClassDescriptor describing the class should be returned. Used for creating a Transferable.

Specified by:
getAssociatedDescriptor in class OjbMetaTreeNode


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14