|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmseries.ui.DefaultSpinnerEditor
gpl.fredy.generate.DoubleEditor
public class DoubleEditor
A SpinnerEditor that renders integer (int)data.
MIntegerSpinnerModel
Nested Class Summary | |
---|---|
protected class |
DoubleEditor.IntegerDocument
The 'magic' behind any custom text field. |
Nested classes/interfaces inherited from class mseries.ui.DefaultSpinnerEditor |
---|
mseries.ui.DefaultSpinnerEditor.ReadOnlyDocument |
Field Summary |
---|
Fields inherited from class mseries.ui.DefaultSpinnerEditor |
---|
display, value |
Constructor Summary | |
---|---|
DoubleEditor()
Default constructor that creates the editor with the default format of zzzzzzz9.99 |
|
DoubleEditor(java.lang.String pattern)
Constructor used to set a custom format. |
Method Summary | |
---|---|
java.lang.String |
getFormat()
Sets the format for display using the |
javax.swing.JTextField |
getTextfield()
Gets the textfield that allows user input |
java.lang.Object |
getValue()
Get the value of the field |
void |
setFormatter(java.text.NumberFormat formatter)
Sets a custom formatter |
void |
setValue(java.lang.Object value)
Sets the value in the field |
Methods inherited from class mseries.ui.DefaultSpinnerEditor |
---|
getCustomDocument, getModel, getStep, getTextField, isEditable, setEditable, setModel, stateChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DoubleEditor()
public DoubleEditor(java.lang.String pattern)
z - a zero value in this position is supressed 9 - a place holder to determine the size of the field For Examples with a value of 123.4 you would see zz9.99 - 123.40 zzz9.99 - 123.40 zzz9.9 - 123.4 9999.99 - 0123.40Of course a NumberFormat object can be set using the setFormatter method
Method Detail |
---|
public java.lang.Object getValue()
getValue
in interface mseries.ui.SpinnerEditor
getValue
in class mseries.ui.DefaultSpinnerEditor
public javax.swing.JTextField getTextfield()
public void setValue(java.lang.Object value)
setValue
in interface mseries.ui.SpinnerEditor
setValue
in class mseries.ui.DefaultSpinnerEditor
value
- the new valuepublic java.lang.String getFormat()
format
- the display format,public void setFormatter(java.text.NumberFormat formatter)
the
- formatter,
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |