qflib 0.99

de.qfs.lib.option
Class TableOptionEdit.Editor

java.lang.Object
  extended byjavax.swing.AbstractCellEditor
      extended byjavax.swing.DefaultCellEditor
          extended byde.qfs.lib.option.TableOptionEdit.Editor
All Implemented Interfaces:
javax.swing.CellEditor, java.io.Serializable, javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor
Direct Known Subclasses:
TableOptionEdit.BooleanEditor, TableOptionEdit.NumberEditor, TableOptionEdit.StringEditor
Enclosing class:
TableOptionEdit

protected class TableOptionEdit.Editor
extends javax.swing.DefaultCellEditor

Baseclass for the cell editors.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.DefaultCellEditor
javax.swing.DefaultCellEditor.EditorDelegate
 
Field Summary
 
Fields inherited from class javax.swing.DefaultCellEditor
clickCountToStart, delegate, editorComponent
 
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
 
Constructor Summary
TableOptionEdit.Editor(javax.swing.JCheckBox com)
          Create a new Editor.
TableOptionEdit.Editor(javax.swing.JTextField com)
          Create a new Editor.
 
Method Summary
 java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
          Get the editor component for a cell.
 void insertChar(char c)
          Insert a character into the editor.
 boolean isCellEditable(java.util.EventObject anEvent)
          Query whether a cell is editable.
 boolean shouldSelectCell(java.util.EventObject anEvent)
          Query whether the cell should be selected.
 
Methods inherited from class javax.swing.DefaultCellEditor
cancelCellEditing, getCellEditorValue, getClickCountToStart, getComponent, getTreeCellEditorComponent, setClickCountToStart, stopCellEditing
 
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
 

Constructor Detail

TableOptionEdit.Editor

public TableOptionEdit.Editor(javax.swing.JTextField com)
Create a new Editor.

Parameters:
com - The actual editor component.

TableOptionEdit.Editor

public TableOptionEdit.Editor(javax.swing.JCheckBox com)
Create a new Editor.

Parameters:
com - The actual editor component.
Method Detail

getTableCellEditorComponent

public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
                                                      java.lang.Object value,
                                                      boolean isSelected,
                                                      int row,
                                                      int column)
Get the editor component for a cell.

Parameters:
table - The table being edited.
value - The cell value.
isSelected - Whether the cell is selected.
row - The cell's row index.
column - The cell's column index.
Returns:
The editor component.

isCellEditable

public boolean isCellEditable(java.util.EventObject anEvent)
Query whether a cell is editable.

Parameters:
anEvent - The event initiating the edit.
Returns:
False if anEvent is null, otherwise the result of the superclass' method.

shouldSelectCell

public boolean shouldSelectCell(java.util.EventObject anEvent)
Query whether the cell should be selected.

Parameters:
anEvent - The event that started the editing.
Returns:
Depends on the superclass.

insertChar

public void insertChar(char c)
Insert a character into the editor. Called if the table receives a KEY_TYPED or INPUT_METHOD_TEXT_CHANGED event after creating the Editor.

Parameters:
c - The character to insert.
Since:
0.99.0

qflib 0.99