|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.sasserver.tree.NodeDelegate
public class NodeDelegate
NodeDelegate is a generic class for displaying tree structured data. The NodeDelegate class is the client side implementation of a tree node.
This delegate class also is responsible for deferring object creation as long as possible by using the remote node's _getNodeChildren method which returns a list of node descriptors. The remote node need not always create the instances, but can instead pass back more descriptive information (text, expanded text, icons, isLeaf properties) about each node in one call, thus eiminating the need for the client to call back to the server to read that information about each child node. Only when the client needs information not represented in the description list does the client have to make a remote call. The description list can have either a remote object ID, or it may contain the name of an SCL class to instatiate in order to create a ServerNodeInterface.
NodeInterface
,
TreeView
,
Serialized FormField Summary | |
---|---|
protected com.sas.collection.OrderedCollectionInterface |
children
|
protected java.lang.String |
className
|
protected com.sas.rmi.Connection |
connection
|
protected com.sas.visuals.IconInterface |
expIcon
|
protected java.lang.String |
expIconName
|
protected int |
expIconNum
|
protected com.sas.visuals.IconInterface |
expSelIcon
|
protected java.lang.String |
expSelIconName
|
protected int |
expSelIconNum
|
protected java.lang.String |
expText
|
protected com.sas.visuals.IconInterface |
icon
|
protected java.lang.String |
iconName
|
protected int |
iconNum
|
protected int |
id
|
protected java.lang.Boolean |
isLeaf
|
protected java.lang.String |
nodeType
|
protected int |
otherIconsNum
|
protected int |
parentID
|
protected com.sas.visuals.IconInterface |
selIcon
|
protected java.lang.String |
selIconName
|
protected int |
selIconNum
|
protected java.lang.String |
text
|
Fields inherited from class com.sas.sasserver.SASListDelegate |
---|
allContentsChangedListeners, hasChildren, libExists, membersList, needs_refresh, parsedList, pendingEventGateCount |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a listener for the java.beans.PropertyChangeEvent event. |
java.lang.Object |
clone()
Return a clone of the object. |
int |
countNodeChildren(int maxCount)
Counts the children of the current node. |
void |
firePropertyChange(java.beans.PropertyChangeEvent event)
Calls notifyPropertyChange to fire the event to all registered listeners. |
void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Creates a PropertyChangeEvent and calls notifyPropertyChange to fire the event to all registered listeners. |
protected com.sas.collection.OrderedCollectionInterface |
getChildren()
Return a collection that contains all the children for the Node |
com.sas.visuals.IconInterface |
getDefaultIcon()
Returns the default icon for the current node. |
com.sas.visuals.IconInterface |
getExpandedIcon()
Returns the expanded icon for the current node. |
com.sas.visuals.IconInterface |
getExpandedSelectedIcon()
Returns the expandedSelected icon for the current node. |
com.sas.models.SimpleNodeInterface |
getNodeChild(int nodeIndex)
Returns the child node at the specified index. |
int |
getNodeChildCount()
Returns the number of children. |
com.sas.models.SimpleNodeInterface[] |
getNodeChildren(int startIndex,
int count)
Returns the specified range of children for the current node. |
java.lang.String |
getNodeExpandedText()
Returns the value of the nodeExpandedText property. |
java.lang.String |
getNodeText()
Returns the value of the nodeText property. |
java.lang.String |
getNodeType()
Returns the value of the nodeType property. |
com.sas.models.NodeInterface |
getRoot()
Returns a NodeInterface object to serve as the root node. |
com.sas.visuals.IconInterface |
getSelectedIcon()
Returns the selected icon for the current node. |
protected void |
initialize(com.sas.collection.hlist.HListInterface params)
Initalizes the remoteObject |
boolean |
isLeafNode()
Indicates whether the current node is a leaf. |
protected com.sas.visuals.IconInterface |
loadIcon(java.lang.String iconName)
loads the icons used in the treeView. |
protected com.sas.visuals.IconInterface |
loadIcon(java.lang.String iconName,
java.lang.String defaultImageName)
loads the icons used in the treeView. |
protected void |
notifyPropertyChange(java.beans.PropertyChangeEvent event)
Sends a PropertyChangeEvent event to all the
PropertyChangeListener objects in the listener list. |
protected int |
parseIntParam(com.sas.collection.hlist.HListInterface params,
java.lang.String key)
Parses an iteger item from the parameter list |
protected void |
parseParams(com.sas.collection.hlist.HListInterface params)
Parses the HListInterface to supply values to the objects properties. |
protected java.lang.String |
parseStringParam(com.sas.collection.hlist.HListInterface params,
java.lang.String key)
Parses a String item from the parameter list |
protected ServerNodeInterface |
remoteNode()
Creates the remote object on the server |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a listener for the java.beans.PropertyChangeEvent event. |
protected void |
reset()
Sets parameters to nulls |
protected void |
resubmitQuery()
Overrides resubmitQuery from SASListDelegate |
void |
setDefaultIcon(int iNum)
Sets the default icon number. |
void |
setExpandedIcon(int iNum)
Sets the expanded icon number. |
void |
setExpandedSelectedIcon(int iNum)
Sets the expanded selected icon number. |
void |
setNodeExpandedText(java.lang.String text)
|
void |
setNodeText(java.lang.String text)
|
void |
setNodeType(java.lang.String type)
|
protected void |
setRemoteNode(ServerNodeInterface rNode)
Sets the object id of the remote server node object |
void |
setSelectedIcon(int iNum)
Sets the selected icon number. |
Methods inherited from class com.sas.sasserver.SASListDelegate |
---|
_setRemoteHandle, addContentsChangedListener, apply, contains, contentsChanged, count, disableEvents, enableEvents, equals, fireContentsChanged, fireContentsChanged, get, getIndex, getItems, getItems, getLastIndex, initialize, parseList, remoteObject, removeContentsChangedListener, toString |
Field Detail |
---|
protected transient com.sas.collection.OrderedCollectionInterface children
protected transient com.sas.rmi.Connection connection
protected transient java.lang.String text
protected transient java.lang.String expText
protected transient java.lang.String nodeType
protected transient java.lang.String iconName
protected transient java.lang.String expIconName
protected transient java.lang.String selIconName
protected transient java.lang.String expSelIconName
protected transient java.lang.String className
protected transient int iconNum
protected transient int expIconNum
protected transient int selIconNum
protected transient int expSelIconNum
protected transient int otherIconsNum
protected transient com.sas.visuals.IconInterface icon
protected transient com.sas.visuals.IconInterface expIcon
protected transient com.sas.visuals.IconInterface selIcon
protected transient com.sas.visuals.IconInterface expSelIcon
protected transient int id
protected transient int parentID
protected transient java.lang.Boolean isLeaf
Method Detail |
---|
protected com.sas.collection.OrderedCollectionInterface getChildren()
protected void resubmitQuery()
resubmitQuery
in class SASListDelegate
protected void parseParams(com.sas.collection.hlist.HListInterface params)
params
- list containing named items.
See com.sas.sasserver.tree.RemoteServerNodeInterface
class for appropriate key namesprotected java.lang.String parseStringParam(com.sas.collection.hlist.HListInterface params, java.lang.String key)
params
- - list of parameterskey
- - name of key to parse
protected int parseIntParam(com.sas.collection.hlist.HListInterface params, java.lang.String key)
params
- - list of parameterskey
- - name of key to parse
protected void reset()
protected void initialize(com.sas.collection.hlist.HListInterface params)
params
- - a list of initialization parametersprotected void setRemoteNode(ServerNodeInterface rNode)
rNode
- - remote object identifier.protected ServerNodeInterface remoteNode()
public com.sas.visuals.IconInterface getDefaultIcon()
NodeIconInterface
getDefaultIcon
in interface com.sas.models.NodeIconInterface
NodeIconInterface
public void setDefaultIcon(int iNum)
iNum
- - icon numberpublic com.sas.visuals.IconInterface getExpandedIcon()
NodeIconInterface
getExpandedIcon
in interface com.sas.models.NodeIconInterface
NodeIconInterface
public void setExpandedIcon(int iNum)
iNum
- - icon numberpublic com.sas.visuals.IconInterface getExpandedSelectedIcon()
NodeIconInterface
getExpandedSelectedIcon
in interface com.sas.models.NodeIconInterface
NodeIconInterface
public void setExpandedSelectedIcon(int iNum)
iNum
- - icon numberpublic com.sas.visuals.IconInterface getSelectedIcon()
NodeIconInterface
getSelectedIcon
in interface com.sas.models.NodeIconInterface
NodeIconInterface
public void setSelectedIcon(int iNum)
iNum
- - icon numberprotected com.sas.visuals.IconInterface loadIcon(java.lang.String iconName)
iconName
- - the name of the icon to be loaded.protected com.sas.visuals.IconInterface loadIcon(java.lang.String iconName, java.lang.String defaultImageName)
iconName
- - the name of the icon to be loaded.public java.lang.String getNodeExpandedText()
NodeInterface
getNodeExpandedText
in interface com.sas.models.NodeInterface
NodeInterface
public void setNodeExpandedText(java.lang.String text)
NodeInterface
public java.lang.String getNodeText()
NodeInterface
getNodeText
in interface com.sas.models.NodeInterface
NodeInterface
public void setNodeText(java.lang.String text)
NodeInterface
public java.lang.String getNodeType()
NodeInterface
getNodeType
in interface com.sas.models.NodeInterface
NodeInterface
public void setNodeType(java.lang.String type)
NodeInterface
public int countNodeChildren(int maxCount)
SimpleNodeInterface
countNodeChildren is an instruction to determine the number of children even though that number is not readily known. To limit the potential overhead of this determination, the maximum number of children to read may be specified.
countNodeChildren
in interface com.sas.models.SimpleNodeInterface
SimpleNodeInterface
public com.sas.models.SimpleNodeInterface getNodeChild(int nodeIndex)
SimpleNodeInterface
true
then this method should return null.
getNodeChild
in interface com.sas.models.SimpleNodeInterface
nodeIndex
- the 0-based index of the child node to retrieve
true
.SimpleNodeInterface
public int getNodeChildCount()
SimpleNodeInterface
getNodeChildCount
in interface com.sas.models.SimpleNodeInterface
SimpleNodeInterface
public com.sas.models.SimpleNodeInterface[] getNodeChildren(int startIndex, int count)
SimpleNodeInterface
true
then this method should return null.
getNodeChildren
in interface com.sas.models.SimpleNodeInterface
startIndex
- 0-based index which identifies the start of the rangecount
- the amount of children to get
true
.SimpleNodeInterface
public boolean isLeafNode()
SimpleNodeInterface
true
indicates that the current node is a leaf and hence will not have any children.
isLeafNode
in interface com.sas.models.SimpleNodeInterface
true
if the current node is a leaf, otherwise false
SimpleNodeInterface
public com.sas.models.NodeInterface getRoot()
TreeInterface
getRoot
in interface com.sas.models.TreeInterface
TreeInterface
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Component
clone
in class SASListDelegate
java.lang.CloneNotSupportedException
- if the model attached to the component being cloned
will not allow the clone to attach.StaticOrderedCollectionInterface.clone()
public void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
firePropertyChange
in interface com.sas.ComponentInterface
firePropertyChange
in class SASListDelegate
propertyName
- the name of the property that has changedoldValue
- the old value of the propertynewValue
- the new value of the propertyComponentInterface.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
public void firePropertyChange(java.beans.PropertyChangeEvent event)
firePropertyChange
in interface com.sas.ComponentInterface
firePropertyChange
in class com.sas.Component
event
- the event being firedComponentInterface.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface com.sas.beans.PropertyChangeSource
addPropertyChangeListener
in interface com.sas.ComponentInterface
addPropertyChangeListener
in class com.sas.Component
listener
- an object which handles PropertyChangeEvent events.
The listener is not added a second time if it already exists
in the list of listeners for this event.PropertyChangeSource
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface com.sas.beans.PropertyChangeSource
removePropertyChangeListener
in interface com.sas.ComponentInterface
removePropertyChangeListener
in class com.sas.Component
listener
- an object which handles PropertyChangeEvent eventsPropertyChangeSource
protected void notifyPropertyChange(java.beans.PropertyChangeEvent event)
PropertyChangeEvent
event to all the
PropertyChangeListener
objects in the listener list.
The listener list is copied first, so the event is sent only to each
item which is in the list at the time of this copy, even if
adds or removes are performed after the send has started.
event
- the event to send
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |