com.dlsc.flexgantt.swing.layer.system

## Class DefaultSpreadsheetCellEditor

- java.lang.Object
- - javax.swing.AbstractCellEditor
  - - javax.swing.DefaultCellEditor
    - - com.dlsc.flexgantt.swing.layer.system.DefaultSpreadsheetCellEditor

- All Implemented Interfaces:
    ISpreadsheetCellEditor, Serializable, CellEditor, TableCellEditor, TreeCellEditor

      public class DefaultSpreadsheetCellEditor
      extends DefaultCellEditor
      implements ISpreadsheetCellEditor

  A cell editor implementation that can be used for editing tree table cells and spreadsheet cells.
  Since:
    2.1
  Author:
    Dirk Lemmermann
  See Also:
    `SpreadsheetLayer.setCellEditor(Class, ISpreadsheetCellEditor)`, Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class javax.swing.DefaultCellEditor

      `DefaultCellEditor.EditorDelegate`

  - ### Field Summary

    - ### Fields inherited from class javax.swing.DefaultCellEditor

      `clickCountToStart, delegate, editorComponent`

    - ### Fields inherited from class javax.swing.AbstractCellEditor

      `changeEvent, listenerList`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultSpreadsheetCellEditor(JCheckBox checkBox)` Constructs a new cell editor.
    `DefaultSpreadsheetCellEditor(JComboBox comboBox)` Constructs a new cell editor.
    `DefaultSpreadsheetCellEditor(JTextField textField)` Constructs a new cell editor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Component` | `getSpreadsheetCellEditorComponent(SpreadsheetLayer spreadsheet, Object value, int row, ITimeSpan span)` Returns a component for editing the spreadsheet cell at the given row and time span.

    - ### Methods inherited from class javax.swing.DefaultCellEditor

      `cancelCellEditing, getCellEditorValue, getClickCountToStart, getComponent, getTableCellEditorComponent, getTreeCellEditorComponent, isCellEditable, setClickCountToStart, shouldSelectCell, stopCellEditing`

    - ### Methods inherited from class javax.swing.AbstractCellEditor

      `addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener`

    - ### 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, getCellEditorValue, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing`

- - ### Constructor Detail

    - #### DefaultSpreadsheetCellEditor

          public DefaultSpreadsheetCellEditor(JTextField textField)

      Constructs a new cell editor.
      Parameters:
        `textField` - the text field that will be used for editing the cell value
      Since:
        2.1

    - #### DefaultSpreadsheetCellEditor

          public DefaultSpreadsheetCellEditor(JCheckBox checkBox)

      Constructs a new cell editor.
      Parameters:
        `checkBox` - the checkbox that will be used for editing the cell value
      Since:
        2.1

    - #### DefaultSpreadsheetCellEditor

          public DefaultSpreadsheetCellEditor(JComboBox comboBox)

      Constructs a new cell editor.
      Parameters:
        `comboBox` - the combo box that will be used for editing the cell value
      Since:
        2.1

  - ### Method Detail

    - #### getSpreadsheetCellEditorComponent

          public Component getSpreadsheetCellEditorComponent(SpreadsheetLayer spreadsheet,
                                                             Object value,
                                                             int row,
                                                             ITimeSpan span)

      Description copied from interface: `ISpreadsheetCellEditor`
      Returns a component for editing the spreadsheet cell at the given row and time span.
      Specified by:
        `getSpreadsheetCellEditorComponent` in interface `ISpreadsheetCellEditor`
      Parameters:
        `spreadsheet` - the spreadsheet component that requests the cell editor
        `value` - the current value of the cell
        `row` - the row in which the cell is located
        `span` - the time span of the cell
      Returns:
        a component that will be added to the spreadsheet for editing purposes

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.