public class SpinnerPointModel
extends javax.swing.AbstractSpinnerModel
| Constructor and Description |
|---|
SpinnerPointModel()
Create a default
SpinnerPointModel |
SpinnerPointModel(java.awt.Point point)
Create a
SpinnerPointModel with a specified Point |
| Modifier and Type | Method and Description |
|---|---|
int |
getField() |
java.lang.Object |
getNextValue()
Return the object in the sequence that comes after the object returned by
getValue(). |
java.awt.Point |
getPoint()
The current element of the sequence.
|
java.lang.Object |
getPreviousValue()
Return the object in the sequence that comes before the object returned by
getValue(). |
java.lang.Object |
getValue()
The current element of the sequence.
|
void |
setField(int field) |
void |
setPoint(java.awt.Point point) |
void |
setValue(java.lang.Object value)
Changes current value of the model, typically this value is displayed by the
editor part of a
JSpinner. |
public static final int FIELD_X
public static final int FIELD_Y
public SpinnerPointModel()
SpinnerPointModelpublic SpinnerPointModel(java.awt.Point point)
SpinnerPointModel with a specified Pointpoint - this specifiedPointpublic java.lang.Object getValue()
editor part of
a JSpinner.setValue(java.lang.Object)public void setValue(java.lang.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 valuejava.lang.IllegalArgumentException - if value isn't allowedgetValue()public java.awt.Point getPoint()
editor part of
a JSpinner.setPoint(Point),
getValue()public void setPoint(java.awt.Point point)
point - the new pointpublic int getField()
public void setField(int field)
field - the new field.public java.lang.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 java.lang.Object getPreviousValue()
getValue(). If the end
of the sequence has been reached then return null. Calling this method does not effect value.getValue(),
getNextValue()