|
VRJConfig UI API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.vrjuggler.vrjconfig.commoneditors.devicegraph.AbstractDeviceUnitPropertyHandler
org.vrjuggler.vrjconfig.commoneditors.devicegraph.DefaultUnitPropertyHandler
public class DefaultUnitPropertyHandler
The baseline implementation of DeviceUnitPropertyHandler
that can deal with the "standard" cases of config elements for input
devices in Gadgeteer. There are three such standard cases:
DeviceUnitPropertyHandler would be needed.
| Field Summary |
|---|
| Fields inherited from class org.vrjuggler.vrjconfig.commoneditors.devicegraph.AbstractDeviceUnitPropertyHandler |
|---|
configContext, configElement, unitTypeMap, unitTypes |
| Constructor Summary | |
|---|---|
DefaultUnitPropertyHandler()
|
|
| Method Summary | |
|---|---|
static void |
addArtificialUnits(Map unitTypeMap,
Integer unitType,
int numUnits)
Adds the given number of units to the artificial unit property and stores the result in the given unit type map. |
void |
addUnit(Integer unitType)
Adds a new unit of the given type to the device managed by this handler. |
void |
propertyValueAdded(ConfigElementEvent evt)
Handles the addition of a new property value to our config element. |
void |
propertyValueChanged(ConfigElementEvent evt)
Handles the change in a property value in our config element. |
void |
propertyValueOrderChanged(ConfigElementEvent evt)
Invoked when the order of property values is changed in the config element being held by this handler. |
void |
propertyValueRemoved(ConfigElementEvent evt)
Handles the removal of a new property value from our config element. |
void |
removeUnit(Integer unitType,
int unitNumber)
Removes the identified unit of the given type from the device managed by this handler. |
| Methods inherited from class org.vrjuggler.vrjconfig.commoneditors.devicegraph.AbstractDeviceUnitPropertyHandler |
|---|
addDeviceUnitListener, fireDeviceUnitAdded, fireDeviceUnitRemoved, getUnitTypes, removeDeviceUnitListener, setConfig, setUnitTypeMap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultUnitPropertyHandler()
| Method Detail |
|---|
public static void addArtificialUnits(Map unitTypeMap,
Integer unitType,
int numUnits)
numUnits are added to the current set of units.
unitTypeMap - the unit type map providing a mapping from
unit types (instances of
java.lang.Integer) to the
artificial unit property for that typeunitType - the type of the artificial unit property
(one of the UnitConstants
values)numUnits - the number of units to add to the artificial
unit propertyUnitConstantspublic void propertyValueAdded(ConfigElementEvent evt)
DeviceUnitEvent is fired to inform listeners of the
additional unit.
public void propertyValueChanged(ConfigElementEvent evt)
DeviceUnitEvent is
fired to inform listeners of the addition or removal of a unit,
depending on how the change is interpreted.
public void propertyValueOrderChanged(ConfigElementEvent evt)
DeviceUnitPropertyHandlerDeviceUnitEvent event being generated is dependent upon the
specific implementation of this interface.
public void propertyValueRemoved(ConfigElementEvent evt)
DeviceUnitEvent is fired to inform listeners of the
removed unit.
public void addUnit(Integer unitType)
DeviceUnitEvent
is fired by this method or later by propertyValueAdded() or
by propertyValueChanged().
unitType - the type (as defined in UnitConstants of
the device unit to be added)UnitConstants
public void removeUnit(Integer unitType,
int unitNumber)
DeviceUnitEvent is fired by this method or later by
propertyValueRemoved() or by
propertyValueChanged().
unitType - the type (as defined in UnitConstants of
the device unit to be added)unitNumber - the index of the unit to removeUnitConstants
|
VRJConfig UI API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||