|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.jaspira.propertybrowser.nodes.AbstractNode
public abstract class AbstractNode
Base class for all nodes of the property browser tree.
| Field Summary | |
|---|---|
protected java.util.Vector |
children
Vector containing all the sibling nodes. |
protected java.lang.Object |
object
The object for which this node will display a property. |
protected AbstractNode |
parentNode
The parent node to this node. |
protected PropertyBrowserImpl |
propertyBrowser
Property browser |
| Fields inherited from interface org.openbp.common.generic.Copyable |
|---|
COPY_DEEP, COPY_FIRST_LEVEL, COPY_SHALLOW |
| Constructor Summary | |
|---|---|
AbstractNode()
Default Constructor |
|
| Method Summary | |
|---|---|
protected void |
add(AbstractNode node)
Adds a new AbstractNode to the receiver node. |
protected void |
add(int index,
AbstractNode node)
Adds a new AbstractNode to the receiver node. |
java.util.Enumeration |
children()
Returns the children of the receiver as an Enumeration. |
java.lang.Object |
clone()
Clones this node and all its child nodes, thus performing a deep clone. |
void |
copyFrom(java.lang.Object source,
int copyMode)
Copies the values of the source object to this object. |
void |
filterPropertyNodes(java.lang.String[] visibleMembers)
Filters out (removes) all property nodes from the property nodes below this node that do not match one of the specified properties. |
AbstractNode |
findNodeForProperty(java.lang.String propertyName)
Finds the specified node. |
boolean |
getAllowsChildren()
Returns true if the receiver allows children. |
CollectionNode |
getAssociatedCollectionNode()
Gets the collection descriptor node that is directly associated with this node. |
javax.swing.tree.TreeNode |
getChildAt(int childIndex)
Returns the child TreeNode at index childIndex. |
int |
getChildCount()
Returns the number of children TreeNodes the receiver contains. |
int |
getIndex(javax.swing.tree.TreeNode node)
Returns the index of node in the receivers children. |
int |
getLastHeight()
Gets the height used last by the JTreeTable for this node. |
java.lang.Object |
getObject()
Gets the object containing the values for the property. |
ObjectNode |
getObjectNode()
Gets the parent object descriptor node of this node. |
javax.swing.tree.TreeNode |
getParent()
Returns the parent TreeNode of the receiver. |
java.awt.Dimension |
getPreferredSize()
Gets the preferred height of the node in the tree. |
PropertyBrowser |
getPropertyBrowser()
Gets the property browser that owns the node. |
java.util.Iterator |
getPropertyNodes()
Creates an iteration over all property nodes below this node. |
boolean |
isLeaf()
Returns true if the receiver is a leaf. |
void |
reload()
Reloads the content of this node. |
void |
reloadProperty(java.lang.String propertyName)
Forces a reload of a particular property from the modified object and redisplays the specified property. |
void |
remove()
Removes this node from the structure. |
boolean |
representsProperty(java.lang.String propertyName)
Checks if this node represents the given property. |
void |
setLastHeight(int height)
Sets the current height being used by the JTreeTable for later use. |
void |
setObject(java.lang.Object object)
Sets the object containing the values for the porperty. |
void |
setParent(AbstractNode node)
Sets the parent tree node of this node. |
void |
setPropertyBrowser(PropertyBrowserImpl propertyBrowser)
Sets the property browser that owns the node. |
boolean |
shouldExpand()
Checks if the node node should be expanded on initial display. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openbp.swing.components.treetable.TreeTableNode |
|---|
getColumnValue, getNodeText |
| Field Detail |
|---|
protected java.util.Vector children
protected AbstractNode parentNode
protected java.lang.Object object
protected PropertyBrowserImpl propertyBrowser
| Constructor Detail |
|---|
public AbstractNode()
| Method Detail |
|---|
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface Copyableclone in class java.lang.Objectjava.lang.CloneNotSupportedException
public void copyFrom(java.lang.Object source,
int copyMode)
throws java.lang.CloneNotSupportedException
copyFrom in interface Copyablesource - The source object. Must be of the same type as this object.copyMode - Determines if a deep copy, a first level copy or a shallow copy is to be
performed. See the constants of the org.openbp.common.generic.description.Copyable class.
java.lang.CloneNotSupportedException - If the cloning of one of the contained objects failedpublic void reload()
public boolean representsProperty(java.lang.String propertyName)
propertyName - Name of the property to checkpublic void remove()
public AbstractNode findNodeForProperty(java.lang.String propertyName)
propertyName - This may specifiy:PropertyNodeCollectionNodeObjectNode
public void reloadProperty(java.lang.String propertyName)
propertyName - Property namepublic void filterPropertyNodes(java.lang.String[] visibleMembers)
visibleMembers - Array of allowed property namespublic int getLastHeight()
JTreeTable for this node.
getLastHeight in interface TreeTableNodepublic void setLastHeight(int height)
JTreeTable for later use.
setLastHeight in interface TreeTableNodeheight - The height being usedpublic java.awt.Dimension getPreferredSize()
getPreferredSize in interface TreeTableNodepublic boolean isLeaf()
isLeaf in interface javax.swing.tree.TreeNodepublic javax.swing.tree.TreeNode getChildAt(int childIndex)
getChildAt in interface javax.swing.tree.TreeNodepublic int getChildCount()
getChildCount in interface javax.swing.tree.TreeNodepublic javax.swing.tree.TreeNode getParent()
getParent in interface javax.swing.tree.TreeNodepublic int getIndex(javax.swing.tree.TreeNode node)
getIndex in interface javax.swing.tree.TreeNodepublic boolean getAllowsChildren()
getAllowsChildren in interface javax.swing.tree.TreeNodepublic java.util.Enumeration children()
children in interface javax.swing.tree.TreeNodepublic java.util.Iterator getPropertyNodes()
PropertyNode and CollectionNode objectsObjectNode elements.protected void add(AbstractNode node)
node - The node to be added
protected void add(int index,
AbstractNode node)
node - The node to be addedindex - The index where the node is to be addedpublic void setParent(AbstractNode node)
node - The new parentpublic boolean shouldExpand()
public ObjectNode getObjectNode()
public CollectionNode getAssociatedCollectionNode()
public void setObject(java.lang.Object object)
object - The object to be setpublic java.lang.Object getObject()
public void setPropertyBrowser(PropertyBrowserImpl propertyBrowser)
propertyBrowser - The object to be setpublic PropertyBrowser getPropertyBrowser()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||