javax.swing
public abstract class AbstractCellEditor extends Object implements CellEditor, Serializable
Modifier and Type | Field and Description |
---|---|
protected ChangeEvent |
changeEvent
The cached ChangeEvent.
|
protected EventListenerList |
listenerList
Our Swing event listeners.
|
Constructor and Description |
---|
AbstractCellEditor()
Creates a new instance of AbstractCellEditor.
|
Modifier and Type | Method and Description |
---|---|
void |
addCellEditorListener(CellEditorListener listener)
Adds a CellEditorListener to the list of CellEditorListeners of this
CellEditor.
|
void |
cancelCellEditing()
Stop editing the cell and do not accept any partial value that has
been entered into the cell.
|
protected void |
fireEditingCanceled()
Notifies all registered listeners that the editing of the cell has
has been canceled.
|
protected void |
fireEditingStopped()
Notifies all registered listeners that the editing of the cell has has been
stopped.
|
CellEditorListener[] |
getCellEditorListeners()
Returns the list of CellEditorListeners that have been registered
in this CellEditor.
|
boolean |
isCellEditable(EventObject event)
Returns
true if the cell is editable using
event , false
if it's not. |
void |
removeCellEditorListener(CellEditorListener listener)
Removes the specified CellEditorListener from the list of the
CellEditorListeners of this CellEditor.
|
boolean |
shouldSelectCell(EventObject event)
Returns
true if the editing cell should be selected,
false otherwise. |
boolean |
stopCellEditing()
Stop editing the cell and accept any partial value that has been entered
into the cell.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCellEditorValue
protected EventListenerList listenerList
protected transient ChangeEvent changeEvent
public AbstractCellEditor()
public boolean isCellEditable(EventObject event)
true
if the cell is editable using
event
, false
if it's not. The default behaviour is to return true
.isCellEditable
in interface CellEditor
event
- an eventtrue
if the cell is editable using
event
, false
if it's notpublic boolean shouldSelectCell(EventObject event)
true
if the editing cell should be selected,
false
otherwise. This is usually returning true
,
but in some special cases it might be useful not to switch cell selection
when editing one cell.shouldSelectCell
in interface CellEditor
event
- an eventtrue
if the editing cell should be selected,
false
otherwisepublic boolean stopCellEditing()
stopCellEditing
in interface CellEditor
true
if editing has been stopped successfully,
false
otherwisepublic void cancelCellEditing()
cancelCellEditing
in interface CellEditor
public void addCellEditorListener(CellEditorListener listener)
addCellEditorListener
in interface CellEditor
listener
- the CellEditorListener to addpublic void removeCellEditorListener(CellEditorListener listener)
removeCellEditorListener
in interface CellEditor
listener
- the CellEditorListener to removepublic CellEditorListener[] getCellEditorListeners()
protected void fireEditingStopped()
protected void fireEditingCanceled()