|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnextapp.echo2.app.Component
nextapp.echo2.app.Column
com.sptci.epng.editabletree.Node
public abstract class Node
A custom component used to display the node name and controls.
© Copyright 2007 Sans Pareil Technologies, Inc.
| Field Summary | |
|---|---|
protected AddComponent |
add
The component that is used to display the components that are used to capture user input about new child to be added. |
protected DisplayComponent |
display
The component that is used to display the title of the node and the controls to add/remove. |
protected String |
displayName
The Treeable.getDisplayName() value stored to
allow access to value when the treeable instance is no
longer accessible (deleted). |
protected String |
objectId
The ObjectId for the treeable object that is
currently displayed in the node. |
protected Treeable |
treeable
The treeable object that is represented by this node. |
| Fields inherited from class nextapp.echo2.app.Column |
|---|
PROPERTY_BORDER, PROPERTY_CELL_SPACING, PROPERTY_INSETS |
| Constructor Summary | |
|---|---|
Node()
Create a new instance with no value for treeable. |
|
Node(Treeable treeable)
Create a new instance using the specified model object. |
|
| Method Summary | |
|---|---|
void |
addChild(Treeable treeable)
Add a new child node to this node using the specified model object. |
protected void |
addChild(Treeable treeable,
DefaultMutableTreeNode node)
Add a new child node to this node. |
int |
compareTo(Node node)
Compare the specified node with this. |
protected abstract DisplayComponent |
createDisplayComponent()
Abstract method to initialise display with the appropriate
subclass. |
protected abstract DisplayComponent |
createDisplayComponent(Treeable treeable)
Abstract method to initialise display with the appropriate
subclass. |
boolean |
equals(Object object)
Check the specified object with this for equality. |
AddComponent |
getAdd()
Returns add. |
DisplayComponent |
getDisplay()
Returns display. |
String |
getName()
Get the value displayed in the DisplayComponent.name component. |
String |
getObjectId()
Returns objectId. |
Treeable |
getTreeable()
Returns treeable. |
int |
hashCode()
Computes a hash code for this object. |
void |
setAdd(AddComponent add)
Set add. |
void |
setName(String name)
Set the value displayed in the DisplayComponent.name component. |
String |
toString()
Return a string representation of this object. |
| Methods inherited from class nextapp.echo2.app.Column |
|---|
getBorder, getCellSpacing, getInsets, setBorder, setCellSpacing, setInsets |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Treeable treeable
protected String objectId
ObjectId for the treeable object that is
currently displayed in the node.
protected String displayName
Treeable.getDisplayName() value stored to
allow access to value when the treeable instance is no
longer accessible (deleted).
protected DisplayComponent display
protected AddComponent add
| Constructor Detail |
|---|
public Node()
treeable.
public Node(Treeable treeable)
treeable - The model object for this node.| Method Detail |
|---|
public void addChild(Treeable treeable)
treeable - The model object to use to create the child.
protected void addChild(Treeable treeable,
DefaultMutableTreeNode node)
treeable - The model object to use to create the child.node - The TreeNode to which the new child node is
to be added.public String toString()
displayName.
toString in class Objectpublic int hashCode()
treeable.
hashCode in class Objectpublic boolean equals(Object object)
treeable.
equals in class Objecttrue if the specified object is of the
same class type and has the same value of treeable.public int compareTo(Node node)
treeable.
compareTo in interface Comparable<Node>treeable instances compare.public String getName()
DisplayComponent.name component.
public void setName(String name)
DisplayComponent.name component.
name - The text to display in the component.public DisplayComponent getDisplay()
display.
public AddComponent getAdd()
add.
public void setAdd(AddComponent add)
add.
add - The value to set.public String getObjectId()
objectId.
public Treeable getTreeable()
treeable. Please note that accessing the fields
of this object may result in RuntimeException
thrown depending upon the persistant state.
protected abstract DisplayComponent createDisplayComponent()
display with the appropriate
subclass.
DisplayComponent.protected abstract DisplayComponent createDisplayComponent(Treeable treeable)
display with the appropriate
subclass.
treeable - The model object to use to initialise the display
component.
DisplayComponent.
|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||