|
|||||||||
| Home >> All >> cosmoworx >> [ data overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
cosmoworx.data
Class ViewNode

java.lang.Objectcosmoworx.data.ViewNode
- All Implemented Interfaces:
- Node
- public class ViewNode
- extends java.lang.Object
- implements Node
- extends java.lang.Object
The ViewNode class is an implementation of the Node interface that allows any type of node to be used in a view structure.
| Nested Class Summary | |
private class |
ViewNode.ChildNodeHandler
The node listener for the child nodes. |
private class |
ViewNode.DelegateNodeHandler
The node listener for the delegate node. |
| Field Summary | |
private ViewNode.ChildNodeHandler |
moChildNodeHandler
The child node handler. |
private ViewNode.DelegateNodeHandler |
moDelegateNodeHandler
The delegate node handler. |
private Node |
moNode
The Node that this ViewNode wraps. |
private ViewNode |
moParent
The parent ViewNode. |
private java.util.Vector |
mvChildren
The child ViewNodes. |
private java.util.Vector |
mvListeners
The listenener list. |
| Constructor Summary | |
ViewNode(RealNode aoNode)
Construct a ViewNode with the specified node. |
|
| Method Summary | |
void |
add(ViewNode aoNode)
Add a node. |
void |
addNodeListener(NodeListener aoListener)
Register a node listener. |
void |
clear()
Remove all the children. |
boolean |
contains(Node aoNode)
Does the node contain the child node. |
void |
copyFrom(Node aoNode)
Copy the attributes and resources from the specified node. |
static ViewNode |
createView(RealNode aoNode)
Create a set of view nodes that mirrors the specified node. |
protected void |
finalize()
Finalize. |
void |
fireNodeEventOccurred(NodeEvent aoEvent)
Called when a node event occurs. |
java.lang.String |
get(java.lang.String asKey)
Get a String attribute from the node. |
java.util.Enumeration |
getAttributeKeys()
Get the attribute keys. |
boolean |
getBoolean(java.lang.String asKey)
Get a boolean attribute from the node. |
Node |
getChild(int aiIndex)
Get a child node. |
int |
getChildCount()
Get the number of child nodes. |
double |
getDouble(java.lang.String asKey)
Get a double attribute from the node. |
float |
getFloat(java.lang.String asKey)
Get a float attribute from the node. |
int |
getIndex(Node aoNode)
Get the index of the specified node. |
int |
getInt(java.lang.String asKey)
Get a int attribute from the node. |
long |
getLong(java.lang.String asKey)
Get a long attribute from the node. |
Node |
getNode()
Get the node this ViewNode wraps. |
Node |
getParent()
Get the parent node. |
RealNode |
getRealNode()
Get the real node. |
java.lang.Object |
getResource(java.lang.String asKey)
Get a node resource. |
java.util.Enumeration |
getResourceKeys()
Get the keys for the resources. |
void |
insert(ViewNode aoNode,
int aiIndex)
Insert a node. |
void |
insertAfter(ViewNode aoNode,
ViewNode aoPeer)
Insert a node after a specified perr node. |
void |
insertBefore(ViewNode aoNode,
ViewNode aoPeer)
Insert a node before a specified peer node. |
boolean |
isModified()
Whether the node is modified. |
void |
remove(ViewNode aoNode)
Remove the specified child node. |
void |
removeNodeListener(NodeListener aoListener)
Unregister a node listener. |
private void |
setParent(ViewNode aoNode)
Set the parent node. |
void |
setResource(java.lang.String asKey,
java.lang.Object aoResource)
Set a node resource. |
java.lang.String |
toString()
Format a string for this node. |
private void |
triggerNodeChanged()
|
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
moNode
private Node moNode
- The
Nodethat thisViewNodewraps.
moParent
private ViewNode moParent
- The parent
ViewNode.
mvChildren
private java.util.Vector mvChildren
- The child
ViewNodes.
mvListeners
private java.util.Vector mvListeners
- The listenener list.
moChildNodeHandler
private ViewNode.ChildNodeHandler moChildNodeHandler
- The child node handler.
moDelegateNodeHandler
private ViewNode.DelegateNodeHandler moDelegateNodeHandler
- The delegate node handler.
| Constructor Detail |
ViewNode
public ViewNode(RealNode aoNode)
- Construct a ViewNode with the specified node.
| Method Detail |
getRealNode
public RealNode getRealNode()
- Get the real node.
- Specified by:
getRealNodein interfaceNode
getNode
public Node getNode()
- Get the node this
ViewNodewraps.
setParent
private void setParent(ViewNode aoNode)
- Set the parent node.
getParent
public Node getParent()
add
public void add(ViewNode aoNode)
- Add a node.
insert
public void insert(ViewNode aoNode, int aiIndex)
- Insert a node.
insertBefore
public void insertBefore(ViewNode aoNode, ViewNode aoPeer)
- Insert a node before a specified peer node.
insertAfter
public void insertAfter(ViewNode aoNode, ViewNode aoPeer)
- Insert a node after a specified perr node.
getChildCount
public int getChildCount()
- Get the number of child nodes.
- Specified by:
getChildCountin interfaceNode
getChild
public Node getChild(int aiIndex)
getIndex
public int getIndex(Node aoNode)
contains
public boolean contains(Node aoNode)
remove
public void remove(ViewNode aoNode)
- Remove the specified child node.
clear
public void clear()
- Remove all the children.
isModified
public boolean isModified()
- Whether the node is modified.
- Specified by:
isModifiedin interfaceNode
get
public java.lang.String get(java.lang.String asKey)
getBoolean
public boolean getBoolean(java.lang.String asKey)
- Get a
booleanattribute from the node.- Specified by:
getBooleanin interfaceNode
getInt
public int getInt(java.lang.String asKey)
getLong
public long getLong(java.lang.String asKey)
getFloat
public float getFloat(java.lang.String asKey)
getDouble
public double getDouble(java.lang.String asKey)
getAttributeKeys
public java.util.Enumeration getAttributeKeys()
- Get the attribute keys.
- Specified by:
getAttributeKeysin interfaceNode
setResource
public void setResource(java.lang.String asKey, java.lang.Object aoResource)
- Set a node resource.
- Specified by:
setResourcein interfaceNode
getResource
public java.lang.Object getResource(java.lang.String asKey)
- Get a node resource.
- Specified by:
getResourcein interfaceNode
getResourceKeys
public java.util.Enumeration getResourceKeys()
- Get the keys for the resources.
- Specified by:
getResourceKeysin interfaceNode
copyFrom
public void copyFrom(Node aoNode)
toString
public java.lang.String toString()
- Format a string for this node.
addNodeListener
public void addNodeListener(NodeListener aoListener)
- Register a node listener.
- Specified by:
addNodeListenerin interfaceNode
removeNodeListener
public void removeNodeListener(NodeListener aoListener)
- Unregister a node listener.
- Specified by:
removeNodeListenerin interfaceNode
triggerNodeChanged
private void triggerNodeChanged()
fireNodeEventOccurred
public void fireNodeEventOccurred(NodeEvent aoEvent)
- Called when a node event occurs.
finalize
protected void finalize()
- Finalize.
createView
public static final ViewNode createView(RealNode aoNode)
- Create a set of view nodes that mirrors the specified node.
|
|||||||||
| Home >> All >> cosmoworx >> [ data overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
cosmoworx.data.ViewNode