JIDE 3.5.15

com.jidesoft.grid
Class MultilineTableCellEditor

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.MultilineTableCellEditor
All Implemented Interfaces:
ConverterContextSupport, EditorContextSupport, EditorStyleSupport, JideCellEditor, Serializable, CellEditor, TableCellEditor

public class MultilineTableCellEditor
extends ContextSensitiveCellEditor
implements TableCellEditor

A cell editor uss JTextArea as the editor component.

See Also:
Serialized Form

Field Summary
protected  JScrollPane _scrollPane
           
protected  JTextArea _textArea
           
static EditorContext CONTEXT
           
 
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
MultilineTableCellEditor()
          Creates a CellEditor using JTextArea.
 
Method Summary
protected  JScrollPane createScrollPane(JComponent component)
           
protected  JTextArea createTextArea()
          Creates a JTextArea used by the cell editor.
protected  void customizeTextArea()
          Customizes the text area.
 Object getCellEditorValue()
           
 Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
           
 JTextArea getTextArea()
          Gets the text area that is used as the cell editor.
 boolean isEditorStyleSupported(int editorStyle)
          Checks if the editor style is supported by the cell editor.
 void setCellEditorValue(Object value)
           
 
Methods inherited from class com.jidesoft.grid.ContextSensitiveCellEditor
getConverter, getConverterContext, getEditorContext, getEditorStyle, getType, 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, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener, shouldSelectCell, stopCellEditing
 
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, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
 

Field Detail

CONTEXT

public static EditorContext CONTEXT

_textArea

protected JTextArea _textArea

_scrollPane

protected JScrollPane _scrollPane
Constructor Detail

MultilineTableCellEditor

public MultilineTableCellEditor()
Creates a CellEditor using JTextArea.

Method Detail

createScrollPane

protected JScrollPane createScrollPane(JComponent component)

customizeTextArea

protected void customizeTextArea()
Customizes the text area.


createTextArea

protected JTextArea createTextArea()
Creates a JTextArea used by the cell editor. Subclass can override it to return other type of JTextArea or further customize the JTextArea before returning it.

Returns:
a text area field.

getCellEditorValue

public Object getCellEditorValue()
Specified by:
getCellEditorValue in interface CellEditor

setCellEditorValue

public void setCellEditorValue(Object value)

getTableCellEditorComponent

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

getTextArea

public JTextArea getTextArea()
Gets the text area that is used as the cell editor.

Returns:
the text area.

isEditorStyleSupported

public boolean isEditorStyleSupported(int editorStyle)
Description copied from interface: EditorStyleSupport
Checks if the editor style is supported by the cell editor.

Specified by:
isEditorStyleSupported in interface EditorStyleSupport
Overrides:
isEditorStyleSupported in class ContextSensitiveCellEditor
Parameters:
editorStyle - the editor style
Returns:
true if it is supported. Otherwise false.

JIDE 3.5.15