|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractCellEditor
javax.swing.DefaultCellEditor
kiwi.ui.NumericCellEditor
A cell editor for editing numeric fields, including integer, decimal, percentage, and currency amounts, formatted according to the rules of the current locale.
kiwi.text.FormatConstants
,
LocaleManager
,
NumericField
,
NumericTableCellRenderer
,
kiwi.db.DomainObjectFieldAdapter
,
Serialized FormNested Class Summary |
Nested classes inherited from class javax.swing.DefaultCellEditor |
javax.swing.DefaultCellEditor.EditorDelegate |
Field Summary | |
private NumericField |
field
|
Fields inherited from class javax.swing.DefaultCellEditor |
clickCountToStart, delegate, editorComponent |
Fields inherited from class javax.swing.AbstractCellEditor |
changeEvent, listenerList |
Constructor Summary | |
NumericCellEditor(int type)
Construct a new NumericCellEditor of the specified type. |
|
NumericCellEditor(int type,
int decimals)
Construct a new NumericCellEditor of the specified type and
number of decimals displayed. |
Method Summary | |
private java.awt.Component |
_prepareEditor(java.lang.Object value)
|
java.lang.Object |
getCellEditorValue()
Get the value currently in the cell editor. |
int |
getDecimals()
Get the number of decimal places being displayed by this cell editor. |
java.awt.Component |
getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column)
Get an editor for a JTable. |
java.awt.Component |
getTreeCellEditorComponent(javax.swing.JTree tree,
java.lang.Object value,
boolean isSelected,
boolean expanded,
boolean leaf,
int row)
Get an editor for a JTree. |
int |
getType()
Get the formatting type. |
void |
setDecimals(int decimals)
Set the number of decimal places to display for non-integer values. |
void |
setType(int type)
Set the formatting type. |
boolean |
stopCellEditing()
Stop cell editing. |
private boolean |
validate()
|
Methods inherited from class javax.swing.DefaultCellEditor |
cancelCellEditing, getClickCountToStart, getComponent, isCellEditable, setClickCountToStart, shouldSelectCell |
Methods inherited from class javax.swing.AbstractCellEditor |
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.CellEditor |
addCellEditorListener, removeCellEditorListener |
Field Detail |
private NumericField field
Constructor Detail |
public NumericCellEditor(int type)
NumericCellEditor
of the specified type.
type
- The data type to be edited by this field; one of the
constants CURRENCY_FORMAT
, DECIMAL_FORMAT
,
INTEGER_FORMAT
PERCENTAGE_FORMAT, defined in
kiwi.text.FormatConstants
.public NumericCellEditor(int type, int decimals)
NumericCellEditor
of the specified type and
number of decimals displayed.
type
- The data type to be edited by this field; one of the
constants CURRENCY_FORMAT
, DECIMAL_FORMAT
,
INTEGER_FORMAT
PERCENTAGE_FORMAT, defined in
kiwi.text.FormatConstants
.decimals
- The number of decimal places to be displayed (for
non-integer values only).Method Detail |
public final boolean stopCellEditing()
true
if cell editing may stop, and false
otherwise.private boolean validate()
public java.lang.Object getCellEditorValue()
Double
.public void setType(int type)
type
- The data type to be edited by this cell editor. See the
constructor for more information.public int getType()
public void setDecimals(int decimals)
decimals
- The number of decimal places.
java.lang.IllegalArgumentException
- If decimals
is less than 0.public int getDecimals()
private java.awt.Component _prepareEditor(java.lang.Object value)
public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
public java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree, java.lang.Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |