- java.lang.Object
-
- javax.swing.AbstractCellEditor
-
- All Implemented Interfaces:
-
Serializable,CellEditor
- 已知直接子类:
-
DefaultCellEditor
public abstract class AbstractCellEditor extends Object implements CellEditor, Serializable
CellEditors的基类,为CellEditor接口中的方法提供默认实现,除了getCellEditorValue()。 像Swing中的其他抽象实现一样,还管理一个监听器列表。警告:此类的序列化对象与将来的Swing版本不兼容。 当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。 从1.4开始,对于所有JavaBeans的长期存储的支持已被添加到
java.beans包中。 请参阅XMLEncoder。- 从以下版本开始:
- 1.3
- 另请参见:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field 描述 protected ChangeEventchangeEvent变更事件。protected EventListenerListlistenerList听众列表。
-
构造方法摘要
构造方法 Constructor 描述 AbstractCellEditor()
-
方法摘要
所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 voidaddCellEditorListener(CellEditorListener l)添加CellEditorListener到侦听器列表。voidcancelCellEditing()致电fireEditingCanceled。protected voidfireEditingCanceled()通知所有在此事件类型上通知有兴趣的听众。protected voidfireEditingStopped()通知所有在此事件类型上通知有兴趣的听众。CellEditorListener[]getCellEditorListeners()返回使用addCellEditorListener()添加到此AbstractCellEditor的所有CellEditorListener的数组。booleanisCellEditable(EventObject e)返回true。voidremoveCellEditorListener(CellEditorListener l)从侦听器列表中删除CellEditorListener。booleanshouldSelectCell(EventObject anEvent)返回true。booleanstopCellEditing()致电fireEditingStopped并返回true。-
Methods inherited from interface javax.swing.CellEditor
getCellEditorValue
-
-
-
-
字段详细信息
-
listenerList
protected EventListenerList listenerList
听众列表。
-
changeEvent
protected transient ChangeEvent changeEvent
变更事件。
-
-
方法详细信息
-
isCellEditable
public boolean isCellEditable(EventObject e)
返回true。- Specified by:
-
isCellEditable在接口CellEditor - 参数
-
e- 事件对象 - 结果
- 真正
- 另请参见:
-
CellEditor.shouldSelectCell(java.util.EventObject)
-
shouldSelectCell
public boolean shouldSelectCell(EventObject anEvent)
返回true。- Specified by:
-
shouldSelectCell在接口CellEditor - 参数
-
anEvent- 事件对象 - 结果
- 真正
- 另请参见:
-
CellEditor.isCellEditable(java.util.EventObject)
-
stopCellEditing
public boolean stopCellEditing()
致电fireEditingStopped并返回true。- Specified by:
-
stopCellEditing在接口CellEditor - 结果
- 真正
-
cancelCellEditing
public void cancelCellEditing()
致电fireEditingCanceled。- Specified by:
-
cancelCellEditing在接口CellEditor
-
addCellEditorListener
public void addCellEditorListener(CellEditorListener l)
添加一个CellEditorListener到监听器列表。- Specified by:
-
addCellEditorListener在接口CellEditor - 参数
-
l- 要添加的新侦听器
-
removeCellEditorListener
public void removeCellEditorListener(CellEditorListener l)
从侦听器列表中删除CellEditorListener。- Specified by:
-
removeCellEditorListener在接口CellEditor - 参数
-
l- 要删除的侦听器
-
getCellEditorListeners
public CellEditorListener[] getCellEditorListeners()
返回使用addCellEditorListener()添加到此AbstractCellEditor的所有CellEditorListener的数组。- 结果
-
所有添加的
CellEditorListener或一个空数组,如果没有添加侦听器 - 从以下版本开始:
- 1.4
-
fireEditingStopped
protected void fireEditingStopped()
通知所有在此事件类型上通知有兴趣的听众。 事件实例是懒惰地创建的。- 另请参见:
-
EventListenerList
-
fireEditingCanceled
protected void fireEditingCanceled()
通知所有在此事件类型上通知有兴趣的听众。 事件实例是懒惰地创建的。- 另请参见:
-
EventListenerList
-
-