|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.borland.primetime.node.Node
Node is an abstract parent of all node types supported by the node system. Project, FileNode, and LightweightNode are its immediate descendants, and all other nodes should derive from one of these three types.
All nodes share a number of common public characteristics. All nodes except project nodes have an associated project which is invariant for the lifetime of the node object. With the exception of project nodes, whose parent is always null, all nodes may also have a parent node. All nodes may have zero or more immediate children, and any node may list an entirely different set of "display children" for browsing purposes. Nodes have an icon, a short and long display name, and a natural grouping sequence for sorting purposes. Lastly, all nodes can store an unlimited number of named, categorized property values.
Project
,
FileNode
,
LightweightNode
Field Summary | |
static Node[] |
EMPTY_ARRAY
|
protected java.util.ArrayList |
nodeListeners
|
Method Summary | |
void |
addNodeListener(NodeListener listener)
|
void |
check()
Performs any periodic task required to keep the node's state up to date. |
int |
compareTo(java.lang.Object other)
Provides a node ordering for display purposes. |
void |
dumpNodes()
Provided for debugging purposes. |
void |
dumpNodes(boolean useDisplayChildren)
Provided for debugging purposes. |
void |
dumpNodes(java.lang.String indent,
boolean useDisplayChildren)
Provided for debugging purposes. |
boolean |
equals(java.lang.Object other)
|
void |
fireNodeRenamed()
Notifies all registered NodeListeners that this node has been renamed. |
Node[] |
getChildren()
Returns a collection of all nodes that list this node as their parent, sorted in an order suitable for display. |
Node[] |
getDisplayChildren()
Returns a collection of nodes that should be displayed beneath this node in a project browser, sorted in an order suitable for display. |
abstract javax.swing.Icon |
getDisplayIcon()
Provides an image to be used for graphical representation of the node. |
abstract java.lang.String |
getDisplayName()
|
int |
getDisplaySequence()
Describes the logical group the node belongs to for ordering purposes. |
java.lang.String |
getLongDisplayName()
|
int |
getNodeID()
Returns a node's internal unique node ID. |
Node |
getParent()
Returns the node's immediate parent in the node hierarchy. |
Project |
getProject()
Returns a reference to the project associated with this node. |
java.util.SortedMap |
getProperties()
Returns a Map relating NodePropertyDescriptor instances to property values. |
java.lang.String |
getProperty(java.lang.String property)
Gets a categorized string property value associated with the node as stored in the project file using an assumed category of "sys" and a default value of null. |
java.lang.String |
getProperty(java.lang.String property,
java.lang.String defaultValue)
Gets a categorized string property value associated with the node as stored in the project file using an assumed category of "sys". |
java.lang.String |
getProperty(java.lang.String category,
java.lang.String property,
java.lang.String defaultValue)
Gets a categorized string property value associated with the node as stored in the project file. |
boolean |
hasChildren()
Describes whether or not this node has one or more children. |
boolean |
hasDisplayChildren()
Describes whether or not this node has one or more display children. |
int |
hashCode()
|
boolean |
isModified()
Describes the modified state of the node's underlying storage. |
boolean |
isPersistant()
Determines whether or not the node definition and its properties will be saved with in a project file. |
void |
removeNodeListener(NodeListener listener)
|
void |
setParent(Node parent)
Changes the parent of a node to alter the node hierarchy. |
void |
setProperty(java.lang.String property,
java.lang.String value)
Sets a categorized string property value associated with the node for subsequent storage with the project file using an assumed default value of null and a category of "sys". |
void |
setProperty(java.lang.String category,
java.lang.String property,
java.lang.String value)
Sets a categorized string property value associated with the node for subsequent storage with the project file using an assumed default value of null. |
void |
setProperty(java.lang.String category,
java.lang.String property,
java.lang.String value,
java.lang.String defaultValue)
Sets a categorized string property value associated with the node for subsequent storage with the project file. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final Node[] EMPTY_ARRAY
protected java.util.ArrayList nodeListeners
Method Detail |
public abstract javax.swing.Icon getDisplayIcon()
public abstract java.lang.String getDisplayName()
public java.lang.String getLongDisplayName()
public int getDisplaySequence()
public Project getProject()
public boolean isModified()
public int getNodeID()
public void check()
public void dumpNodes(java.lang.String indent, boolean useDisplayChildren)
public void dumpNodes(boolean useDisplayChildren)
public void dumpNodes()
public Node getParent()
public void setParent(Node parent)
WARNING: The parent of a node must not in turn be a child of the same node. Loops in the child hierarchy can lead to endless loops at run time. When necessary, distinguish between getDisplayChildren and getChildren by using the former to return the list of conceptual children that may violate this rule.
parent
- The new parent for this node. The parent must belong to the
same project as this node.public Node[] getChildren()
public boolean hasChildren()
public Node[] getDisplayChildren()
By default, a nodes display children are the same as its actual children. Subclasses may decide to augment this list or replace it altogether.
public boolean hasDisplayChildren()
public boolean isPersistant()
public java.lang.String getProperty(java.lang.String category, java.lang.String property, java.lang.String defaultValue)
category
- the name of the category that the property belongs to.property
- the property name for which a value is desired.defaultValue
- the value to return if no value currently exists.public java.lang.String getProperty(java.lang.String property, java.lang.String defaultValue)
property
- the property name for which a value is desired.defaultValue
- the value to return if no value currently exists.public java.lang.String getProperty(java.lang.String property)
property
- the property name for which a value is desired.public void setProperty(java.lang.String category, java.lang.String property, java.lang.String value, java.lang.String defaultValue)
category
- the name of the category that the property belongs to.property
- the property name for which a value is to be stored.value
- the value to be stored.defaultValue
- the value for which no storage is necessary.public void setProperty(java.lang.String category, java.lang.String property, java.lang.String value)
category
- the name of the category that the property belongs to.property
- the property name for which a value is to be stored.value
- the value to be stored.public void setProperty(java.lang.String property, java.lang.String value)
property
- the property name for which a value is to be stored.value
- the value to be stored.public java.util.SortedMap getProperties()
public void addNodeListener(NodeListener listener)
public void removeNodeListener(NodeListener listener)
public void fireNodeRenamed()
public int compareTo(java.lang.Object other)
public boolean equals(java.lang.Object other)
public int hashCode()
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |