public class SpinnerPointModel extends AbstractSpinnerModel
Modifier and Type | Field and Description |
---|---|
static int |
FIELD_X |
static int |
FIELD_Y |
listenerList
Constructor and Description |
---|
SpinnerPointModel()
Create a default
SpinnerPointModel |
SpinnerPointModel(Point point)
Create a
SpinnerPointModel with a specified Point |
Modifier and Type | Method and Description |
---|---|
int |
getField() |
Object |
getNextValue()
Return the object in the sequence that comes after the object returned by
getValue() . |
Point |
getPoint()
The current element of the sequence.
|
Object |
getPreviousValue()
Return the object in the sequence that comes before the object returned by
getValue() . |
Object |
getValue()
The current element of the sequence.
|
void |
setField(int field) |
void |
setPoint(Point point) |
void |
setValue(Object value)
Changes current value of the model, typically this value is displayed by the
editor part of a
JSpinner . |
addChangeListener, fireStateChanged, getChangeListeners, getListeners, removeChangeListener
public static final int FIELD_X
public static final int FIELD_Y
public SpinnerPointModel()
SpinnerPointModel
public SpinnerPointModel(Point point)
SpinnerPointModel
with a specified Point
point
- this specifiedPoint
public Object getValue()
editor
part of
a JSpinner
.setValue(java.lang.Object)
public void setValue(Object value)
editor
part of a
JSpinner
. If the SpinnerModel
implementation doesn't support the specified value then
an IllegalArgumentException
is thrown. For example a SpinnerModel
for numbers might
only support values that are integer multiples of ten. In that case, model.setValue(new Number(11))
would throw an exception.value
- new valueIllegalArgumentException
- if value
isn't allowedgetValue()
public Point getPoint()
editor
part of
a JSpinner
.setPoint(Point)
,
getValue()
public void setPoint(Point point)
point
- the new pointpublic int getField()
public void setField(int field)
field
- the new field.public Object getNextValue()
getValue()
. If the end of
the sequence has been reached then return null. Calling this method does not effect value
.getValue()
,
getPreviousValue()
public Object getPreviousValue()
getValue()
. If the end
of the sequence has been reached then return null. Calling this method does not effect value
.getValue()
,
getNextValue()