com.sas.swing.models
Class TreeModelAdapter

com.sas.swing.models.TreeModelAdapter
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.collection.ContentsChangedListener, ViewDefaultModel, com.sas.util.transforms.DisplayTransformInterface, java.util.EventListener, javax.swing.tree.TreeModel

public class TreeModelAdapter
implements javax.swing.tree.TreeModel, com.sas.collection.ContentsChangedListener, com.sas.beans.PropertyChangeSource, ViewDefaultModel, com.sas.util.transforms.DisplayTransformInterface


Field Summary
protected  boolean defaultModelAttached
           
protected  com.sas.util.transforms.TransformInterface displayTransform
           
protected  javax.swing.event.EventListenerList listenerList
           
protected  com.sas.models.TreeInterface model
           
protected  java.util.List propertyChangeListenersList
           
protected  java.beans.PropertyChangeSupport propertyChangeSupport
           
protected  javax.swing.tree.TreeNode root
           
 
Constructor Summary
TreeModelAdapter()
           
TreeModelAdapter(com.sas.models.TreeInterface table)
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void addTreeModelListener(javax.swing.event.TreeModelListener l)
          Adds a listener for the TreeModelEvent posted after the tree changes.
 void contentsChanged(com.sas.collection.ContentsChangedEvent event)
           
protected  void firePropertyChange(java.beans.PropertyChangeEvent evt)
           
protected  void firePropertyChange(java.lang.String propName, java.lang.Object oldValue, java.lang.Object newValue)
           
protected  void fireTreeNodesChanged(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
           
protected  void fireTreeNodesChanged(javax.swing.event.TreeModelEvent event)
           
protected  void fireTreeNodesInserted(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
           
protected  void fireTreeNodesInserted(javax.swing.event.TreeModelEvent event)
           
protected  void fireTreeNodesRemoved(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
           
protected  void fireTreeNodesRemoved(javax.swing.event.TreeModelEvent event)
           
protected  void fireTreeStructureChanged(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.Object[] children)
           
protected  void fireTreeStructureChanged(javax.swing.event.TreeModelEvent event)
           
 java.lang.Object getChild(java.lang.Object parent, int index)
           
 int getChildCount(java.lang.Object parent)
           
 com.sas.util.transforms.TransformInterface getDisplayTransform()
          Return current transform, which can be null
static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
          Returns information used by the com.sas.beans.Introspector to augment the automatically introspected information about this BaseBorder.
 int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
           
 java.util.EventListener[] getListeners(java.lang.Class listenerType)
          Return an array of all the listeners of the given type that were added to this model.
 com.sas.models.TreeInterface getModel()
           
 java.lang.Object getRoot()
           
 boolean isDefaultModelAttached()
          returns true is the component is using a default internal model.
 boolean isLeaf(java.lang.Object node)
           
protected  com.sas.models.TreeInterface newDefaultModel()
           
protected  javax.swing.tree.TreeNode newTreeNode(com.sas.models.SimpleNodeInterface node)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void removeTreeModelListener(javax.swing.event.TreeModelListener l)
          Removes a listener previously added with addTreeModelListener().
protected  void setDefaultModelAttached(boolean defaultModelUsed)
           
 void setDisplayTransform(com.sas.util.transforms.TransformInterface newTransform)
          Set transform to given transform, which can be null
 void setModel(com.sas.models.TreeInterface tree)
           
 void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
           
 

Field Detail

defaultModelAttached

protected boolean defaultModelAttached

root

protected javax.swing.tree.TreeNode root

model

protected com.sas.models.TreeInterface model

propertyChangeListenersList

protected java.util.List propertyChangeListenersList

listenerList

protected javax.swing.event.EventListenerList listenerList

propertyChangeSupport

protected java.beans.PropertyChangeSupport propertyChangeSupport

displayTransform

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

TreeModelAdapter

public TreeModelAdapter()

TreeModelAdapter

public TreeModelAdapter(com.sas.models.TreeInterface table)
Method Detail

getExtendedBeanInfo

public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
Returns information used by the com.sas.beans.Introspector to augment the automatically introspected information about this BaseBorder.

Returns:
the ExtendedBeanInfo for this class

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)

newTreeNode

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

newDefaultModel

protected com.sas.models.TreeInterface newDefaultModel()

isDefaultModelAttached

public boolean isDefaultModelAttached()
Description copied from interface: ViewDefaultModel
returns true is the component is using a default internal model.

Specified by:
isDefaultModelAttached in interface ViewDefaultModel

setDefaultModelAttached

protected void setDefaultModelAttached(boolean defaultModelUsed)

getModel

public com.sas.models.TreeInterface getModel()

setModel

public void setModel(com.sas.models.TreeInterface tree)

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

contentsChanged

public void contentsChanged(com.sas.collection.ContentsChangedEvent event)
Specified by:
contentsChanged in interface com.sas.collection.ContentsChangedListener

getChild

public java.lang.Object getChild(java.lang.Object parent,
                                 int index)
Specified by:
getChild in interface javax.swing.tree.TreeModel

getChildCount

public int getChildCount(java.lang.Object parent)
Specified by:
getChildCount in interface javax.swing.tree.TreeModel

getIndexOfChild

public int getIndexOfChild(java.lang.Object parent,
                           java.lang.Object child)
Specified by:
getIndexOfChild in interface javax.swing.tree.TreeModel

getRoot

public java.lang.Object getRoot()
Specified by:
getRoot in interface javax.swing.tree.TreeModel

isLeaf

public boolean isLeaf(java.lang.Object node)
Specified by:
isLeaf in interface javax.swing.tree.TreeModel

valueForPathChanged

public void valueForPathChanged(javax.swing.tree.TreePath path,
                                java.lang.Object newValue)
Specified by:
valueForPathChanged in interface javax.swing.tree.TreeModel

addTreeModelListener

public void addTreeModelListener(javax.swing.event.TreeModelListener l)
Adds a listener for the TreeModelEvent posted after the tree changes.

Specified by:
addTreeModelListener in interface javax.swing.tree.TreeModel
Parameters:
l - the listener to add
See Also:
removeTreeModelListener(javax.swing.event.TreeModelListener)

removeTreeModelListener

public void removeTreeModelListener(javax.swing.event.TreeModelListener l)
Removes a listener previously added with addTreeModelListener().

Specified by:
removeTreeModelListener in interface javax.swing.tree.TreeModel
Parameters:
l - the listener to remove
See Also:
addTreeModelListener(javax.swing.event.TreeModelListener)

fireTreeNodesChanged

protected void fireTreeNodesChanged(java.lang.Object source,
                                    java.lang.Object[] path,
                                    int[] childIndices,
                                    java.lang.Object[] children)

fireTreeNodesChanged

protected void fireTreeNodesChanged(javax.swing.event.TreeModelEvent event)

fireTreeNodesInserted

protected void fireTreeNodesInserted(java.lang.Object source,
                                     java.lang.Object[] path,
                                     int[] childIndices,
                                     java.lang.Object[] children)

fireTreeNodesInserted

protected void fireTreeNodesInserted(javax.swing.event.TreeModelEvent event)

fireTreeNodesRemoved

protected void fireTreeNodesRemoved(java.lang.Object source,
                                    java.lang.Object[] path,
                                    int[] childIndices,
                                    java.lang.Object[] children)

fireTreeNodesRemoved

protected void fireTreeNodesRemoved(javax.swing.event.TreeModelEvent event)

fireTreeStructureChanged

protected void fireTreeStructureChanged(java.lang.Object source,
                                        java.lang.Object[] path,
                                        int[] childIndices,
                                        java.lang.Object[] children)

fireTreeStructureChanged

protected void fireTreeStructureChanged(javax.swing.event.TreeModelEvent event)

getListeners

public java.util.EventListener[] getListeners(java.lang.Class listenerType)
Return an array of all the listeners of the given type that were added to this model.

Since:
1.3



Copyright © 2009 SAS Institute Inc. All Rights Reserved.