JIDE 3.5.15

com.jidesoft.grid
Class AbstractTableCellEditorRenderer

java.lang.Object
  extended by javax.swing.AbstractCellEditor
      extended by com.jidesoft.grid.AbstractJideCellEditor
          extended by com.jidesoft.grid.ContextSensitiveCellEditor
              extended by com.jidesoft.grid.AbstractTableCellEditorRenderer
All Implemented Interfaces:
ConverterContextSupport, EditorContextSupport, EditorStyleSupport, JideCellEditor, TableCellEditorRenderer, Serializable, CellEditor, TableCellEditor, TableCellRenderer
Direct Known Subclasses:
ButtonTableCellEditorRenderer

public abstract class AbstractTableCellEditorRenderer
extends ContextSensitiveCellEditor
implements TableCellEditorRenderer

AbstractTableCellEditorRenderer is an abstract implementation for TableCellEditorRenderer. It implements both getTableCellEditorComponent and getTableCellRendererComponent methods so that subclass only needs to implement createTableCellEditorRendererComponent and configureTableCellEditorRendererComponent as defined in TableCellEditorRenderer.

AbstractTableCellEditorRenderer follows the design pattern of JTable's cell renderer and cell editor. It calls createTableCellEditorRendererComponent once and save the returned component. It will use the same saved component as the cell renderer component for all future calls. If you want to discard the saved renderer component, you should call resetRendererComponent(). For cell editor component, it will call createTableCellEditorRendererComponent every time to create a new component.

See Also:
Serialized Form

Field Summary
protected  Component _editorComponent
           
protected  Component _rendererComponent
           
 
Fields inherited from class com.jidesoft.grid.ContextSensitiveCellEditor
DEFAULT_CELL_EDITOR_BORDER
 
Fields inherited from class com.jidesoft.grid.AbstractJideCellEditor
_clickCountToStart
 
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
 
Constructor Summary
AbstractTableCellEditorRenderer()
           
AbstractTableCellEditorRenderer(ConverterContext context)
           
 
Method Summary
 void cancelCellEditing()
           
 Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
           
 Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
           
 void resetRendererComponent()
          Resets the saved renderer component to null.
 boolean stopCellEditing()
           
 
Methods inherited from class com.jidesoft.grid.ContextSensitiveCellEditor
getConverter, getConverterContext, getEditorContext, getEditorStyle, getType, isEditorStyleSupported, isUseConverterContext, setConverter, setConverterContext, setEditorContext, setEditorStyle, setType, setUseConverterContext
 
Methods inherited from class com.jidesoft.grid.AbstractJideCellEditor
addValidationListener, getClickCountToStart, getDefaultErrorBehavior, getValidationListeners, isAutoStopCellEditing, isCellEditable, isPassEnterKeyToTable, removeValidationListener, setAutoStopCellEditing, setClickCountToStart, setDefaultErrorBehavior, setPassEnterKeyToTable, validate
 
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener, shouldSelectCell
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jidesoft.grid.TableCellEditorRenderer
configureTableCellEditorRendererComponent, createTableCellEditorRendererComponent
 
Methods inherited from interface javax.swing.CellEditor
addCellEditorListener, getCellEditorValue, isCellEditable, removeCellEditorListener, shouldSelectCell
 

Field Detail

_rendererComponent

protected Component _rendererComponent

_editorComponent

protected Component _editorComponent
Constructor Detail

AbstractTableCellEditorRenderer

public AbstractTableCellEditorRenderer()

AbstractTableCellEditorRenderer

public AbstractTableCellEditorRenderer(ConverterContext context)
Method Detail

getTableCellEditorComponent

public Component getTableCellEditorComponent(JTable table,
                                             Object value,
                                             boolean isSelected,
                                             int row,
                                             int column)
Specified by:
getTableCellEditorComponent in interface TableCellEditor

stopCellEditing

public boolean stopCellEditing()
Specified by:
stopCellEditing in interface CellEditor
Overrides:
stopCellEditing in class AbstractCellEditor

cancelCellEditing

public void cancelCellEditing()
Specified by:
cancelCellEditing in interface CellEditor
Overrides:
cancelCellEditing in class AbstractCellEditor

resetRendererComponent

public void resetRendererComponent()
Resets the saved renderer component to null.


getTableCellRendererComponent

public Component getTableCellRendererComponent(JTable table,
                                               Object value,
                                               boolean isSelected,
                                               boolean hasFocus,
                                               int row,
                                               int column)
Specified by:
getTableCellRendererComponent in interface TableCellRenderer

JIDE 3.5.15