|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.jaspira.propertybrowser.nodes.AbstractNode
org.openbp.jaspira.propertybrowser.nodes.CollectionNode
public class CollectionNode
Property browser tree node that implements the parent node of a collection member of the object.
| Field Summary |
|---|
| Fields inherited from class org.openbp.jaspira.propertybrowser.nodes.AbstractNode |
|---|
children, object, parentNode, propertyBrowser |
| Fields inherited from interface org.openbp.common.generic.Copyable |
|---|
COPY_DEEP, COPY_FIRST_LEVEL, COPY_SHALLOW |
| Constructor Summary | |
|---|---|
CollectionNode(PropertyDescriptor propertyDescriptor)
Default Constructor |
|
| Method Summary | |
|---|---|
AbstractNode |
addNewNodeAfter(AbstractNode posNode,
java.lang.Object instance)
Adds a new node of the same type as the exisiting child nodes and inserts it into the child list at the given position. |
boolean |
allowedToDrag()
Defines if a receiver node may be dragged into another position. |
boolean |
allowsNodeAddition()
Determines if node addition is allowed. |
boolean |
allowsNodeRemoval()
Determinces if a node removal is allowed. |
boolean |
allowsNodeReordering()
Determinces if a node reordering is allowed. |
void |
copyFrom(java.lang.Object source,
int copyMode)
Copies the values of the source object to this object. |
protected java.lang.Object |
createNewMember()
Creates a new member node to be added to the list. |
boolean |
getAllowsChildren()
Returns true if the receiver allows children. |
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 |
getChildIndex(AbstractNode node)
Gets the child index of the given node. |
CollectionDescriptor |
getCollectionDescriptor()
Gets the CollectionDescriptor associated with this node.. |
java.lang.Object |
getColumnValue(int columnIndex)
|
java.lang.String |
getNodeText()
|
PropertyDescriptor |
getPropertyDescriptor()
Gets the PropertyDescriptor that contains the CollectionDescriptor for this node.. |
boolean |
isLeaf()
Returns true if the receiver is a leaf. |
void |
moveNodeDown(AbstractNode node)
Moves the given node one position down in the child node list. |
void |
moveNodeUp(AbstractNode node)
Moves the given node one position up in the child node list. |
protected void |
populateChildren()
Populates the children vector with ObjectNode 's, from the objects
contained in the list. |
void |
reload()
Reloads the content of this node. |
void |
removeAllNodes()
Removes all nodes from the collection. |
AbstractNode |
removeNode(AbstractNode node)
Removes a sepcified node from the collection. |
boolean |
representsProperty(java.lang.String propertyName)
Checks if this node represents the given property. |
protected void |
saveList()
Saves the list with the modified objects back into the object. |
void |
setObject(java.lang.Object object)
Sets the object containing the values for the property. |
boolean |
shouldExpand()
Checks if the node node should be expanded on initial display. |
java.lang.String |
toString()
Returns a string representation of this object. |
| Methods inherited from class org.openbp.jaspira.propertybrowser.nodes.AbstractNode |
|---|
add, add, children, clone, filterPropertyNodes, findNodeForProperty, getAssociatedCollectionNode, getIndex, getLastHeight, getObject, getObjectNode, getParent, getPreferredSize, getPropertyBrowser, getPropertyNodes, reloadProperty, remove, setLastHeight, setParent, setPropertyBrowser |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CollectionNode(PropertyDescriptor propertyDescriptor)
propertyDescriptor - The PropertyDescriptor that contains the CollectionDescriptor| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Object
public void copyFrom(java.lang.Object source,
int copyMode)
throws java.lang.CloneNotSupportedException
copyFrom in interface CopyablecopyFrom in class AbstractNodesource - 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()
reload in class AbstractNodepublic boolean representsProperty(java.lang.String propertyName)
representsProperty in class AbstractNodepropertyName - Name of the property to checkpublic PropertyDescriptor getPropertyDescriptor()
PropertyDescriptor that contains the CollectionDescriptor for this node..
public CollectionDescriptor getCollectionDescriptor()
CollectionDescriptor associated with this node..
public java.lang.Object getColumnValue(int columnIndex)
public java.lang.String getNodeText()
public boolean getAllowsChildren()
AbstractNode
getAllowsChildren in interface javax.swing.tree.TreeNodegetAllowsChildren in class AbstractNodepublic javax.swing.tree.TreeNode getChildAt(int childIndex)
AbstractNode
getChildAt in interface javax.swing.tree.TreeNodegetChildAt in class AbstractNodepublic int getChildCount()
AbstractNode
getChildCount in interface javax.swing.tree.TreeNodegetChildCount in class AbstractNodepublic boolean isLeaf()
AbstractNode
isLeaf in interface javax.swing.tree.TreeNodeisLeaf in class AbstractNodepublic boolean shouldExpand()
shouldExpand in class AbstractNodepublic void setObject(java.lang.Object object)
setObject in class AbstractNodeobject - The object to be set
public AbstractNode addNewNodeAfter(AbstractNode posNode,
java.lang.Object instance)
posNode - Node that determines the position of the new node in the collectioninstance - Object instance to be added or null to create a new instance
public AbstractNode removeNode(AbstractNode node)
node - The node to be removed
public void removeAllNodes()
public void moveNodeUp(AbstractNode node)
node - Node to movepublic void moveNodeDown(AbstractNode node)
node - Node to movepublic boolean allowedToDrag()
public boolean allowsNodeAddition()
public boolean allowsNodeRemoval()
public boolean allowsNodeReordering()
protected void populateChildren()
ObjectNode 's, from the objects
contained in the list.
public int getChildIndex(AbstractNode node)
node - Node to search
protected void saveList()
protected java.lang.Object createNewMember()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||