com.antelmann.util.table
Class MultiLineCellTextEditor
java.lang.Object
javax.swing.AbstractCellEditor
com.antelmann.util.table.AbstractSpecialCellEditor
com.antelmann.util.table.MultiLineCellTextEditor
- All Implemented Interfaces:
- Serializable, CellEditor, TableCellEditor
public class MultiLineCellTextEditor
- extends AbstractSpecialCellEditor
- implements TableCellEditor
allows to edit String values in a cell in a JTextArea, optionally with dialog capabilities
- Since:
- 19. Februar 2008, 12:19
- Author:
- Holger Antelmann
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
textArea
protected JTextArea textArea
fixTabKeys
protected boolean fixTabKeys
MultiLineCellTextEditor
public MultiLineCellTextEditor()
- calls this(null), dialog option is disabled
MultiLineCellTextEditor
public MultiLineCellTextEditor(boolean fixTabKeys)
MultiLineCellTextEditor
public MultiLineCellTextEditor(String dialogTitle)
- Parameters:
dialogTitle - if non-null, this is used as a title for a dialog that appears on double-clicking the cell
MultiLineCellTextEditor
public MultiLineCellTextEditor(String dialogTitle,
boolean fixTabKeys)
- Parameters:
dialogTitle - if non-null, this is used as a title for a dialog that appears on double-clicking the cellfixTabKeys - if true, the JTextArea will loose focus on tab (switching to the next field) instead of placing a tab into the text
MultiLineCellTextEditor
public MultiLineCellTextEditor(String dialogTitle,
int dialogRows,
int dialogColumns)
MultiLineCellTextEditor
@Todo
public MultiLineCellTextEditor(String dialogTitle,
int dialogRows,
int dialogColumns,
boolean fixTabKeys)
showDialog
public String showDialog(String title,
Component parent,
String initialText,
int rows,
int columns)
- called when the doubleClickForDialog option takes effect
customizeForDialog
protected void customizeForDialog(JTextArea ta)
- allows to customize the JTextArea that is shown in the dialog
(called when it already has the text set);
this implementation 'fixes' the tab keys if selected with the constructor
- See Also:
FormHelper.fixTabKeys(Component...)
getCellEditorValue
public Object getCellEditorValue()
- Specified by:
getCellEditorValue in interface CellEditor
getJTextArea
public JTextArea getJTextArea()
- provides direct access to the JTextArea that is used to display the value
for further customization; if the appropriate option is set with the constructor,
the tab keys are already 'fixed'
- See Also:
FormHelper.fixTabKeys(Component...)
getTableCellEditorComponent
public Component getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int row,
int column)
- Specified by:
getTableCellEditorComponent in interface TableCellEditor
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads