public class JaxoSpinnerIntModel
extends javax.swing.SpinnerNumberModel
Constructor | Description |
---|---|
JaxoSpinnerIntModel(int minimum,
int maximum,
int stepSize) |
With the given properties.
|
JaxoSpinnerIntModel(int minimum,
int maximum,
int stepSize,
int orig) |
With the given properties.
|
Modifier and Type | Method | Description |
---|---|---|
int |
getIntValue() |
SpinnerNumberModel.getValue() as an int. |
int |
getOrigin() |
Origin to be used for snapping.
|
boolean |
isSnap() |
Is 'value' always snapped to 'origin' + multiples of stepSize?
|
void |
setIntStepSize(int newValue) |
setStepSize(java.lang.Number) with int argument. |
void |
setIntValue(int newValue) |
setValue(java.lang.Object) with int argument. |
void |
setOrigin(int newValue) |
Set origin property (potentially changing also 'value').
|
void |
setSnap(boolean newValue) |
Set snap property (potentially changing also 'value').
|
void |
setStepSize(java.lang.Number stepSize) |
|
void |
setValue(java.lang.Object value) |
addChangeListener, fireStateChanged, getChangeListeners, getListeners, removeChangeListener
public JaxoSpinnerIntModel(int minimum, int maximum, int stepSize)
minimum
- minimummaximum
- maximumstepSize
- stepSizepublic JaxoSpinnerIntModel(int minimum, int maximum, int stepSize, int orig)
minimum
- minimummaximum
- maximumstepSize
- stepSizeorig
- originpublic final int getIntValue()
SpinnerNumberModel.getValue()
as an int.public void setValue(java.lang.Object value)
setValue
in class javax.swing.SpinnerNumberModel
public final void setIntValue(int newValue)
setValue(java.lang.Object)
with int argument.newValue
- the new int value.public void setIntStepSize(int newValue)
setStepSize(java.lang.Number)
with int argument.newValue
- the new step size.public void setStepSize(java.lang.Number stepSize)
setStepSize
in class javax.swing.SpinnerNumberModel
public final int getOrigin()
origin + n * stepSize
, with
'n' an integer.public void setOrigin(int newValue)
newValue
- the new origin.public final boolean isSnap()
public void setSnap(boolean newValue)
newValue
- the new snap.Licensed under GPL. For more information, see http://jaxodraw.sourceforge.net/license.html or the LICENSE file in the jaxodraw distribution.