|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.code.validationframework.swing.dataprovider.JSpinnerEditorValueProvider<DPO>
DPO - Type of data in the spinner editor.Object.public class JSpinnerEditorValueProvider<DPO>
Data provider reading the value from a spinner.
Note that the value is not read from the model, but instead
corresponds to the current text.
DataProvider,
JSpinner| Constructor Summary | |
|---|---|
JSpinnerEditorValueProvider(JSpinner spinner)
Constructor specifying the spinner to get the value from. |
|
JSpinnerEditorValueProvider(JSpinner spinner,
com.google.code.validationframework.base.transform.Transformer<Object,DPO> transformer)
Constructor specifying the spinner to get the value from and the transformer to convert it to the required type. |
|
| Method Summary | |
|---|---|
JSpinner |
getComponent()
Gets the component providing the data to be validated. |
DPO |
getData()
|
protected JFormattedTextField.AbstractFormatter |
getFormatter()
Retrieves the formatter currently in the text component of the spinner, if any. Note that if editor of the spinner has been customized, this method may need to be adapted in a sub-class. |
protected String |
getText()
Retrieves the text currently in the text component of the spinner, if any. Note that if editor of the spinner has been customized, this method may need to be adapted in a sub-class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JSpinnerEditorValueProvider(JSpinner spinner)
spinner - Spinner to get the value from.
public JSpinnerEditorValueProvider(JSpinner spinner,
com.google.code.validationframework.base.transform.Transformer<Object,DPO> transformer)
spinner - Spinner to get the value from.transformer - Transformer used to convert the object parsed from the spinner to the expected type.| Method Detail |
|---|
public JSpinner getComponent()
public DPO getData()
getData in interface com.google.code.validationframework.api.dataprovider.DataProvider<DPO>DataProvider.getData()protected String getText()
protected JFormattedTextField.AbstractFormatter getFormatter()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||