com.sas.swing.models
Class TreeNodeAdapter

com.sas.swing.models.TreeNodeAdapter
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.swing.models.IconInterface, NodeIconsInterface, com.sas.util.transforms.DisplayTransformInterface, java.beans.PropertyChangeListener, java.util.EventListener, javax.swing.tree.TreeNode

public class TreeNodeAdapter
implements javax.swing.tree.TreeNode, NodeIconsInterface, java.beans.PropertyChangeListener, com.sas.beans.PropertyChangeSource, com.sas.util.transforms.DisplayTransformInterface


Field Summary
protected  java.util.List childNodeList
           
protected static java.lang.String DEFAULT
           
protected  com.sas.util.transforms.TransformInterface displayTransform
           
protected static java.lang.String EXPANDED
           
protected static java.lang.String EXPANDED_SELECTED
           
protected  java.util.Map iconMap
           
protected  com.sas.models.SimpleNodeInterface node
           
protected  javax.swing.tree.TreeNode parent
           
protected  java.beans.PropertyChangeSupport propertyChangeSupport
           
protected  boolean refreshChildNodes
           
protected static java.lang.String SELECTED
           
protected  boolean textExpanded
           
 
Constructor Summary
TreeNodeAdapter(com.sas.models.SimpleNodeInterface node)
           
TreeNodeAdapter(com.sas.models.SimpleNodeInterface node, boolean expandText)
           
TreeNodeAdapter(com.sas.models.SimpleNodeInterface node, boolean expandText, com.sas.util.transforms.TransformInterface transform)
           
TreeNodeAdapter(com.sas.models.SimpleNodeInterface node, com.sas.util.transforms.TransformInterface transform)
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 java.util.Enumeration children()
           
protected  void createChildNodes()
           
protected  void firePropertyChange(java.beans.PropertyChangeEvent evt)
           
protected  void firePropertyChange(java.lang.String propName, java.lang.Object oldValue, java.lang.Object newValue)
           
 boolean getAllowsChildren()
           
 javax.swing.tree.TreeNode getChildAt(int childIndex)
           
 int getChildCount()
           
 com.sas.util.transforms.TransformInterface getDisplayTransform()
          Return current transform, which can be null
 javax.swing.Icon getExpandedIcon()
           
 javax.swing.Icon getExpandedSelectedIcon()
           
 javax.swing.Icon getIcon()
          Returns icon setting.
 int getIndex(javax.swing.tree.TreeNode node)
           
 com.sas.models.SimpleNodeInterface getModel()
           
 javax.swing.tree.TreeNode getParent()
           
 javax.swing.Icon getSelectedIcon()
           
 boolean isExpandedTextUsed()
           
 boolean isLeaf()
           
protected  com.sas.models.SimpleNodeInterface newDefaultModel()
           
protected  javax.swing.Icon newIcon(com.sas.visuals.IconInterface icon)
           
protected  javax.swing.tree.TreeNode newTreeNode(com.sas.models.SimpleNodeInterface node)
           
 void propertyChange(java.beans.PropertyChangeEvent event)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void setDisplayTransform(com.sas.util.transforms.TransformInterface newTransform)
          Set transform to given transform, which can be null
 void setExpandedTextUsed(boolean expanded)
           
 void setModel(com.sas.models.SimpleNodeInterface nodeInterface)
           
 void setParent(javax.swing.tree.TreeNode parent)
           
 java.lang.String toString()
           
 

Field Detail

DEFAULT

protected static final java.lang.String DEFAULT
See Also:
Constant Field Values

EXPANDED

protected static final java.lang.String EXPANDED
See Also:
Constant Field Values

EXPANDED_SELECTED

protected static final java.lang.String EXPANDED_SELECTED
See Also:
Constant Field Values

SELECTED

protected static final java.lang.String SELECTED
See Also:
Constant Field Values

textExpanded

protected boolean textExpanded

refreshChildNodes

protected boolean refreshChildNodes

parent

protected javax.swing.tree.TreeNode parent

node

protected com.sas.models.SimpleNodeInterface node

childNodeList

protected java.util.List childNodeList

iconMap

protected java.util.Map iconMap

propertyChangeSupport

protected java.beans.PropertyChangeSupport propertyChangeSupport

displayTransform

protected com.sas.util.transforms.TransformInterface displayTransform
Constructor Detail

TreeNodeAdapter

public TreeNodeAdapter(com.sas.models.SimpleNodeInterface node)

TreeNodeAdapter

public TreeNodeAdapter(com.sas.models.SimpleNodeInterface node,
                       boolean expandText)

TreeNodeAdapter

public TreeNodeAdapter(com.sas.models.SimpleNodeInterface node,
                       com.sas.util.transforms.TransformInterface transform)

TreeNodeAdapter

public TreeNodeAdapter(com.sas.models.SimpleNodeInterface node,
                       boolean expandText,
                       com.sas.util.transforms.TransformInterface transform)
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Specified by:
addPropertyChangeListener in interface com.sas.beans.PropertyChangeSource

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Specified by:
removePropertyChangeListener in interface com.sas.beans.PropertyChangeSource

firePropertyChange

protected void firePropertyChange(java.beans.PropertyChangeEvent evt)

firePropertyChange

protected void firePropertyChange(java.lang.String propName,
                                  java.lang.Object oldValue,
                                  java.lang.Object newValue)

getModel

public com.sas.models.SimpleNodeInterface getModel()

setModel

public void setModel(com.sas.models.SimpleNodeInterface nodeInterface)

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

getDisplayTransform

public com.sas.util.transforms.TransformInterface getDisplayTransform()
Return current transform, which can be null

Specified by:
getDisplayTransform in interface com.sas.util.transforms.DisplayTransformInterface
Returns:
current transform

setDisplayTransform

public void setDisplayTransform(com.sas.util.transforms.TransformInterface newTransform)
Set transform to given transform, which can be null

Specified by:
setDisplayTransform in interface com.sas.util.transforms.DisplayTransformInterface
Parameters:
newTransform - transform to be set

newIcon

protected javax.swing.Icon newIcon(com.sas.visuals.IconInterface icon)

newDefaultModel

protected com.sas.models.SimpleNodeInterface newDefaultModel()

newTreeNode

protected javax.swing.tree.TreeNode newTreeNode(com.sas.models.SimpleNodeInterface node)

setParent

public void setParent(javax.swing.tree.TreeNode parent)

createChildNodes

protected void createChildNodes()

getChildAt

public javax.swing.tree.TreeNode getChildAt(int childIndex)
Specified by:
getChildAt in interface javax.swing.tree.TreeNode

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface javax.swing.tree.TreeNode

getParent

public javax.swing.tree.TreeNode getParent()
Specified by:
getParent in interface javax.swing.tree.TreeNode

getIndex

public int getIndex(javax.swing.tree.TreeNode node)
Specified by:
getIndex in interface javax.swing.tree.TreeNode

getAllowsChildren

public boolean getAllowsChildren()
Specified by:
getAllowsChildren in interface javax.swing.tree.TreeNode

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface javax.swing.tree.TreeNode

children

public java.util.Enumeration children()
Specified by:
children in interface javax.swing.tree.TreeNode

isExpandedTextUsed

public boolean isExpandedTextUsed()

setExpandedTextUsed

public void setExpandedTextUsed(boolean expanded)

getIcon

public javax.swing.Icon getIcon()
Description copied from interface: IconInterface
Returns icon setting.

Specified by:
getIcon in interface com.sas.swing.models.IconInterface
Returns:
Icon

getExpandedIcon

public javax.swing.Icon getExpandedIcon()
Specified by:
getExpandedIcon in interface NodeIconsInterface

getExpandedSelectedIcon

public javax.swing.Icon getExpandedSelectedIcon()
Specified by:
getExpandedSelectedIcon in interface NodeIconsInterface

getSelectedIcon

public javax.swing.Icon getSelectedIcon()
Specified by:
getSelectedIcon in interface NodeIconsInterface

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object



Copyright © 2009 SAS Institute Inc. All Rights Reserved.