|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.AbstractCellEditor | +--javax.swing.DefaultCellEditor
Safe: 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
.
Field Summary | |
protected int |
clickCountToStart
An integer specifying the number of clicks needed to start editing. |
protected javax.swing.DefaultCellEditor.EditorDelegate |
delegate
The delegate class which handles all methods sent from the CellEditor . |
protected JComponent |
editorComponent
The Swing component being edited. |
Fields inherited from class javax.swing.AbstractCellEditor |
changeEvent, listenerList |
Constructor Summary | |
DefaultCellEditor(JCheckBox checkBox)
Enabled: Constructs a DefaultCellEditor object that uses a check box. |
|
DefaultCellEditor(JComboBox comboBox)
Enabled: Constructs a DefaultCellEditor object that uses a combo box. |
|
DefaultCellEditor(JTextField textField)
Enabled: Constructs a DefaultCellEditor that uses a text field. |
Method Summary | |
void |
cancelCellEditing()
Enabled: Forwards the message from the CellEditor to
the delegate . |
Object |
getCellEditorValue()
Enabled: Forwards the message from the CellEditor to
the delegate . |
int |
getClickCountToStart()
Enabled: Returns the number of clicks needed to start editing. |
Component |
getComponent()
Enabled: Returns a reference to the editor component. |
Component |
getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int row,
int column)
Enabled: Implements the TableCellEditor interface. |
Component |
getTreeCellEditorComponent(JTree tree,
Object value,
boolean isSelected,
boolean expanded,
boolean leaf,
int row)
Enabled: Implements the TreeCellEditor interface. |
boolean |
isCellEditable(EventObject anEvent)
Enabled: Forwards the message from the CellEditor to
the delegate . |
void |
setClickCountToStart(int count)
Enabled: Specifies the number of clicks needed to start editing. |
boolean |
shouldSelectCell(EventObject anEvent)
Enabled: Forwards the message from the CellEditor to
the delegate . |
boolean |
stopCellEditing()
Enabled: Forwards the message from the CellEditor to
the delegate . |
Methods inherited from class javax.swing.AbstractCellEditor |
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.CellEditor |
addCellEditorListener, removeCellEditorListener |
Field Detail |
protected JComponent editorComponent
protected javax.swing.DefaultCellEditor.EditorDelegate delegate
CellEditor
.
protected int clickCountToStart
clickCountToStart
is defined as zero, it
will not initiate until a click occurs.
Constructor Detail |
public DefaultCellEditor(JTextField textField)
DefaultCellEditor
that uses a text field.
public DefaultCellEditor(JCheckBox checkBox)
DefaultCellEditor
object that uses a check box.
public DefaultCellEditor(JComboBox comboBox)
DefaultCellEditor
object that uses a combo box.
Method Detail |
public Component getComponent()
Component
public void setClickCountToStart(int count)
count
- an int specifying the number of clicks needed to start editinggetClickCountToStart()
public int getClickCountToStart()
public Object getCellEditorValue()
CellEditor
to
the delegate
.
getCellEditorValue
in interface CellEditor
EditorDelegate.getCellEditorValue()
public boolean isCellEditable(EventObject anEvent)
CellEditor
to
the delegate
.
isCellEditable
in interface CellEditor
isCellEditable
in class AbstractCellEditor
anEvent
- the event the editor should use to consider
whether to begin editing or not
EditorDelegate.isCellEditable(EventObject)
public boolean shouldSelectCell(EventObject anEvent)
CellEditor
to
the delegate
.
shouldSelectCell
in interface CellEditor
shouldSelectCell
in class AbstractCellEditor
anEvent
- the event the editor should use to start
editing
EditorDelegate.shouldSelectCell(EventObject)
public boolean stopCellEditing()
CellEditor
to
the delegate
.
stopCellEditing
in interface CellEditor
stopCellEditing
in class AbstractCellEditor
EditorDelegate.stopCellEditing()
public void cancelCellEditing()
CellEditor
to
the delegate
.
cancelCellEditing
in interface CellEditor
cancelCellEditing
in class AbstractCellEditor
EditorDelegate.cancelCellEditing()
public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
TreeCellEditor
interface.
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
TableCellEditor
interface.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |