Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Class java.awt.swing.DefaultCellEditor

java.lang.Object
    |
    +----java.awt.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.


Inner Class Summary
 DefaultCellEditor.EditorDelegate
 
 

Field Summary
ChangeEvent  changeEvent
 
int  clickCountToStart
 
DefaultCellEditor.EditorDelegate  delegate
 
JComponent  editorComponent
 
EventListenerList  listenerList
Event listeners
 

Constructor Summary
 DefaultCellEditor(JTextField x)
 
 DefaultCellEditor(JCheckBox x)
 
 DefaultCellEditor(JComboBox x)
 
 

Method Summary
void  addCellEditorListener(CellEditorListener l)
 
void  cancelCellEditing()
 
void  fireEditingCanceled()
 
void  fireEditingStopped()
 
Object  getCellEditorValue()
 
int  getClickCountToStart()
clickCountToStart controls the number of clicks required to start editing if the event passed to isCellEditable() or startCellEditing() is a MouseEvent.
Component  getComponent()
 
Component  getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
 
Component  getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
 
boolean  isCellEditable(EventObject anEvent)
 
void  removeCellEditorListener(CellEditorListener l)
 
void  setClickCountToStart(int count)
 
boolean  shouldSelectCell(EventObject anEvent)
 
boolean  stopCellEditing()
 
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listenerList

protected EventListenerList listenerList
Event listeners

changeEvent

protected transient ChangeEvent changeEvent

editorComponent

protected JComponent editorComponent

delegate

protected DefaultCellEditor.EditorDelegate delegate

clickCountToStart

protected int clickCountToStart
Constructor Detail

DefaultCellEditor

public DefaultCellEditor(JTextField x)

DefaultCellEditor

public DefaultCellEditor(JCheckBox x)

DefaultCellEditor

public DefaultCellEditor(JComboBox x)
Method Detail

getComponent

public Component getComponent()

setClickCountToStart

public void setClickCountToStart(int count)

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.

getCellEditorValue

public Object getCellEditorValue()

isCellEditable

public boolean isCellEditable(EventObject anEvent)

shouldSelectCell

public boolean shouldSelectCell(EventObject anEvent)

stopCellEditing

public boolean stopCellEditing()

cancelCellEditing

public void cancelCellEditing()

addCellEditorListener

public void addCellEditorListener(CellEditorListener l)

removeCellEditorListener

public void removeCellEditorListener(CellEditorListener l)

fireEditingStopped

protected void fireEditingStopped()

fireEditingCanceled

protected void fireEditingCanceled()

getTreeCellEditorComponent

public Component getTreeCellEditorComponent(JTree tree,
                                            Object value,
                                            boolean isSelected,
                                            boolean expanded,
                                            boolean leaf,
                                            int row)
Implements:
getTreeCellEditorComponent in interface TreeCellEditor

getTableCellEditorComponent

public Component getTableCellEditorComponent(JTable table,
                                             Object value,
                                             boolean isSelected,
                                             int row,
                                             int column)
Implements:
getTableCellEditorComponent in interface TableCellEditor

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.