java.lang.Object | ||
↳ | javax.swing.AbstractCellEditor | |
↳ | javax.swing.DefaultCellEditor |
![]() |
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 XMLEncoder
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DefaultCellEditor.EditorDelegate | The protected EditorDelegate class. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
clickCountToStart | An integer specifying the number of clicks needed to start editing. | ||||||||||
delegate | The delegate class which handles all methods sent from the
CellEditor . |
||||||||||
editorComponent | The Swing component being edited. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a
DefaultCellEditor that uses a text field. | |||||||||||
Constructs a
DefaultCellEditor object that uses a check box. | |||||||||||
Constructs a
DefaultCellEditor object that uses a
combo box. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Forwards the message from the
CellEditor to
the delegate . | |||||||||||
Forwards the message from the
CellEditor to
the delegate . | |||||||||||
Returns the number of clicks needed to start editing.
| |||||||||||
Returns a reference to the editor component.
| |||||||||||
Implements the
TableCellEditor interface. | |||||||||||
Implements the
TreeCellEditor interface. | |||||||||||
Forwards the message from the
CellEditor to
the delegate . | |||||||||||
Specifies the number of clicks needed to start editing.
| |||||||||||
Forwards the message from the
CellEditor to
the delegate . | |||||||||||
Forwards the message from the
CellEditor to
the delegate . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
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.
The delegate class which handles all methods sent from the
CellEditor
.
Constructs a DefaultCellEditor
that uses a text field.
textField | a JTextField object
|
---|
Constructs a DefaultCellEditor
object that uses a check box.
checkBox | a JCheckBox object
|
---|
Constructs a DefaultCellEditor
object that uses a
combo box.
comboBox | a JComboBox object
|
---|
Forwards the message from the CellEditor
to
the delegate
.
Forwards the message from the CellEditor
to
the delegate
.
Returns the number of clicks needed to start editing.
Returns a reference to the editor component.
Component
Implements the TableCellEditor
interface.
table | the JTable that is asking the
editor to edit; can be null |
---|---|
value | the value of the cell to be edited; it is
up to the specific editor to interpret
and draw the value. For example, if value is
the string "true", it could be rendered as a
string or it could be rendered as a check
box that is checked. null
is a valid value |
isSelected | true if the cell is to be rendered with highlighting |
row | the row of the cell being edited |
column | the column of the cell being edited |
Implements the TreeCellEditor
interface.
tree | the JTree that is asking the editor to edit; this parameter can be null |
---|---|
value | the value of the cell to be edited |
isSelected | true if the cell is to be rendered with selection highlighting |
expanded | true if the node is expanded |
leaf | true if the node is a leaf node |
row | the row index of the node being edited |
Forwards the message from the CellEditor
to
the delegate
.
anEvent | an event object |
---|
Specifies the number of clicks needed to start editing.
count | an int specifying the number of clicks needed to start editing |
---|
Forwards the message from the CellEditor
to
the delegate
.
anEvent | an event object |
---|