All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface org.jcon.core.part.Cell

public interface Cell
extends NodeUser, Replicatable
This interface represents a cell in a living organism, which in UHR is a container in a System Tree. A Cell holds zero or more Nodes, each of which may be a Cell or leaf.

Responsiblities are to manage the collection of nodes with the option of events. The nodes are maintained in the order added, allowing the designer to better organize the System Tree.


Method Index

 o appendNode(Node)
Appends the node after the last index.
 o enumerateNodeNames()
Returns an Enumeration of all node names in the cell, in order.
 o findPart(String)
Finds and returns the named part.
 o getCellNode()
Returns the node this cell is in.
 o getNode(String)
Returns the named node in this cell or null if not found.
 o getNodeCount()
Returns the number of nodes in the cell.
 o getPart(String)
Returns the named part in this cell or null if not found.
 o insertNodeBefore(Node, Node)
Inserts the node before the nodeBefore, which must be in the Cell.
 o removeAll()
Removes all nodes from the Cell.
 o removeNode(Node)
Removes the node.

Methods

 o appendNode
 public abstract void appendNode(Node node)
Appends the node after the last index. Throws an IllegalStateException if the node has a duplicate name.

Parameters:
node - the node to append.
 o insertNodeBefore
 public abstract void insertNodeBefore(Node node,
                                       Node nodeBefore)
Inserts the node before the nodeBefore, which must be in the Cell. Throws an IllegalStateException if the nodeBefore is not found or the node has a duplicate name.

Parameters:
node - the node to insert.
nodeBefore - the node to insert before.
 o removeAll
 public abstract void removeAll()
Removes all nodes from the Cell.

 o removeNode
 public abstract Node removeNode(Node node)
Removes the node. Returns the node removed or null if none.

Parameters:
node - the node to remove.
 o getNodeCount
 public abstract int getNodeCount()
Returns the number of nodes in the cell. We use the Bean Spec method name style rather than size().

Returns:
the number of nodes in the cell.
 o enumerateNodeNames
 public abstract Enumeration enumerateNodeNames()
Returns an Enumeration of all node names in the cell, in order.

Returns:
the node names in thr cell.
 o getNode
 public abstract Node getNode(String nodeName)
Returns the named node in this cell or null if not found.

Parameters:
nodeName - the name of the node to retrieve.
Returns:
the node with the nodeName or null if not found..
 o getCellNode
 public abstract Node getCellNode()
Returns the node this cell is in.

Returns:
the node this cell is in.
 o getPart
 public abstract Object getPart(String partName)
Returns the named part in this cell or null if not found.

Parameters:
partName - the name of the part to retrieve.
Returns:
the part with the partName or null if not found.
 o findPart
 public abstract Object findPart(String partName)
Finds and returns the named part. See full documentation.

Parameters:
partName - the name of the part to find.
Returns:
the part with the partName.

All Packages  Class Hierarchy  This Package  Previous  Next  Index