|
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.UnitInfo
public class UnitInfo
A holder for information about input sources (units) on some input device. An input source in a given device is identified uniquely by its type and its number. This class makes the input source type immutable but allows the number to be changed to account for changes in how the device is configured.
| Field Summary |
|---|
| Fields inherited from interface org.vrjuggler.vrjconfig.commoneditors.devicegraph.UnitConstants |
|---|
ANALOG, COMMAND, DIGITAL, GLOVE, KEYBOARD_MOUSE, POSITION, STRING |
| Constructor Summary | |
|---|---|
UnitInfo(Integer unitType,
int unitNumber)
Creates a new input source (unit) representation with the given type and number. |
|
UnitInfo(Integer unitType,
Integer unitNumber)
Creates a new input source (unit) representation with the given type and number. |
|
| Method Summary | |
|---|---|
void |
addUnitInfoListener(UnitInfoListener l)
Adds a listener for events fired by this object. |
void |
decrementUnitNumber()
Decrements this unit's number (index) by 1. |
void |
decrementUnitNumber(int amount)
Decrements this unit's number (index) by the given value. |
boolean |
equals(Object obj)
Equality overload to ensure that units can be compared easily and correctly. |
protected void |
fireUnitNumberChanged(Integer oldValue)
Fires a UnitInfoEvent for a change in this object's unit
number. |
Integer |
getUnitNumber()
Returns the unit number (index) of this input source. |
Integer |
getUnitType()
Returns the type of this input source as specified by UnitConstants. |
int |
hashCode()
|
void |
incrementUnitNumber()
Increments this unit's number (index) by 1. |
void |
incrementUnitNumber(int amount)
Increments this unit's number (index) by the given value. |
void |
removeUnitInfoListener(UnitInfoListener l)
Removes the given object as a listener for events fired by this object. |
void |
setUnitNumber(int unitNumber)
Changes the unit number (index) of this input source to the given value. |
void |
setUnitNumber(Integer unitNumber)
Changes the unit number (index) of this input source to the given value. |
String |
toString()
Strig-ifies this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UnitInfo(Integer unitType,
int unitNumber)
unitType - the type of the unit (as specified in
UnitConstants) associated with this objectunitNumber - the number (index) of the unit associated with this
objectUnitConstants
public UnitInfo(Integer unitType,
Integer unitNumber)
unitType - the type of the unit (as specified in
UnitConstants) associated with this objectunitNumber - the number (index) of the unit associated with this
objectUnitConstants| Method Detail |
|---|
public Integer getUnitType()
UnitConstants.
UnitConstantspublic Integer getUnitNumber()
public void setUnitNumber(int unitNumber)
public void setUnitNumber(Integer unitNumber)
public void decrementUnitNumber()
public void decrementUnitNumber(int amount)
amount - the amount to decrement the unit numberpublic void incrementUnitNumber()
public void incrementUnitNumber(int amount)
amount - the amount to increment the unit numberpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic void addUnitInfoListener(UnitInfoListener l)
public void removeUnitInfoListener(UnitInfoListener l)
public String toString()
toString in class Objectprotected void fireUnitNumberChanged(Integer oldValue)
UnitInfoEvent for a change in this object's unit
number.
|
VRJConfig UI API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||