VRJConfig UI API
v2.0


org.vrjuggler.vrjconfig.commoneditors.proxytree
Class ProxyTreeModel

java.lang.Object
  extended by javax.swing.tree.DefaultTreeModel
      extended by org.vrjuggler.vrjconfig.commoneditors.proxytree.ProxyTreeModel
All Implemented Interfaces:
Serializable, EventListener, TreeModel, ConfigElementListener, ConfigListener

public class ProxyTreeModel
extends DefaultTreeModel
implements ConfigListener, ConfigElementListener

Model showing how proxies point at a device.

See Also:
ConfigListener, ConfigElementListener, Serialized Form

Nested Class Summary
protected  class ProxyTreeModel.DeviceUnit
          Used to represent a position/digital/analog unit on an device.
protected  class ProxyTreeModel.ProxyType
          Used to represent different categories of units on each device.
 
Field Summary
 
Fields inherited from class javax.swing.tree.DefaultTreeModel
asksAllowsChildren, listenerList, root
 
Constructor Summary
ProxyTreeModel(ConfigElement elm, ConfigContext context, int num_positional, int num_digital, int num_analog)
          Constructor that creates a tree representation of a device and all proxies pointing at it.
ProxyTreeModel(TreeNode root)
          Constructor used for testing.
 
Method Summary
 void configElementAdded(ConfigEvent evt)
          ConfigListener interface to catch all added ConfigElements.
 void configElementRemoved(ConfigEvent evt)
          ConfigListener interface to catch removed added ConfigElements.
 List findAnalogProxies()
           
 List findDigitalProxies()
           
 List findPositionProxies()
           
 ConfigContext getConfigContext()
          Return the ConfigContext associated with this station.
 ConfigElement getConfigElement()
          Return the ConfigElement for this device.
protected  List getNodesFor(Object obj)
          Gets a list of all the tree nodes that contain the given Object.
 void nameChanged(ConfigElementEvent evt)
          ConfigElementListener interface to catch all changes in existing proxies by calling a helper method, elementChanged.
 void propertyValueAdded(ConfigElementEvent evt)
           
 void propertyValueChanged(ConfigElementEvent evt)
           
 void propertyValueOrderChanged(ConfigElementEvent evt)
           
 void propertyValueRemoved(ConfigElementEvent evt)
           
 void proxyAdded(ConfigElement elm, String token, int unit)
          Called whenever a new proxy for this device is added.
 void proxyRemoved(ConfigElement elm, String token, int unit)
          Called whenever a proxy for this device is removed.
 void rebuildTree()
           
 
Methods inherited from class javax.swing.tree.DefaultTreeModel
addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyTreeModel

public ProxyTreeModel(TreeNode root)
Constructor used for testing.


ProxyTreeModel

public ProxyTreeModel(ConfigElement elm,
                      ConfigContext context,
                      int num_positional,
                      int num_digital,
                      int num_analog)
Constructor that creates a tree representation of a device and all proxies pointing at it.

Method Detail

rebuildTree

public void rebuildTree()

getConfigElement

public ConfigElement getConfigElement()
Return the ConfigElement for this device.


getConfigContext

public ConfigContext getConfigContext()
Return the ConfigContext associated with this station.


getNodesFor

protected List getNodesFor(Object obj)
Gets a list of all the tree nodes that contain the given Object.


configElementAdded

public void configElementAdded(ConfigEvent evt)
ConfigListener interface to catch all added ConfigElements.

Specified by:
configElementAdded in interface ConfigListener
See Also:
ConfigListener

configElementRemoved

public void configElementRemoved(ConfigEvent evt)
ConfigListener interface to catch removed added ConfigElements.

Specified by:
configElementRemoved in interface ConfigListener
See Also:
ConfigListener

nameChanged

public void nameChanged(ConfigElementEvent evt)
ConfigElementListener interface to catch all changes in existing proxies by calling a helper method, elementChanged.

Specified by:
nameChanged in interface ConfigElementListener
See Also:
ConfigElementListener

propertyValueChanged

public void propertyValueChanged(ConfigElementEvent evt)
Specified by:
propertyValueChanged in interface ConfigElementListener

propertyValueOrderChanged

public void propertyValueOrderChanged(ConfigElementEvent evt)
Specified by:
propertyValueOrderChanged in interface ConfigElementListener

propertyValueAdded

public void propertyValueAdded(ConfigElementEvent evt)
Specified by:
propertyValueAdded in interface ConfigElementListener

propertyValueRemoved

public void propertyValueRemoved(ConfigElementEvent evt)
Specified by:
propertyValueRemoved in interface ConfigElementListener

proxyAdded

public void proxyAdded(ConfigElement elm,
                       String token,
                       int unit)
Called whenever a new proxy for this device is added.


proxyRemoved

public void proxyRemoved(ConfigElement elm,
                         String token,
                         int unit)
Called whenever a proxy for this device is removed.


findDigitalProxies

public List findDigitalProxies()

findAnalogProxies

public List findAnalogProxies()

findPositionProxies

public List findPositionProxies()

VRJConfig UI API
v2.0


Copyright © 1998–2005 Iowa State University. All rights reserved.