org.PingOO.DLAI.lib.directorytree
Class DirectoryLeaf

java.lang.Object
  |
  +--javax.swing.tree.DefaultMutableTreeNode
        |
        +--org.PingOO.DLAI.lib.directorytree.DirectoryComponent
              |
              +--org.PingOO.DLAI.lib.directorytree.DirectoryLeaf
Direct Known Subclasses:
AliasLeaf, SheetLeaf

public abstract class DirectoryLeaf
extends DirectoryComponent

Defines the component used to describe a leaf in the directory.

Since:
PingOO 2.0
Version:
2.0
Author:
Fabrice Bouyé (bouye@cur-archamps.fr)
See Also:
Serialized Form

Inner classes inherited from class javax.swing.tree.DefaultMutableTreeNode
javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration, javax.swing.tree.DefaultMutableTreeNode.PathBetweenNodesEnumeration, javax.swing.tree.DefaultMutableTreeNode.PostorderEnumeration, javax.swing.tree.DefaultMutableTreeNode.PreorderEnumeration
 
Fields inherited from class org.PingOO.DLAI.lib.directorytree.DirectoryComponent
accessTable, attributeVector, CREATION_DATE_KEY, DESCRIPTION_KEY, DN_SEPAPATOR, EMPTY_ARRAY_ATTRIBUTE, EXPIRATION_DATE_KEY, exportationTable, FIELD_SEPAPATOR, ICON_KEY, labelTable, MODIFICATION_DATE_KEY, modified, OBJECT_CLASS_KEY, PROGRAM_KEY, requiredVector, RESOURCE_KEY, upToDate, valueTable
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
DirectoryLeaf(java.lang.String name, java.lang.String type)
          Creates a new leaf.
 
Method Summary
 void add(DirectoryComponent newChild)
          Prevents form inserting another component inside the leaf.
 java.util.Enumeration children(boolean recursiveSearch)
          Returns the list of all child of the same class this node allows.
 java.util.Enumeration children(java.lang.Class objectClass)
          Returns the list of all child of the same class this node allows.
 java.util.Enumeration children(java.lang.Class objectClass, boolean recursiveSearch)
          Returns the list of all child of the same class this node allows.
 boolean getAllowsChildren()
          Returns true if the receiver allows children.
 void insert(javax.swing.tree.MutableTreeNode newChild, int childIndex)
          Removes newChild from its present parent (if it has a parent), sets the child's parent to this node, and then adds the child to this node's child array at index childIndex.newChild must not be null and must not be an ancestor of this node.
 boolean isLeaf()
          Returns true if the receiver is a leaf.
 void setAllowsChildren(boolean allows)
          Determines whether or not this node is allowed to have children.
 
Methods inherited from class org.PingOO.DLAI.lib.directorytree.DirectoryComponent
add, attributes, getAccessValue, getAccessValues, getAttributeLabel, getAttributeTextKeys, getAttributeValue, getAttributeValues, getDN, getExportationValue, getName, getNewDN, getRDN, getType, hasRequiredAttributes, isAccessible, isModified, isUpToDate, prepareMessage, remove, requiredAttributes, setAccessValue, setAccessValues, setAccessValues, setAttributeValue, setAttributeValues, setAttributeValues, setDefaultAccess, setDefaultExportation, setExportationValue, setModified, setName, setUpToDate
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, readObject, remove, removeAllChildren, removeFromParent, setParent, setUserObject, toString, writeObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Constructor Detail

DirectoryLeaf

public DirectoryLeaf(java.lang.String name,
                     java.lang.String type)
Creates a new leaf.
Parameters:
name - The name of this leaf.
type - The type of this leaf.
Method Detail

getAllowsChildren

public final boolean getAllowsChildren()
Returns true if the receiver allows children.
Returns:
Allways false.
Overrides:
getAllowsChildren in class javax.swing.tree.DefaultMutableTreeNode

setAllowsChildren

public final void setAllowsChildren(boolean allows)
Determines whether or not this node is allowed to have children.
Does nothing !
Parameters:
allows - true if this node is allowed to have children.
Overrides:
setAllowsChildren in class javax.swing.tree.DefaultMutableTreeNode

isLeaf

public final boolean isLeaf()
Returns true if the receiver is a leaf.
Returns:
Always true.
Overrides:
isLeaf in class javax.swing.tree.DefaultMutableTreeNode

children

public final java.util.Enumeration children(boolean recursiveSearch)
Returns the list of all child of the same class this node allows.
Parameters:
recursiveSearch - If true look for all children under this node.
Overrides:
children in class DirectoryComponent

children

public final java.util.Enumeration children(java.lang.Class objectClass)
Returns the list of all child of the same class this node allows.
Parameters:
objectClass - The class used to filter the children.
Overrides:
children in class DirectoryComponent

children

public final java.util.Enumeration children(java.lang.Class objectClass,
                                            boolean recursiveSearch)
Returns the list of all child of the same class this node allows.
Parameters:
recursiveSearch - If true look for all children under this node.
objectClass - The class used to filter the children.
Overrides:
children in class DirectoryComponent

add

public final void add(DirectoryComponent newChild)
Prevents form inserting another component inside the leaf.
Does nothing !

insert

public void insert(javax.swing.tree.MutableTreeNode newChild,
                   int childIndex)
            throws java.lang.ArrayIndexOutOfBoundsException,
                   java.lang.IllegalArgumentException,
                   java.lang.IllegalStateException
Removes newChild from its present parent (if it has a parent), sets the child's parent to this node, and then adds the child to this node's child array at index childIndex.newChild must not be null and must not be an ancestor of this node.
Parameters:
newChild - The MutableTreeNode to insert under this node.
childIndex - The index in this node's child array where this node is to be inserted.
Throws:
java.lang.ArrayIndexOutOfBoundsException - If childIndex is out of bounds.
java.lang.IllegalArgumentException - If newChild is null or is an ancestor of this node.
java.lang.IllegalStateException - If this node does not allow children.
Overrides:
insert in class DirectoryComponent