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 JavaBeans
has been added to the java.beans
package.
Please see java.
.
Modifier and Type | Class and Description |
---|---|
protected class | DefaultCellEditor.
The protected |
Modifier and Type | Field and Description |
---|---|
protected int | clickCountToStart
An integer specifying the number of clicks needed to start editing. |
protected DefaultCellEditor. | delegate
The delegate class which handles all methods sent from the
|
protected JComponent | editorComponent
The Swing component being edited. |
Access | Constructor and Description |
---|---|
public | DefaultCellEditor(final JTextField
a textField)JTextField objectConstructs a |
public | DefaultCellEditor(final JCheckBox
a checkBox)JCheckBox objectConstructs a |
public | DefaultCellEditor(final JComboBox<?>
a comboBox)JComboBox objectConstructs a |
Modifier and Type | Method and Description |
---|---|
public void | cancelCellEditing()
Overrides javax. Implements javax. CellEditor to
the delegate .
|
public Object | getCellEditorValue()
Implements javax. CellEditor to
the delegate .
|
public int | Returns: the number of clicks needed to start editingReturns the number of clicks needed to start editing. |
public Component | |
public Component | getTableCellEditorComponent(JTable
the table, Object JTable that is asking the
editor to edit; can be null 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. value, boolean null
is a valid valuetrue if the cell is to be rendered with
highlighting isSelected, int the row of the cell being edited row, int the column of the cell being edited column)Implements javax. TableCellEditor interface.
|
public Component | getTreeCellEditorComponent(JTree
the JTree that is asking the editor to edit;
this parameter can be null tree, Object the value of the cell to be edited value, boolean true if the cell is to be rendered with
selection highlighting isSelected, boolean true if the node is expanded expanded, boolean true if the node is a leaf node leaf, int the row index of the node being edited row)Implements javax. TreeCellEditor interface.
|
public boolean | isCellEditable(EventObject
the event the editor should use to consider
whether to begin editing or not anEvent)Overrides javax. Implements javax. CellEditor to
the delegate .
|
public void | setClickCountToStart(int
an int specifying the number of clicks needed to start editing count)Specifies the number of clicks needed to start editing. |
public boolean | shouldSelectCell(EventObject
the event the editor should use to start
editing anEvent)Overrides javax. Implements javax. CellEditor to
the delegate .
|
public boolean | stopCellEditing()
Overrides javax. Implements javax. CellEditor to
the delegate .
|
clickCountToStart | back to summary |
---|---|
protected int clickCountToStart An integer specifying the number of clicks needed to start editing.
Even if |
delegate | back to summary |
---|---|
protected DefaultCellEditor. The delegate class which handles all methods sent from the
|
editorComponent | back to summary |
---|---|
protected JComponent editorComponent The Swing component being edited. |
DefaultCellEditor | back to summary |
---|---|
public DefaultCellEditor(final JTextField textField) Constructs a
|
DefaultCellEditor | back to summary |
---|---|
public DefaultCellEditor(final JCheckBox checkBox) Constructs a
|
DefaultCellEditor | back to summary |
---|---|
public DefaultCellEditor(final JComboBox<?> comboBox) Constructs a
|
cancelCellEditing | back to summary |
---|---|
public void cancelCellEditing() Overrides javax. Implements javax. Forwards the message from the
|
getCellEditorValue | back to summary |
---|---|
public Object getCellEditorValue() Implements javax. Forwards the message from the
|
getClickCountToStart | back to summary |
---|---|
public int getClickCountToStart() Returns the number of clicks needed to start editing.
|
getComponent | back to summary |
---|---|
public Component getComponent() Returns a reference to the editor component.
|
getTableCellEditorComponent | back to summary |
---|---|
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) Implements javax. Implements the
|
getTreeCellEditorComponent | back to summary |
---|---|
public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) Implements javax. Implements the
|
isCellEditable | back to summary |
---|---|
public boolean isCellEditable(EventObject anEvent) Overrides javax. Implements javax. Forwards the message from the
|
setClickCountToStart | back to summary |
---|---|
public void setClickCountToStart(int count) Specifies the number of clicks needed to start editing.
|
shouldSelectCell | back to summary |
---|---|
public boolean shouldSelectCell(EventObject anEvent) Overrides javax. Implements javax. Forwards the message from the
|
stopCellEditing | back to summary |
---|---|
public boolean stopCellEditing() Overrides javax. Implements javax. Forwards the message from the
|
EditorDelegate
class.
Access | Constructor and Description |
---|---|
protected |
Modifier and Type | Method and Description |
---|---|
public void | actionPerformed(ActionEvent
the action event e)Implements java. |
public void | |
public Object | |
public boolean | Returns: true if cell is ready for editing, false otherwisethe event anEvent)Returns true if |
public void | itemStateChanged(ItemEvent
the action event e)Implements java. |
public void | |
public boolean | Returns: truethe event anEvent)Returns true to indicate that the editing cell may be selected. |
public boolean | Returns: true to indicate editing has begunthe event anEvent)Returns true to indicate that editing has begun. |
public boolean |
value | back to summary |
---|---|
protected Object value The value of this cell. |
EditorDelegate | back to summary |
---|---|
protected EditorDelegate() Constructs an |
actionPerformed | back to summary |
---|---|
public void actionPerformed(ActionEvent e) Implements java. When an action is performed, editing is ended.
|
cancelCellEditing | back to summary |
---|---|
public void cancelCellEditing() Cancels editing. This method calls |
getCellEditorValue | back to summary |
---|---|
public Object getCellEditorValue() Returns the value of this cell.
|
isCellEditable | back to summary |
---|---|
public boolean isCellEditable(EventObject anEvent) Returns true if
|
itemStateChanged | back to summary |
---|---|
public void itemStateChanged(ItemEvent e) Implements java. When an item's state changes, editing is ended.
|
setValue | back to summary |
---|---|
public void setValue(Object value) Sets the value of this cell.
|
shouldSelectCell | back to summary |
---|---|
public boolean shouldSelectCell(EventObject anEvent) Returns true to indicate that the editing cell may be selected.
|
startCellEditing | back to summary |
---|---|
public boolean startCellEditing(EventObject anEvent) Returns true to indicate that editing has begun.
|
stopCellEditing | back to summary |
---|---|
public boolean stopCellEditing() Stops editing and
returns true to indicate that editing has stopped.
This method calls
|