|
||||||||||
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.DateCellEditor
public class DateCellEditor
Cell editor for editing dates using the jaret datechooser. Supports java.util.date and JaretDate. The fieldidentifier used for the datechooser (see Javadoc there) is not locale dependant (Day/Month/year) have to be changed when used in another country (or removed!).
Key bindings: TAB and CR will leave the datechooser (positive). ESC will leave the chooser resetting the date to the value present when editing started.
Field Summary | |
---|---|
protected de.jaret.util.ui.datechooser.DateChooser |
_chooser
chooser component. |
protected de.jaret.util.date.JaretDate |
_oldJaretDateVal
old JaretDate value if present. |
protected java.util.Date |
_oldVal
old java.util.Date val if present. |
Fields inherited from class de.jaret.util.ui.table.editor.CellEditorBase |
---|
_column, _row, _table |
Constructor Summary | |
---|---|
DateCellEditor()
|
Method Summary | |
---|---|
void |
choosingCanceled()
When the chooser tells us the user canceled the editing, restore the old date. |
void |
dateChosen(java.util.Date date)
If the users choses a date, stop editing an store the chosen date. |
void |
dateIntermediateChange(java.util.Date date)
No Action on intermediate changes in the chooser. |
void |
dispose()
Dispose whatever resouces have been allocated. |
void |
focusGained(org.eclipse.swt.events.FocusEvent e)
Do nothing on focus gained. |
void |
focusLost(org.eclipse.swt.events.FocusEvent e)
When loosing focus, stop the editing and 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. |
void |
inputInvalid()
nothing to do. |
void |
stopEditing(boolean storeInput)
End editing. |
Methods inherited from class de.jaret.util.ui.table.editor.CellEditorBase |
---|
getPreferredHeight, 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 |
---|
getPreferredHeight, handleClick |
Field Detail |
---|
protected de.jaret.util.ui.datechooser.DateChooser _chooser
protected java.util.Date _oldVal
protected de.jaret.util.date.JaretDate _oldJaretDateVal
Constructor Detail |
---|
public DateCellEditor()
Method Detail |
---|
public 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 void stopEditing(boolean storeInput)
stopEditing
in interface ICellEditor
storeInput
- if true the editor shall save the current input.public void dispose()
dispose
in interface ICellEditor
dispose
in class CellEditorBase
public void dateChosen(java.util.Date date)
dateChosen
in interface de.jaret.util.ui.datechooser.IDateChooserListener
public void dateIntermediateChange(java.util.Date date)
dateIntermediateChange
in interface de.jaret.util.ui.datechooser.IDateChooserListener
public void choosingCanceled()
choosingCanceled
in interface de.jaret.util.ui.datechooser.IDateChooserListener
public void inputInvalid()
inputInvalid
in interface de.jaret.util.ui.datechooser.IDateChooserListener
public void focusGained(org.eclipse.swt.events.FocusEvent e)
focusGained
in interface org.eclipse.swt.events.FocusListener
public void focusLost(org.eclipse.swt.events.FocusEvent e)
focusLost
in interface org.eclipse.swt.events.FocusListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |