|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.text.JTextComponent
javax.swing.JTextField
org.tentackle.ui.FormField
org.tentackle.ui.NumberFormField
org.tentackle.ui.BMoneyFormField
public class BMoneyFormField
FormField to edit a BMoney object.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JTextField |
|---|
JTextField.AccessibleJTextField |
| Nested classes/interfaces inherited from class javax.swing.text.JTextComponent |
|---|
JTextComponent.AccessibleJTextComponent, JTextComponent.DropLocation, JTextComponent.KeyBinding |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static boolean |
defaultAutoComma
application-wide default setting for the auto-comma feature |
| Fields inherited from class org.tentackle.ui.NumberFormField |
|---|
format |
| Fields inherited from class org.tentackle.ui.FormField |
|---|
ADJUST_LEFT, ADJUST_NONE, ADJUST_RIGHT, ADJUST_TRIM, CONVERT_LC, CONVERT_NONE, CONVERT_UC, errorOffset |
| Fields inherited from class javax.swing.JTextField |
|---|
notifyAction |
| Fields inherited from class javax.swing.text.JTextComponent |
|---|
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
BMoneyFormField()
Creates an empty BMoneyFormField with the default document model, a minimum column width for a BMoney. |
|
BMoneyFormField(boolean parseDMoney)
Creates an empty BMoneyFormField with the default document model, and minimum column width. |
|
BMoneyFormField(Document doc,
int columns,
boolean parseDMoney)
Creates an empty BMoneyFormField. Notice: setting doc != null requires a doc derived from FormFieldDocument. |
|
BMoneyFormField(int columns,
boolean parseDMoney)
Creates an empty BMoneyFormField with the default document model and given column width. |
|
| Method Summary | |
|---|---|
DMoney |
getDMoney()
Gets the value as a DMoney. |
BMoney |
getFormValue()
Retrieves the value from this component. The method is used to update the data if the view has changed because the user edited it. |
boolean |
isAutoComma()
Returns the auto-comma setting. |
boolean |
isParseDMoney()
Gets the flag whether getFormValue() will return DMoney or BMoney. |
void |
setAutoComma(boolean autoComma)
Sets the auto-comma feature. Allows "business" keyboard input, i.e. |
void |
setFormat(String pattern)
Sets the format string. The format string is used to format the view of the data. |
void |
setFormValue(Object object)
Sets a value in this component. The method is used to update the view if the data has changed. |
void |
setParseDMoney(boolean parseDMoney)
Sets whether getFormValue() returns BMoney or DMoney. |
| Methods inherited from class org.tentackle.ui.NumberFormField |
|---|
doFormat, getFormat, getScale, isBlankZero, isUnsigned, setBlankZero, setScale, setUnsigned, setValidChars |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.tentackle.ui.FormFieldComponent |
|---|
getBaseline, getCaretPosition, getColumns, getHorizontalAlignment, setCaretPosition, setHorizontalAlignment, setToolTipText |
| Methods inherited from interface org.tentackle.ui.FormComponent |
|---|
hasFocus |
| Field Detail |
|---|
public static boolean defaultAutoComma
| Constructor Detail |
|---|
public BMoneyFormField(Document doc,
int columns,
boolean parseDMoney)
doc - the document model, null = defaultcolumns - the number of columns, 0 = minimum widthparseDMoney - true if getFormValue() returns DMoney, false if BMoney
public BMoneyFormField(int columns,
boolean parseDMoney)
columns - the number of columns, 0 = minimum widthparseDMoney - true if getFormValue() returns DMoney, false if BMoneypublic BMoneyFormField(boolean parseDMoney)
parseDMoney - true if getFormValue() returns DMoney, false if BMoneypublic BMoneyFormField()
| Method Detail |
|---|
public void setFormValue(Object object)
Overridden to set the scale from the money value
setFormValue in interface FormComponentsetFormValue in class NumberFormFieldobject - is the object to setpublic BMoney getFormValue()
FormComponent
public DMoney getDMoney()
public void setParseDMoney(boolean parseDMoney)
parseDMoney - public boolean isParseDMoney()
public void setFormat(String pattern)
Overridden cause of comma-char.
setFormat in interface FormFieldComponentsetFormat in class NumberFormFieldpattern - the format stringDecimalFormatpublic void setAutoComma(boolean autoComma)
Example: "1122" --> "11.22" if scale was 2.
autoComma - true if automatically set the comma, false if not (default)defaultAutoCommapublic boolean isAutoComma()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||