Package: groovy.console.ui

## [Groovy] Class ButtonOrTextEditor

- groovy.console.ui.ButtonOrTextEditor

- All Implemented Interfaces and Traits:
    TableCellEditor

      @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.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected JComponent` | `editorComponent` | The Swing component being edited.

  - ### Constructor Summary

    Constructors
    Constructor and description
    `ButtonOrTextEditor()`

  - ### Methods Summary

    Methods
    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.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractCellEditor` | `addCellEditorListener, cancelCellEditing, equals, getCellEditorListeners, getCellEditorValue, getClass, hashCode, isCellEditable, notify, notifyAll, removeCellEditorListener, shouldSelectCell, stopCellEditing, toString, wait, wait, wait`

- - ### Field Detail

    - #### protected JComponent editorComponent

      The Swing component being edited.

  - ### Constructor Detail

    - #### ButtonOrTextEditor()

  - ### Method Detail

    - #### @Override
      Object getCellEditorValue()

      Returns the current editor component.

    - #### @Override
      Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)

      Returns an editor component that matches the current cell value.