Top Description Fields Constructors Methods
javax.swing

public abstract Class AbstractCellEditor

extends Object
implements CellEditor, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, javax.swing.CellEditor
Known Direct Subclasses
javax.swing.DefaultCellEditor
Annotations
@SuppressWarnings:serial
Imports
javax.swing.event.*, java.util.EventObject, java.io.Serializable

A base class for CellEditors, providing default implementations for the methods in the CellEditor interface except getCellEditorValue(). Like the other abstract implementations in Swing, also manages a list of listeners.

Warning

Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans has been added to the java.beans package. Please see java.beans.XMLEncoder.

Author
Philip Milne
Since
1.3

Field Summary

Modifier and TypeField and Description
protected transient ChangeEvent
changeEvent

The change event.

protected EventListenerList
listenerList

The list of listeners.

Constructor Summary

AccessConstructor and Description
protected
AbstractCellEditor()

Constructor for subclasses to call.

Method Summary

Modifier and TypeMethod and Description
public void
addCellEditorListener(CellEditorListener
the new listener to be added
l
)

Implements javax.swing.CellEditor.addCellEditorListener.

Adds a CellEditorListener to the listener list.
public void
cancelCellEditing()

Implements javax.swing.CellEditor.cancelCellEditing.

Calls fireEditingCanceled.
protected void
fireEditingCanceled()

Notifies all listeners that have registered interest for notification on this event type.

protected void
fireEditingStopped()

Notifies all listeners that have registered interest for notification on this event type.

public CellEditorListener[]

Returns:

all of the CellEditorListeners added or an empty array if no listeners have been added
getCellEditorListeners
()

Returns an array of all the CellEditorListeners added to this AbstractCellEditor with addCellEditorListener().

public boolean

Returns:

true
isCellEditable
(EventObject
an event object
e
)

Implements javax.swing.CellEditor.isCellEditable.

Returns true.
public void
removeCellEditorListener(CellEditorListener
the listener to be removed
l
)

Implements javax.swing.CellEditor.removeCellEditorListener.

Removes a CellEditorListener from the listener list.
public boolean

Returns:

true
shouldSelectCell
(EventObject
an event object
anEvent
)

Implements javax.swing.CellEditor.shouldSelectCell.

Returns true.
public boolean

Returns:

true
stopCellEditing
()

Implements javax.swing.CellEditor.stopCellEditing.

Calls fireEditingStopped and returns true.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

changeEventback to summary
protected transient ChangeEvent changeEvent

The change event.

listenerListback to summary
protected EventListenerList listenerList

The list of listeners.

Constructor Detail

AbstractCellEditorback to summary
protected AbstractCellEditor()

Constructor for subclasses to call.

Method Detail

addCellEditorListenerback to summary
public void addCellEditorListener(CellEditorListener l)

Implements javax.swing.CellEditor.addCellEditorListener.

Adds a CellEditorListener to the listener list.

Parameters
l:CellEditorListener

the new listener to be added

cancelCellEditingback to summary
public void cancelCellEditing()

Implements javax.swing.CellEditor.cancelCellEditing.

Calls fireEditingCanceled.

fireEditingCanceledback to summary
protected void fireEditingCanceled()

Notifies all listeners that have registered interest for notification on this event type. The event instance is created lazily.

See Also
EventListenerList
fireEditingStoppedback to summary
protected void fireEditingStopped()

Notifies all listeners that have registered interest for notification on this event type. The event instance is created lazily.

See Also
EventListenerList
getCellEditorListenersback to summary
public CellEditorListener[] getCellEditorListeners()

Returns an array of all the CellEditorListeners added to this AbstractCellEditor with addCellEditorListener().

Returns:CellEditorListener[]

all of the CellEditorListeners added or an empty array if no listeners have been added

Since
1.4
isCellEditableback to summary
public boolean isCellEditable(EventObject e)

Implements javax.swing.CellEditor.isCellEditable.

Returns true.

Parameters
e:EventObject

an event object

Returns:boolean

true

removeCellEditorListenerback to summary
public void removeCellEditorListener(CellEditorListener l)

Implements javax.swing.CellEditor.removeCellEditorListener.

Removes a CellEditorListener from the listener list.

Parameters
l:CellEditorListener

the listener to be removed

shouldSelectCellback to summary
public boolean shouldSelectCell(EventObject anEvent)

Implements javax.swing.CellEditor.shouldSelectCell.

Returns true.

Parameters
anEvent:EventObject

an event object

Returns:boolean

true

stopCellEditingback to summary
public boolean stopCellEditing()

Implements javax.swing.CellEditor.stopCellEditing.

Calls fireEditingStopped and returns true.

Returns:boolean

true