JIDE 3.5.15

com.jidesoft.spinner
Class SpinnerPointModel

java.lang.Object
  extended by javax.swing.AbstractSpinnerModel
      extended by com.jidesoft.spinner.SpinnerPointModel
All Implemented Interfaces:
SpinnerModel

public class SpinnerPointModel
extends AbstractSpinnerModel

Author:
Nako Ruru

Field Summary
static int FIELD_X
           
static int FIELD_Y
           
 
Fields inherited from class javax.swing.AbstractSpinnerModel
listenerList
 
Constructor Summary
SpinnerPointModel()
          Create a default SpinnerPointModel
SpinnerPointModel(Point point)
          Create a SpinnerPointModel with a specified Point
 
Method Summary
 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.
 
Methods inherited from class javax.swing.AbstractSpinnerModel
addChangeListener, fireStateChanged, getChangeListeners, getListeners, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIELD_X

public static final int FIELD_X
See Also:
Constant Field Values

FIELD_Y

public static final int FIELD_Y
See Also:
Constant Field Values
Constructor Detail

SpinnerPointModel

public SpinnerPointModel()
Create a default SpinnerPointModel


SpinnerPointModel

public SpinnerPointModel(Point point)
Create a SpinnerPointModel with a specified Point

Parameters:
point - this specifiedPoint
Method Detail

getValue

public Object getValue()
The current element of the sequence. This element is usually displayed by the editor part of a JSpinner.

Returns:
the current spinner value.
See Also:
setValue(java.lang.Object)

setValue

public void setValue(Object value)
Changes current value of the model, typically this value is displayed by the 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.

Parameters:
value - new value
Throws:
IllegalArgumentException - if value isn't allowed
See Also:
getValue()

getPoint

public Point getPoint()
The current element of the sequence. This element is usually displayed by the editor part of a JSpinner.

Returns:
the current spinner value.
See Also:
setPoint(Point), getValue()

setPoint

public void setPoint(Point point)
Parameters:
point - the new point

getField

public int getField()
Returns:
the field.

setField

public void setField(int field)
Parameters:
field - the new field.

getNextValue

public Object getNextValue()
Return the object in the sequence that comes after the object returned by getValue(). If the end of the sequence has been reached then return null. Calling this method does not effect value.

Returns:
the next legal value or null if one doesn't exist
See Also:
getValue(), getPreviousValue()

getPreviousValue

public Object getPreviousValue()
Return the object in the sequence that comes before the object returned by getValue(). If the end of the sequence has been reached then return null. Calling this method does not effect value.

Returns:
the previous legal value or null if one doesn't exist
See Also:
getValue(), getNextValue()

JIDE 3.5.15