VRJConfig UI API
v2.0


org.vrjuggler.vrjconfig.commoneditors.devicegraph
Class AbstractDeviceUnitPropertyHandler

java.lang.Object
  extended by org.vrjuggler.vrjconfig.commoneditors.devicegraph.AbstractDeviceUnitPropertyHandler
All Implemented Interfaces:
DeviceUnitPropertyHandler
Direct Known Subclasses:
DefaultUnitPropertyHandler, SimAnalogUnitPropertyHandler

public abstract class AbstractDeviceUnitPropertyHandler
extends Object
implements DeviceUnitPropertyHandler

Partial implementation of DeviceUnitPropertyHandler that deals with the aspects that would be common to all implementations of that interface.


Field Summary
protected  ConfigContext configContext
           
protected  ConfigElement configElement
           
protected  Map unitTypeMap
           
protected  Collection unitTypes
           
 
Constructor Summary
AbstractDeviceUnitPropertyHandler()
           
 
Method Summary
 void addDeviceUnitListener(DeviceUnitListener l)
          Adds the given DeviceUnitListener to the list of listeners.
protected  void fireDeviceUnitAdded(Integer type, int unitNum)
          Fires a DeviceUnitEvent for the addition of a unit of the given type.
protected  void fireDeviceUnitRemoved(Integer type, int unitNum)
          Fires a DeviceUnitEvent for the removal of the identified unit of the given unit type.
 Collection getUnitTypes()
          Returns the unit types for this handler.
 void removeDeviceUnitListener(DeviceUnitListener l)
          Removes the given DeviceUnitListener to from list of listeners.
 void setConfig(ConfigContext ctx, ConfigElement elt)
          Sets the configuration information for the configured device.
 void setUnitTypeMap(Map unitTypeMap)
          Sets the unit type map for the configured device.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.vrjuggler.vrjconfig.commoneditors.devicegraph.DeviceUnitPropertyHandler
addUnit, propertyValueAdded, propertyValueChanged, propertyValueOrderChanged, propertyValueRemoved, removeUnit
 

Field Detail

configContext

protected ConfigContext configContext

configElement

protected ConfigElement configElement

unitTypeMap

protected Map unitTypeMap

unitTypes

protected Collection unitTypes
Constructor Detail

AbstractDeviceUnitPropertyHandler

public AbstractDeviceUnitPropertyHandler()
Method Detail

setConfig

public void setConfig(ConfigContext ctx,
                      ConfigElement elt)
Sets the configuration information for the configured device.

Specified by:
setConfig in interface DeviceUnitPropertyHandler

setUnitTypeMap

public void setUnitTypeMap(Map unitTypeMap)
Sets the unit type map for the configured device. The map must map from Integer to some type, as defined in UnitConstants. The values of the map are dependent upon the specific implementation of this interface.

Specified by:
setUnitTypeMap in interface DeviceUnitPropertyHandler
See Also:
UnitConstants

getUnitTypes

public Collection getUnitTypes()
Returns the unit types for this handler. This is a collection of Integer objects as defined in UnitConstants.

Specified by:
getUnitTypes in interface DeviceUnitPropertyHandler
See Also:
UnitConstants

addDeviceUnitListener

public final void addDeviceUnitListener(DeviceUnitListener l)
Adds the given DeviceUnitListener to the list of listeners.

Specified by:
addDeviceUnitListener in interface DeviceUnitPropertyHandler

removeDeviceUnitListener

public final void removeDeviceUnitListener(DeviceUnitListener l)
Removes the given DeviceUnitListener to from list of listeners.

Specified by:
removeDeviceUnitListener in interface DeviceUnitPropertyHandler

fireDeviceUnitAdded

protected void fireDeviceUnitAdded(Integer type,
                                   int unitNum)
Fires a DeviceUnitEvent for the addition of a unit of the given type.

See Also:
DeviceUnitEvent

fireDeviceUnitRemoved

protected void fireDeviceUnitRemoved(Integer type,
                                     int unitNum)
Fires a DeviceUnitEvent for the removal of the identified unit of the given unit type.

See Also:
DeviceUnitEvent

VRJConfig UI API
v2.0


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