de.kupzog.ktable.editors
Class KTableCellEditorCheckbox
java.lang.Object
de.kupzog.ktable.KTableCellEditor
de.kupzog.ktable.editors.KTableCellEditorCheckbox
- Direct Known Subclasses:
- KTableCellEditorCheckbox2
public class KTableCellEditorCheckbox
- extends KTableCellEditor
A cell editor that expects a Boolean cell value
and simply switches this value. It has no control, it
just changes the value in the model and forces a cell
redraw.
NOTE: This implementation makes the whole cell area sensible.
It is activated by a RETURN, a SPACE or a single mouse click.
Note: If you need this behavior, but wish to have only a part
of the cell area that is sensible (like che checkbox that must
be clicked, independently of how big the cell area is), look at
KTableCellEditorCheckbox2.
- Author:
- Lorenz Maierhofer
- See Also:
KTableCellEditorCheckbox2
,
de.kupzog.ktable.cellrenderers.CheckableCellRenderer
Method Summary |
void |
close(boolean save)
Simply switches the boolean value in the model! |
int |
getActivationSignals()
|
void |
open(KTable table,
int col,
int row,
org.eclipse.swt.graphics.Rectangle rect)
Activates the editor at the given position. |
void |
setContent(java.lang.Object content)
This implementation does nothing! |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KTableCellEditorCheckbox
public KTableCellEditorCheckbox()
open
public void open(KTable table,
int col,
int row,
org.eclipse.swt.graphics.Rectangle rect)
- Activates the editor at the given position.
Instantly closes the editor and switch the boolean content value.
- Overrides:
open
in class KTableCellEditor
- Parameters:
row
- col
- rect
-
close
public void close(boolean save)
- Simply switches the boolean value in the model!
- Overrides:
close
in class KTableCellEditor
- Parameters:
save
- If true, the content is saved to the underlying table.
setContent
public void setContent(java.lang.Object content)
- This implementation does nothing!
- Specified by:
setContent
in class KTableCellEditor
- Parameters:
content
- The new content to set.- See Also:
KTableCellEditor.setContent(java.lang.Object)
getActivationSignals
public int getActivationSignals()
- Overrides:
getActivationSignals
in class KTableCellEditor
- Returns:
- Returns a value indicating on which actions
this editor should be activated.