@CompileStatic
class ButtonOrTextEditor
extends AbstractCellEditor
implements TableCellEditor
A table cell editor that will return a button automatically if it is the cell value, a text field if the value exists, or null otherwise (non editable cell). This hack allows to interact with buttons in a cell.
| Modifiers | Name | Description |
|---|---|---|
protected JComponent |
editorComponent |
The Swing component being edited. |
| Constructor and description |
|---|
ButtonOrTextEditor() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
Object |
getCellEditorValue()Returns the current editor component. |
|
Component |
getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)Returns an editor component that matches the current cell value. |
| Methods inherited from class | Name |
|---|---|
class AbstractCellEditor |
addCellEditorListener, cancelCellEditing, equals, getCellEditorListeners, getCellEditorValue, getClass, hashCode, isCellEditable, notify, notifyAll, removeCellEditorListener, shouldSelectCell, stopCellEditing, toString, wait, wait, wait |
The Swing component being edited.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.