java.lang.Object | +--com.sun.kjava.ValueSelector
An object that presents a user interface for integer value selection.
It contains three Buttons:
Constructor Summary | |
ValueSelector(java.lang.String label,
int min,
int max,
int init,
int x,
int y)
Create a new ValueSelector. |
Method Summary | |
int |
getValue()
What's the current value? |
void |
paint()
Paint the ValueSelector. |
boolean |
pressed(int x,
int y)
If one of the Buttons was pressed, have it deal with it. |
void |
setValue(int value)
Set the current value. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ValueSelector(java.lang.String label, int min, int max, int init, int x, int y)
label
- the label for the ValueSelectormin
- minimum value to allowmax
- maximum value to allowinit
- initial valuex
- the X coordinate of our positiony
- the Y coordinate of our positionMethod Detail |
public void paint()
public int getValue()
public void setValue(int value)
value
- the value to setpublic boolean pressed(int x, int y)
x
- the X coordinate of the user's pressy
- the Y coordinate of the user's press