Home » openjdk-7 » javax » swing » [javadoc | source]
javax.swing
public class: DefaultCellEditor [javadoc | source]
java.lang.Object
   javax.swing.AbstractCellEditor
      javax.swing.DefaultCellEditor

All Implemented Interfaces:
    TableCellEditor, TreeCellEditor, CellEditor, Serializable

Direct Known Subclasses:
    NumberEditor, BooleanEditor, GenericEditor

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 .

Nested Class Summary:
protected class  DefaultCellEditor.EditorDelegate  The protected EditorDelegate class. 
Field Summary
protected  JComponent editorComponent    The Swing component being edited. 
protected  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. 
Fields inherited from javax.swing.AbstractCellEditor:
listenerList,  changeEvent
Constructor:
 public DefaultCellEditor(JTextField textField) 
    Constructs a DefaultCellEditor that uses a text field.
    Parameters:
    textField - a JTextField object
 public DefaultCellEditor(JCheckBox checkBox) 
    Constructs a DefaultCellEditor object that uses a check box.
    Parameters:
    checkBox - a JCheckBox object
 public DefaultCellEditor(JComboBox comboBox) 
    Constructs a DefaultCellEditor object that uses a combo box.
    Parameters:
    comboBox - a JComboBox object
Method from javax.swing.DefaultCellEditor Summary:
cancelCellEditing,   getCellEditorValue,   getClickCountToStart,   getComponent,   getTableCellEditorComponent,   getTreeCellEditorComponent,   isCellEditable,   setClickCountToStart,   shouldSelectCell,   stopCellEditing
Methods from javax.swing.AbstractCellEditor:
addCellEditorListener,   cancelCellEditing,   fireEditingCanceled,   fireEditingStopped,   getCellEditorListeners,   isCellEditable,   removeCellEditorListener,   shouldSelectCell,   stopCellEditing
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.DefaultCellEditor Detail:
 public  void cancelCellEditing() 
    Forwards the message from the CellEditor to the delegate.
 public Object getCellEditorValue() 
    Forwards the message from the CellEditor to the delegate.
 public int getClickCountToStart() 
    Returns the number of clicks needed to start editing.
 public Component getComponent() 
    Returns a reference to the 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.
 public boolean isCellEditable(EventObject anEvent) 
    Forwards the message from the CellEditor to the delegate.
 public  void setClickCountToStart(int count) 
    Specifies the number of clicks needed to start editing.
 public boolean shouldSelectCell(EventObject anEvent) 
    Forwards the message from the CellEditor to the delegate.
 public boolean stopCellEditing() 
    Forwards the message from the CellEditor to the delegate.