com.dlsc.flexgantt.model.treetable

## Interface IColumnModel

- All Known Implementing Classes:
    DefaultColumnModel

      public interface IColumnModel

  A column model interface that will be used by the tree table's column header component. The interface distinguishes between regular tree table columns and the special key column. The key column is the column in which the tree structure of the Gantt chart model will become visible and in which the table cells display the key object of the tree nodes. Attached listeners will be informed when columns get added, removed or inserted.
  Since:
    1.0
  Version:
    $Revision: 1.9 $
  Author:
    Dirk Lemmermann
  See Also:
    `TreeTableColumn`, `KeyColumn`, `IColumnModelListener`, `TreeTableHeader`, `ColumnModelIterator`, `ITreeTableModel.getKey(Object)`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addColumn(TreeTableColumn col)` Adds a column to the model.
    `void` | `addColumnModelListener(IColumnModelListener l)` Adds a column model listener to the model.
    `TreeTableColumn` | `getColumn(int index)` Returns the tree table column at the given index.
    `int` | `getColumnCount()` Returns the total number of columns added to the model.
    `int` | `getColumnIndex(TreeTableColumn col)` Returns the index of the given column if it is a member of the model ( Integer.MAX_VALUE otherwise).
    `KeyColumn` | `getKeyColumn()` Returns the special key column.
    `int` | `getTotalColumnWidth()` Returns the total width as calculated by the widths of the individual columns.
    `void` | `moveColumn(int oldIndex, int newIndex)` Moves the column at the given index to the new index.
    `void` | `removeColumn(TreeTableColumn col)` Removes a column from the model.
    `void` | `removeColumnModelListener(IColumnModelListener l)` Removes a column model listener.
    `void` | `setKeyColumn(KeyColumn column)` Sets the special key column.

- - ### Method Detail

    - #### setKeyColumn

          void setKeyColumn(KeyColumn column)

      Sets the special key column.
      Parameters:
        `column` - the key column
      Since:
        1.0

    - #### getKeyColumn

          KeyColumn getKeyColumn()

      Returns the special key column.
      Returns:
        the key column
      Since:
        1.0

    - #### getColumn

          TreeTableColumn getColumn(int index)

      Returns the tree table column at the given index. Note: this is not the model index of a column.
      Parameters:
        `index` - the index for which to return the column
      Returns:
        the tree table column at the given index
      Since:
        1.0

    - #### getColumnCount

          int getColumnCount()

      Returns the total number of columns added to the model. This count does not include the key column.
      Returns:
        the total number of columns added to the model
      Since:
        1.0

    - #### getColumnIndex

          int getColumnIndex(TreeTableColumn col)

      Returns the index of the given column if it is a member of the model ( Integer.MAX_VALUE otherwise).
      Parameters:
        `col` - the column for which to return the index
      Returns:
        the column's index
      Since:
        1.0

    - #### addColumn

          void addColumn(TreeTableColumn col)

      Adds a column to the model.
      Parameters:
        `col` - the column to add
      Since:
        1.0

    - #### removeColumn

          void removeColumn(TreeTableColumn col)

      Removes a column from the model.
      Parameters:
        `col` - the column to remove
      Since:
        1.0

    - #### moveColumn

          void moveColumn(int oldIndex,
                          int newIndex)

      Moves the column at the given index to the new index.
      Parameters:
        `oldIndex` - the current index of the column
        `newIndex` - the new index of the column
      Since:
        1.0

    - #### addColumnModelListener

          void addColumnModelListener(IColumnModelListener l)

      Adds a column model listener to the model.
      Parameters:
        `l` - the new listener
      Since:
        1.0

    - #### removeColumnModelListener

          void removeColumnModelListener(IColumnModelListener l)

      Removes a column model listener.
      Parameters:
        `l` - the listener to remove
      Since:
        1.0

    - #### getTotalColumnWidth

          int getTotalColumnWidth()

      Returns the total width as calculated by the widths of the individual columns.
      Returns:
        the total column width
      Since:
        1.0

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