|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.binding.adapter.SpinnerToValueModelConnector
public final class SpinnerToValueModelConnector
Synchronizes a SpinnerModel with a ValueModel.
SpinnerModel
,
ValueModel
Constructor Summary | |
---|---|
SpinnerToValueModelConnector(SpinnerModel spinnerModel,
ValueModel valueModel,
Object defaultValue)
Constructs a SpinnerToValueModelConnector that establishes a Synchronization between the SpinnerModel and ValueModel. |
Method Summary | |
---|---|
static void |
connect(SpinnerModel spinnerModel,
ValueModel valueModel,
Object defaultValue)
Establishes a synchronization between the SpinnerModel and ValueModel. |
void |
updateSpinnerModel()
Sets the subject value as spinner value. |
void |
updateValueModel()
Sets the spinner value as value model's value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpinnerToValueModelConnector(SpinnerModel spinnerModel, ValueModel valueModel, Object defaultValue)
#updateSpinnerModel
or #updateValueModel
.
In case you don't need the connector instance, you better use
the static method connect(SpinnerModel, ValueModel, Object)
.
This constructor may confuse developers if you just use
the side effects performed in the constructor; this is because it is
quite unconventional to instantiate an object that you never use.
spinnerModel
- the SpinnerModel to be synchronizedvalueModel
- the ValueModel to be synchronizeddefaultValue
- the value that will be used to update
the spinnerModel, if the valueModel's value is null
NullPointerException
- if the spinnerModel, valueModel or defaultValue is null
Method Detail |
---|
public static void connect(SpinnerModel spinnerModel, ValueModel valueModel, Object defaultValue)
#updateSpinnerModel
or #updateValueModel
.
spinnerModel
- the SpinnerModel to be synchronizedvalueModel
- the ValueModel to be synchronizeddefaultValue
- the value used if the valueModel's value is null
NullPointerException
- if the spinnerModel or valueModel is null
public void updateSpinnerModel()
public void updateValueModel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |