net.aerith.misao.gui.table
Class CommonCellEditor
java.lang.Object
|
+--javax.swing.DefaultCellEditor
|
+--net.aerith.misao.gui.table.CommonCellEditor
- Direct Known Subclasses:
- ImageConversionTable.InputImageFormatEditor, ImageConversionTable.OutputImageEditor, ImageConversionTable.OutputImageFormatEditor
- public class CommonCellEditor
- extends javax.swing.DefaultCellEditor
The CommonCellEditor
represents a cell editor. It
provides a framework to access the editing object from the cell
editor listener.
It has two methods to be overrided, getListener and
getEditingObject.
- See Also:
- Serialized Form
Inner classes inherited from class javax.swing.DefaultCellEditor |
javax.swing.DefaultCellEditor.EditorDelegate |
Fields inherited from class javax.swing.DefaultCellEditor |
changeEvent,
clickCountToStart,
delegate,
editorComponent,
listenerList |
Constructor Summary |
CommonCellEditor()
Constructs a CommonCellEditor . |
CommonCellEditor(javax.swing.JComboBox combo)
Constructs a CommonCellEditor with a combo box. |
Methods inherited from class javax.swing.DefaultCellEditor |
addCellEditorListener,
cancelCellEditing,
fireEditingCanceled,
fireEditingStopped,
getCellEditorValue,
getClickCountToStart,
getComponent,
getTreeCellEditorComponent,
isCellEditable,
removeCellEditorListener,
setClickCountToStart,
shouldSelectCell,
stopCellEditing |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
listener
private CommonCellEditorListener listener
- The cell editor listener.
CommonCellEditor
public CommonCellEditor()
- Constructs a
CommonCellEditor
.
CommonCellEditor
public CommonCellEditor(javax.swing.JComboBox combo)
- Constructs a
CommonCellEditor
with a combo box.
- Parameters:
combo
- the combo box.
getTableCellEditorComponent
public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column)
- Invoked when the cell is to be edited.
- Overrides:
- getTableCellEditorComponent in class javax.swing.DefaultCellEditor
- Parameters:
table
- the table of the cell to draw.value
- the value of the cell.isSelected
- true if the cell is selected.row
- the row of the cell.column
- the column of the cell.
getListener
protected CommonCellEditorListener getListener()
- Gets the cell editor listener. It must be overrided in the
subclasses.
- Returns:
- the cell editor listener.
getEditingObject
protected java.lang.Object getEditingObject(int row,
int column)
- Gets the object to edit.
- Parameters:
row
- the row to edit.column
- the column to edit.- Returns:
- the object to edit.