|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.jaret.util.ui.table.editor.CellEditorBase de.jaret.util.ui.table.editor.DoubleCellEditor
public class DoubleCellEditor
Cell Editor for editing double values.
Key bindings: CR, TAB: accept input and leave, ESC leave and reset to value when starting editing. Cursor up/down will roll the value.
Field Summary | |
---|---|
protected de.jaret.util.ui.DoubleField |
_doubleField
doublefield managing the input. |
protected double |
_oldVal
old value for restauration. |
protected org.eclipse.swt.widgets.Text |
_text
text control wrapped by the doublefield. |
Fields inherited from class de.jaret.util.ui.table.editor.CellEditorBase |
---|
_column, _row, _table |
Constructor Summary | |
---|---|
DoubleCellEditor()
Default constructor. |
Method Summary | |
---|---|
protected double |
convertValue(IRow row,
IColumn column)
Convert the value retrieved from the model. |
void |
dispose()
Dispose whatever resouces have been allocated. |
void |
focusGained(org.eclipse.swt.events.FocusEvent arg0)
do nothing. |
void |
focusLost(org.eclipse.swt.events.FocusEvent arg0)
On losing focus store the value. |
org.eclipse.swt.widgets.Control |
getEditorControl(JaretTable table,
IRow row,
IColumn column,
char typedKey)
Provide the Control for editing the value at row/column. |
int |
getPreferredHeight()
If the renderer *wishes* to be sized not the height of the cell, this method may be used to announce the preferred height of the control. |
void |
stopEditing(boolean storeInput)
End editing. |
protected void |
storeValue(IRow row,
IColumn column)
Store the value in the model. |
Methods inherited from class de.jaret.util.ui.table.editor.CellEditorBase |
---|
handleClick |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.jaret.util.ui.table.editor.ICellEditor |
---|
handleClick |
Field Detail |
---|
protected org.eclipse.swt.widgets.Text _text
protected double _oldVal
protected de.jaret.util.ui.DoubleField _doubleField
Constructor Detail |
---|
public DoubleCellEditor()
Method Detail |
---|
protected double convertValue(IRow row, IColumn column)
row
- row of the cellcolumn
- column of the cell
protected void storeValue(IRow row, IColumn column)
row
- rowcolumn
- columnpublic org.eclipse.swt.widgets.Control getEditorControl(JaretTable table, IRow row, IColumn column, char typedKey)
This method may return null
indicating that the editor will not supply a control.
getEditorControl
in interface ICellEditor
getEditorControl
in class CellEditorBase
table
- the table requesting the editorrow
- rowcolumn
- columntypedKey
- the character typed when invoking the editor (may be 0 if the editor was invoked without typing
any key)
public int getPreferredHeight()
getPreferredHeight
in interface ICellEditor
getPreferredHeight
in class CellEditorBase
public void focusGained(org.eclipse.swt.events.FocusEvent arg0)
focusGained
in interface org.eclipse.swt.events.FocusListener
public void focusLost(org.eclipse.swt.events.FocusEvent arg0)
focusLost
in interface org.eclipse.swt.events.FocusListener
public void dispose()
dispose
in interface ICellEditor
dispose
in class CellEditorBase
public void stopEditing(boolean storeInput)
stopEditing
in interface ICellEditor
storeInput
- if true the editor shall save the current input.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |