com.dlsc.flexgantt.model.gantt

## Class Spreadsheet

- java.lang.Object
- - com.dlsc.flexgantt.model.gantt.Spreadsheet

- All Implemented Interfaces:
    ISpreadsheet

      public class Spreadsheet
      extends Object
      implements ISpreadsheet

  A model object used to define a spreadsheet that can be made visible inside the Gantt chart.
  Since:
    2.1
  Author:
    Dirk Lemmermann
  See Also:
    `IGanttChartModel.getSpreadsheets()`, `AbstractGanttChart.setActiveSpreadsheet(ISpreadsheet)`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Spreadsheet(String name, IGranularity<?> granularity, int cellWidth, Class defaultValueType)` Constructs a new spreadsheet.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getCellWidth()` The required width of the spreadsheet cells.
    `Class` | `getDefaultValueType()` Returns the default object type of the spreadsheet's cell values, where a cell is defined by its tree node, the spreadsheet itself, and a time span.
    `IGranularity<?>` | `getGranularity()` Returns the time granularity used by the spreadsheet, e.g.
    `String` | `getName()` The name of the spreadsheet as it will be shown in the UI components that control the visibility of the spreadsheets.

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

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

- - ### Constructor Detail

    - #### Spreadsheet

          public Spreadsheet(String name,
                             IGranularity<?> granularity,
                             int cellWidth,
                             Class defaultValueType)

      Constructs a new spreadsheet.
      Parameters:
        `name` - the name as shown in the user interface
        `granularity` - the time granularity that will be shown by the dateline
        `cellWidth` - the width used for the cells in the spreadsheet
        `defaultValueType` - the default type used for editing new spreadsheet values
      Since:
        2.1

  - ### Method Detail

    - #### getName

          public String getName()

      Description copied from interface: `ISpreadsheet`
      The name of the spreadsheet as it will be shown in the UI components that control the visibility of the spreadsheets.
      Specified by:
        `getName` in interface `ISpreadsheet`
      Returns:
        the spreadsheet name.

    - #### getGranularity

          public IGranularity<?> getGranularity()

      Description copied from interface: `ISpreadsheet`
      Returns the time granularity used by the spreadsheet, e.g. DAYS.
      Specified by:
        `getGranularity` in interface `ISpreadsheet`
      Returns:
        the time granularity used by the spreadsheet. Each cell represents this granularity.

    - #### getCellWidth

          public int getCellWidth()

      Description copied from interface: `ISpreadsheet`
      The required width of the spreadsheet cells. All cells have the same width. The width will be applied to the granularity shown in the dateline.
      Specified by:
        `getCellWidth` in interface `ISpreadsheet`
      Returns:
        the width of each cell in a spreadsheet

    - #### getDefaultValueType

          public Class getDefaultValueType()

      Description copied from interface: `ISpreadsheet`
      Returns the default object type of the spreadsheet's cell values, where a cell is defined by its tree node, the spreadsheet itself, and a time span. The default value type is required when a `SpreadsheetLayer` tries to lookup an editor for a specific spreadsheet cell and the cell does not have a value, yet. If a value exists, then the value's type will be used to lookup an editor.
      Specified by:
        `getDefaultValueType` in interface `ISpreadsheet`
      Returns:
        the default type of the cell values

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