com.dlsc.flexgantt.swing.treetable

## Class TreeTable.ColorRenderer

- java.lang.Object
- - javax.swing.AbstractCellEditor
  - - com.dlsc.flexgantt.swing.treetable.TreeTable.ColorRenderer

- All Implemented Interfaces:
    ITreeTableCellRenderer, IRenderer, Serializable, CellEditor
  Enclosing class:
    TreeTable

      public static class TreeTable.ColorRenderer
      extends AbstractCellEditor
      implements ITreeTableCellRenderer

  A renderer for values of type `Color`.
  Since:
    1.0
  See Also:
    Serialized Form

- - ### Field Summary

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

      `changeEvent, listenerList`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ColorRenderer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `getCellEditorValue()`
    `Component` | `getTreeTableCellRendererComponent(TreeTable tree, Object node, Object value, int depth, boolean selected, boolean expanded, boolean leaf, int row, int column, boolean hasFocus)` Returns a component suitable for rendering the given value object inside a cell of the given tree table.

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

      `addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ColorRenderer

          public ColorRenderer()

  - ### Method Detail

    - #### getTreeTableCellRendererComponent

          public Component getTreeTableCellRendererComponent(TreeTable tree,
                                                             Object node,
                                                             Object value,
                                                             int depth,
                                                             boolean selected,
                                                             boolean expanded,
                                                             boolean leaf,
                                                             int row,
                                                             int column,
                                                             boolean hasFocus)

      Description copied from interface: `ITreeTableCellRenderer`
      Returns a component suitable for rendering the given value object inside a cell of the given tree table.
      Specified by:
        `getTreeTableCellRendererComponent` in interface `ITreeTableCellRenderer`
      Parameters:
        `tree` - the tree table component in which the cell gets rendererd
        `node` - the hierarchy node that gets displayed in the row where the cell is located
        `value` - the value object stored in the cell
        `depth` - the hierarcy depth of the row in which the cell is located
        `selected` - a flag signalling whether the cell has been selected by the user
        `expanded` - a flag signalling whether the hierarcy node to which the cell belongs is currently in an expanded state (opened)
        `leaf` - a flag signalling whether the hierarchy node to which the cell belongs is a leaf (has no children)
        `row` - the row in which the cell is located
        `column` - the column in which the cell is located (not the model index)
        `hasFocus` - a flag signalling whether the cell is the focus owner
      Returns:
        a component suitable for rendering the given value object in the given table cell

    - #### getCellEditorValue

          public Object getCellEditorValue()

      Specified by:
        `getCellEditorValue` in interface `CellEditor`

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