kiwi.ui
Class ImmutableCellEditor

java.lang.Object
  |
  +--kiwi.ui.AbstractCellEditor
        |
        +--kiwi.ui.ImmutableCellEditor
All Implemented Interfaces:
javax.swing.CellEditor, javax.swing.table.TableCellEditor

public class ImmutableCellEditor
extends AbstractCellEditor
implements javax.swing.table.TableCellEditor

This class is a workaround for a bug in JFC. It is basically an implementation of TableCellEditor that uses a JLabel so that the cell will not be editable.

This class will be deprecated in Kiwi 1.2.

Author:
Mark Lindner, PING Software Group
See Also:
TableCellEditor

Field Summary
private  javax.swing.JLabel label
           
 
Fields inherited from class kiwi.ui.AbstractCellEditor
listenerList
 
Constructor Summary
ImmutableCellEditor()
           
 
Method Summary
 java.lang.Object getCellEditorValue()
          Get the value of this editor.
 java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
          Construct a new ImmutableCellEditor.
 boolean isCellEditable(java.util.EventObject anEvent)
          Check if this cell is editable.
 
Methods inherited from class kiwi.ui.AbstractCellEditor
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, removeCellEditorListener, shouldSelectCell, stopCellEditing
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.CellEditor
addCellEditorListener, cancelCellEditing, removeCellEditorListener, shouldSelectCell, stopCellEditing
 

Field Detail

label

private javax.swing.JLabel label
Constructor Detail

ImmutableCellEditor

public ImmutableCellEditor()
Method Detail

getTableCellEditorComponent

public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
                                                      java.lang.Object value,
                                                      boolean isSelected,
                                                      int row,
                                                      int column)
Construct a new ImmutableCellEditor. public ImmutableCellEditor() { } /** Get the editor component.
Specified by:
getTableCellEditorComponent in interface javax.swing.table.TableCellEditor
Returns:
The JLabel.

getCellEditorValue

public java.lang.Object getCellEditorValue()
Get the value of this editor.
Specified by:
getCellEditorValue in interface javax.swing.CellEditor
Overrides:
getCellEditorValue in class AbstractCellEditor
Returns:
The text displayed by the JLabel.

isCellEditable

public boolean isCellEditable(java.util.EventObject anEvent)
Check if this cell is editable.
Specified by:
isCellEditable in interface javax.swing.CellEditor
Overrides:
isCellEditable in class AbstractCellEditor
Returns:
Always false.