|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.DefaultCellEditor.EditorDelegate
protected class DefaultCellEditor.EditorDelegate
This changeable module access the editor component in the component specific way. For instance, to set the value for JTextField, we need to call setText(String), and for JCheckBox we need to call setSelected(boolean). Each default editor has the component specific derivative of this class. These derivatives are private inner classes of the DefaultCellEditor. The editor delegate is also set for the editor component as the action listener. It listens for the events that indicate that editing has stopped.
Field Summary | |
---|---|
protected Object |
value
The object value (updated when getting and setting the value). |
Constructor Summary | |
---|---|
protected |
DefaultCellEditor.EditorDelegate()
Constructor EditorDelegate |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent event)
This event is fired by the editor component (for instance, by pressing ENTER in the JTextField . |
void |
cancelCellEditing()
Cancel the cell editing session. |
Object |
getCellEditorValue()
Get the value for the editor component. |
boolean |
isCellEditable(EventObject event)
The default method returns true for the MouseEvent and false
for any other events. |
void |
itemStateChanged(ItemEvent event)
This event is fired by the editor component.The default method delegates call to the stopCellEditing() , finishing the editing session. |
void |
setValue(Object aValue)
Set the value for the editor component. |
boolean |
shouldSelectCell(EventObject event)
Returns true to indicate that the editing cell can be selected. |
boolean |
startCellEditing(EventObject event)
Start editing session and returns true to indicate the editing has begun. |
boolean |
stopCellEditing()
Finish the cell editing session. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Object value
Constructor Detail |
---|
protected DefaultCellEditor.EditorDelegate()
Method Detail |
---|
public void setValue(Object aValue)
aValue
- the value to set (String, Boolean or Number).public Object getCellEditorValue()
public boolean isCellEditable(EventObject event)
MouseEvent
and false
for any other events.
event
- the event to check
public boolean shouldSelectCell(EventObject event)
event
- unused in default method
public boolean stopCellEditing()
public void cancelCellEditing()
public boolean startCellEditing(EventObject event)
event
- the event.
public void actionPerformed(ActionEvent event)
JTextField
. The default method delegates call to
the stopCellEditing()
, finishing the editing session.
actionPerformed
in interface ActionListener
event
- unused in default methodpublic void itemStateChanged(ItemEvent event)
stopCellEditing()
, finishing the editing session.
itemStateChanged
in interface ItemListener
event
- unused in default method
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |