All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.DefaultCellEditor

java.lang.Object
   |
   +----com.sun.java.swing.DefaultCellEditor

public class DefaultCellEditor
extends Object
implements TableCellEditor, TreeCellEditor, Serializable
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 Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.


Variable Index

 o changeEvent
 o clickCountToStart
 o delegate
 o editorComponent
 o listenerList
Event listeners

Constructor Index

 o DefaultCellEditor(JCheckBox)
 o DefaultCellEditor(JComboBox)
 o DefaultCellEditor(JTextField)

Method Index

 o addCellEditorListener(CellEditorListener)
 o cancelCellEditing()
 o fireEditingCanceled()
 o fireEditingStopped()
 o getCellEditorValue()
 o getClickCountToStart()
clickCountToStart controls the number of clicks required to start editing if the event passed to isCellEditable() or startCellEditing() is a MouseEvent.
 o getComponent()
 o getTableCellEditorComponent(JTable, Object, boolean, int, int)
 o getTreeCellEditorComponent(JTree, Object, boolean, boolean, boolean, int)
 o isCellEditable(EventObject)
 o removeCellEditorListener(CellEditorListener)
 o setClickCountToStart(int)
 o shouldSelectCell(EventObject)
 o stopCellEditing()

Variables

 o listenerList
 protected EventListenerList listenerList
Event listeners

 o changeEvent
 protected transient ChangeEvent changeEvent
 o editorComponent
 protected JComponent editorComponent
 o delegate
 protected DefaultCellEditor. EditorDelegate delegate
 o clickCountToStart
 protected int clickCountToStart

Constructors

 o DefaultCellEditor
 public DefaultCellEditor(JTextField x)
 o DefaultCellEditor
 public DefaultCellEditor(JCheckBox x)
 o DefaultCellEditor
 public DefaultCellEditor(JComboBox x)

Methods

 o getComponent
 public Component getComponent()
 o setClickCountToStart
 public void setClickCountToStart(int count)
 o getClickCountToStart
 public int getClickCountToStart()
clickCountToStart controls the number of clicks required to start editing if the event passed to isCellEditable() or startCellEditing() is a MouseEvent. For example, by default the clickCountToStart for a JTextField is set to 2, so in a JTable the user will need to double click to begin editing a cell.

 o getCellEditorValue
 public Object getCellEditorValue()
 o isCellEditable
 public boolean isCellEditable(EventObject anEvent)
 o shouldSelectCell
 public boolean shouldSelectCell(EventObject anEvent)
 o stopCellEditing
 public boolean stopCellEditing()
 o cancelCellEditing
 public void cancelCellEditing()
 o addCellEditorListener
 public void addCellEditorListener(CellEditorListener l)
 o removeCellEditorListener
 public void removeCellEditorListener(CellEditorListener l)
 o fireEditingStopped
 protected void fireEditingStopped()
 o fireEditingCanceled
 protected void fireEditingCanceled()
 o getTreeCellEditorComponent
 public Component getTreeCellEditorComponent(JTree tree,
                                             Object value,
                                             boolean isSelected,
                                             boolean expanded,
                                             boolean leaf,
                                             int row)
 o getTableCellEditorComponent
 public Component getTableCellEditorComponent(JTable table,
                                              Object value,
                                              boolean isSelected,
                                              int row,
                                              int column)

All Packages  Class Hierarchy  This Package  Previous  Next  Index