public class javax.swing
DefaultCellEditor


Show All Login
Java SE 6
  
Extends: AbstractCellEditor
Implements: TableCellEditor, TreeCellEditor
Inner classes: DefaultCellEditor.EditorDelegate
Details
The default editor for table and tree cells.

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 JavaBeansTM has been added to the java.beans package. Please see java.beans.XMLEncoder.
version1.52 11/17/05


Fields
protected JComponent editorComponent
The Swing component being edited.
protected DefaultCellEditor.EditorDelegate delegate
The delegate class which handles all methods sent from the CellEditor.
protected int clickCountToStart
An integer specifying the number of clicks needed to start editing. Even if clickCountToStart is defined as zero, it will not initiate until a click occurs.

Constructors
public DefaultCellEditor(JTextField textField) Details
Constructs a DefaultCellEditor that uses a text field.
textFielda JTextField object
public DefaultCellEditor(JCheckBox checkBox) Details
Constructs a DefaultCellEditor object that uses a check box.
checkBoxa JCheckBox object
public DefaultCellEditor(JComboBox comboBox) Details
Constructs a DefaultCellEditor object that uses a combo box.
comboBoxa JComboBox object

Methods
public void cancelCellEditing() Details
Forwards the message from the CellEditor to the delegate.
See also cancelCellEditing
public boolean shouldSelectCell(EventObject anEvent) Details
Forwards the message from the CellEditor to the delegate.
See also shouldSelectCell(EventObject)
public boolean stopCellEditing() Details
Forwards the message from the CellEditor to the delegate.
See also stopCellEditing

Properties
public boolean isCellEditable(EventObject anEvent) Details
Forwards the message from the CellEditor to the delegate.
See also isCellEditable(EventObject)
public Object getCellEditorValue() Details
Forwards the message from the CellEditor to the delegate.
See also getCellEditorValue
public void setClickCountToStart(int count) Details
Specifies the number of clicks needed to start editing.
countan int specifying the number of clicks needed to start editing
See also getClickCountToStart
public int getClickCountToStart() Details
Returns the number of clicks needed to start editing.
returnthe number of clicks needed to start editing
public Component getComponent() Details
Returns a reference to the editor component.
returnthe editor Component
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
Implements the TableCellEditor interface.
public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
Implements the TreeCellEditor interface.