|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.yospace.yae.yogi.YogiComponent
|
+--com.yospace.yae.yogi.YogiRange
Encapsulates a numeric range and a given value within that range, and provides the "unit" and "block" increment sizes for moving the value.
Note that the min value may be larger than the max value, in which case the value will still be clamped to the range. However, it is recommended that the unit/block increments be set to a negative value, otherwise counting up will head towards min, and components based on this may malfunction in interesting ways.
| Field Summary | |
protected int |
maxValue
The maximum value to which the YogiRange value member may be set. |
protected int |
minValue
The minimum value to which the YogiRange value member may be set. |
static int |
PROPERTY_BLOCK_INCREMENT
Constant for scroll block property. |
static int |
PROPERTY_MAX_VALUE
Constant for the max value property |
static int |
PROPERTY_MIN_VALUE
Constant for the min value property |
static int |
PROPERTY_UNIT_INCREMENT
Constant for scroll unit property. |
static int |
PROPERTY_VALUE
Constant for the value property |
protected int |
value
Value currently represented by the YogiRange. |
| Constructor Summary | |
YogiRange()
Default constructor. |
|
YogiRange(int value,
int minValue,
int maxValue,
int unitIncrement,
int blockIncrement)
Constructor which initialises the YogiRange to specified current, min and max values. |
|
| Method Summary | |
int |
getBlockIncrement()
Accesses the size of the vertical scroll block. |
int |
getMaxValue()
Gets the maximum value allowed in the YogiRange. |
int |
getMinValue()
Gets the minimum value allowed in the YogiRange. |
int |
getRange()
Convenience method for determining the range between the minimum and maximum values. |
int |
getUnitIncrement()
Accesses the size of the vertical scroll unit. |
int |
getValue()
Gets the value of the YogiRange. |
void |
setBlockIncrement(int blockIncrement)
Sets the number of pixels to be moved in a vertical "block" scroll. |
void |
setMaxValue(int maxValue)
Sets the maximum value of the YogiRange to the specified value. |
void |
setMinValue(int minValue)
Sets the minimum value of the YogiRange to the specified value. |
void |
setUnitIncrement(int unitIncrement)
Sets the number of pixels to be moved in a vertical "unit" scroll. |
void |
setValue(int value)
Sets the current value of the YogiRange to the specified value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int PROPERTY_VALUE
public static final int PROPERTY_MIN_VALUE
public static final int PROPERTY_MAX_VALUE
public static final int PROPERTY_UNIT_INCREMENT
public static final int PROPERTY_BLOCK_INCREMENT
protected int value
protected int minValue
protected int maxValue
| Constructor Detail |
public YogiRange()
public YogiRange(int value,
int minValue,
int maxValue,
int unitIncrement,
int blockIncrement)
value - the YogiRange's current value.minValue - the YogiRange's minimum value.maxValue - the YogiRange's maximum value.unitIncrement - the YogiRange's unit increment.blockIncrement - the YogiRange's block increment.| Method Detail |
public void setValue(int value)
PROPERTY_VALUE is fired if the value to set is different from
the previous value.value - the YogiRange's current value.public void setMinValue(int minValue)
PROPERTY_MIN_VALUE is fired if the value to set is different from
the previous value.
If the value now lies outside the range min to max inclusive,
then it is clamped to the nearest limit, and a PROPERTY_VALUE event will be fired.
minValue - the YogiRange's minimum value.public void setMaxValue(int maxValue)
PROPERTY_MAX_VALUE is fired if the value to set is different from
the previous value.
If the value now lies outside the range min to max inclusive,
then it is clamped to the nearest limit, and a PROPERTY_VALUE event will be fired.
maxValue - the YogiRange's maximum value.public int getValue()
public int getMinValue()
public int getMaxValue()
public void setUnitIncrement(int unitIncrement)
unit - the size of a vertical unit scroll in pixels.public void setBlockIncrement(int blockIncrement)
block - the size of a vertical block scroll in pixels.public int getUnitIncrement()
public int getBlockIncrement()
public int getRange()
|
Copyright 2002 Yospace Holdings Ltd. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||