com.dlsc.flexgantt.model.gantt

## Class DefaultGanttChartModel<T extends IGanttChartNode<S>,S extends ITimelineObject>

- java.lang.Object
- - javax.swing.tree.DefaultTreeModel
  - - com.dlsc.flexgantt.model.treetable.DefaultTreeTableModel<T>
    - - com.dlsc.flexgantt.model.gantt.DefaultGanttChartModel<T,S>

- Type Parameters:
    `T` - the type of the hierarchy (Gantt chart) nodes
    `S` - the type of the timeline objects
  All Implemented Interfaces:
    IGanttChartModel<T,S>, ITreeTableModel<T>, Serializable, TreeModel

      public class DefaultGanttChartModel<T extends IGanttChartNode<S>,S extends ITimelineObject>
      extends DefaultTreeTableModel<T>
      implements IGanttChartModel<T,S>

  The default implementation of a Gantt chart model. For detailed information on its usage please read the comments on `IGanttChartModel`.
  Since:
    1.0
  Version:
    $Revision: 1.53 $
  Author:
    Dirk Lemmermann
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class javax.swing.tree.DefaultTreeModel

      `asksAllowsChildren, listenerList, root`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultGanttChartModel(T node)` Constructs a new Gantt chart model.
    `DefaultGanttChartModel(T node, boolean asksAllowsChildren)` Constructs a new Gantt chart model.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addGanttChartModelListener(IGanttChartModelListener l)` Adds a listener to the model.
    `void` | `addLayer(ILayer layer)` Adds a layer to the model.
    `void` | `addRelationship(IRelationship<S> relationship)` Adds a single relationship to the model.
    `void` | `addRelationships(Collection<IRelationship<S>> relationships)` Adds a collection of relationships to the model.
    `void` | `addSpreadsheet(ISpreadsheet spreadsheet)` Adds a spreadsheet to the model.
    `void` | `addTimelineObject(T node, ILayer layer, S timelineObject)` Adds a single timeline object to the timeline of the given tree node.
    `void` | `addTimelineObjects(T node, ILayer layer, Collection<S> timelineObjects)` Adds a collection of objects to the timeline of the given tree node.
    `void` | `clearRelationships()` Removes all relationships from the model.
    `void` | `clearTimelineObjects()` Removes all timeline objects from all nodes and all layers.
    `void` | `clearTimelineObjects(ILayer layer)` Removes all timeline objects from the given layer for all nodes.
    `void` | `clearTimelineObjects(T node)` Removes all timeline objects from the given tree node from all layers.
    `void` | `clearTimelineObjects(T node, ILayer layer)` Removes all timeline objects from the given tree node and layer.
    `void` | `fireGanttChartChanged(GanttChartModelEvent evt)` Fires the given event to the model listeners.
    `Iterator<S>` | `getChildrenTimelineObjects(S parent)` Returns an iterator over the children of the given parent timeline object.
    `Iterator<ILayer>` | `getLayers()` Returns an iterator over the layers used by the model.
    `Iterator<IRelationship<S>>` | `getRelationships()` Returns all relationships so that they can be visualized by the `RelationshipLayer`.
    `Iterator<IRelationship<S>>` | `getRelationships(S obj)` Returns those relationships that have the given timeline object either as a source or as a target object.
    `Iterator<ISpreadsheet>` | `getSpreadsheets()` Returns an iterator over the spreadsheets used by the model.
    `Object` | `getSpreadsheetValue(ISpreadsheet spreadsheet, T node, ITimeSpan span)` Returns an object for the given tree node, the given spreadsheet and the given time span.
    `Class` | `getSpreadsheetValueType(ISpreadsheet spreadsheet, T node, ITimeSpan span)` Returns the type of the object shown within the specified spreadsheet cell (specification via tree node, spreadsheet, time span).
    `TimelineObjectPath` | `getTimelineObjectPath(T node, S timelineObject, ILayer layer)` Returns a timeline object path for the given node and object.
    `Iterator<S>` | `getTimelineObjectsIterator(T node, ILayer layer, ITimeSpan span)` Returns an `Iterator` that can be used to iterate over all timeline objects stored on the given node and layer within the given time span.
    `ITimeSpan` | `getTimeSpan(S timelineObject)` Returns the time span of the given timeline object.
    `boolean` | `isParentTimelineObject(S timelineObject)` Determines whether the given timeline object is a parent timeline object.
    `void` | `removeGanttChartModelListener(IGanttChartModelListener l)` Removes a listener from the model.
    `void` | `removeLayer(ILayer layer)` Removes a layer from the model.
    `void` | `removeRelationship(IRelationship relationship)` Removes a single relationship from the model.
    `void` | `removeRelationships(Collection<IRelationship> rel)` Removes a collection of relationships from the model.
    `void` | `removeSpreadsheet(ISpreadsheet spreadsheet)` Removes a spreadsheet from the model.
    `void` | `removeTimelineObject(T node, ILayer layer, S timelineObject)` Removes a single timeline object from the given node and layer.
    `void` | `removeTimelineObjects(T node, ILayer layer, Collection<S> timelineObjects)` Removes a collection of objects from the given tree node and layer.
    `void` | `setRelationships(Collection<IRelationship<S>> relationships)` Sets all relationships at once.
    `void` | `setSpreadsheetValue(T node, ISpreadsheet spreadsheet, ITimeSpan span, Object value)` Sets an object/value in a spreadsheet cell where the cell is specified by the combination of the given tree table node, the spreadsheet and the time span.
    `void` | `setTimeSpan(S timelineObject, ITimeSpan span)` Sets a new time span on the given timeline object.
    `void` | `timelineObjectChanged(S timelineObject)` Triggers a `GanttChartModelEvent` that informs listeners that the given timeline object has been changed.

    - ### Methods inherited from class com.dlsc.flexgantt.model.treetable.DefaultTreeTableModel

      `addTreeTableModelListener, fireTreeNodeKeyChanged, fireTreeNodeValuesChanged, getColumnValue, getKey, getRoot, getRowHeaderValue, removeTreeTableModelListener, setColumnValue, setKey, setRoot, setRoot, setRowHeaderValue, sort, sort, sort, sort`

    - ### Methods inherited from class javax.swing.tree.DefaultTreeModel

      `addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, valueForPathChanged`

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

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

    - ### Methods inherited from interface com.dlsc.flexgantt.model.treetable.ITreeTableModel

      `addTreeTableModelListener, getColumnValue, getKey, getRowHeaderValue, removeTreeTableModelListener, setColumnValue, setKey, sort`

    - ### Methods inherited from interface javax.swing.tree.TreeModel

      `addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged`

- - ### Constructor Detail

    - #### DefaultGanttChartModel

          public DefaultGanttChartModel(T node,
                                        boolean asksAllowsChildren)

      Constructs a new Gantt chart model.
      Parameters:
        `node` - the root node
        `asksAllowsChildren` - if true, the node is allowed to have child nodes -- otherwise, it is always a leaf node
      Since:
        1.0

    - #### DefaultGanttChartModel

          public DefaultGanttChartModel(T node)

      Constructs a new Gantt chart model.
      Parameters:
        `node` - the root node
      Since:
        1.0

  - ### Method Detail

    - #### addLayer

          public void addLayer(ILayer layer)

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

    - #### removeLayer

          public void removeLayer(ILayer layer)

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

    - #### getLayers

          public Iterator<ILayer> getLayers()

      Description copied from interface: `IGanttChartModel`
      Returns an iterator over the layers used by the model. The layer container has to create one `TimelineObjectLayer` for each layer model definition.
      Specified by:
        `getLayers` in interface `IGanttChartModel<T extends IGanttChartNode<S>,S extends ITimelineObject>`
      Returns:
        the stack of layers required by the model in order to display all of its timeline objects
      See Also:
        `IGanttChartModel.getTimelineObjectsIterator(Object, ILayer, ITimeSpan)`

    - #### addGanttChartModelListener

          public void addGanttChartModelListener(IGanttChartModelListener l)

      Description copied from interface: `IGanttChartModel`
      Adds a listener to the model. The listener will be informed when any of the following situations occurs:
      - the overall time span changes
      - time zone changes
      - the time span of a timeline object changes
      - the capacity of a timeline object changes
      - the percentage complete of a timeline object changes
      - the relationships of a timeline object changes
      - layers are being added or removed
      - spreadsheets are being added or removed
      - spreadsheet values change
      - timeline objects are being added or removed
      Specified by:
        `addGanttChartModelListener` in interface `IGanttChartModel<T extends IGanttChartNode<S>,S extends ITimelineObject>`
      Parameters:
        `l` - the new listener
      See Also:
        `IGanttChartModel.removeGanttChartModelListener(IGanttChartModelListener)`, `GanttChartModelEvent`

    - #### removeGanttChartModelListener

          public void removeGanttChartModelListener(IGanttChartModelListener l)

      Description copied from interface: `IGanttChartModel`
      Removes a listener from the model.
      Specified by:
        `removeGanttChartModelListener` in interface `IGanttChartModel<T extends IGanttChartNode<S>,S extends ITimelineObject>`
      Parameters:
        `l` - the listener to remove
      See Also:
        `IGanttChartModel.addGanttChartModelListener(IGanttChartModelListener)`

    - #### fireGanttChartChanged

          public void fireGanttChartChanged(GanttChartModelEvent evt)

      Fires the given event to the model listeners.
      Parameters:
        `evt` - the model event to be issued to the listeners
      Since:
        1.0
      See Also:
        `addGanttChartModelListener(IGanttChartModelListener)`, `removeGanttChartModelListener(IGanttChartModelListener)`

    - #### addTimelineObject

          public void addTimelineObject(T node,
                                        ILayer layer,
                                        S timelineObject)

      Adds a single timeline object to the timeline of the given tree node. As objects can be displayed on different layers a reference to a layer has to be passed to this method as well. Calling this method will cause a `GanttChartModelEvent` to be fired where the ID of the event is equal to `GanttChartModelEvent.ID.TIMELINE_OBJECTS_ADDED`.
      Parameters:
        `node` - the tree node on which to add objects
        `layer` - the layer where the objects shall appear
        `timelineObject` - the object to add
      Since:
        1.0
      See Also:
        `removeTimelineObjects(IGanttChartNode, ILayer, Collection)`, `clearTimelineObjects(IGanttChartNode, ILayer)`, `getTimelineObjectsIterator(IGanttChartNode, ILayer, ITimeSpan)`

    - #### addTimelineObjects

          public void addTimelineObjects(T node,
                                         ILayer layer,
                                         Collection<S> timelineObjects)

      Adds a collection of objects to the timeline of the given tree node. As objects can be displayed on different layers a reference to a layer has to be passed to this method as well. Calling this method will cause a `GanttChartModelEvent` to be fired where the ID of the event is equal to `GanttChartModelEvent.ID.TIMELINE_OBJECTS_ADDED`.
      Parameters:
        `node` - the tree node on which to add objects
        `layer` - the layer where the objects shall appear
        `timelineObjects` - the objects to add
      Since:
        1.0
      See Also:
        `removeTimelineObjects(IGanttChartNode, ILayer, Collection)`, `clearTimelineObjects(IGanttChartNode, ILayer)`, `getTimelineObjectsIterator(IGanttChartNode, ILayer, ITimeSpan)`

    - #### clearTimelineObjects

          public void clearTimelineObjects(T node,
                                           ILayer layer)

      Removes all timeline objects from the given tree node and layer. A call to this method will cause a `GanttChartModelEvent` to be fired with the ID equal to `GanttChartModelEvent.ID.TIMELINE_OBJECTS_REMOVED`.
      Parameters:
        `node` - the node on which to remove all timeline objects
        `layer` - the layer on which to remove all timeline objects
      Since:
        1.0
      See Also:
        `removeTimelineObjects(IGanttChartNode, ILayer, Collection)`, `clearTimelineObjects()`, `clearTimelineObjects(ILayer)`, `clearTimelineObjects(IGanttChartNode)`

    - #### clearTimelineObjects

          public void clearTimelineObjects(T node)

      Removes all timeline objects from the given tree node from all layers. A call to this method will cause a `GanttChartModelEvent` to be fired with the ID equal to `GanttChartModelEvent.ID.TIMELINE_OBJECTS_REMOVED`.
      Parameters:
        `node` - the node on which to remove all timeline objects
      Since:
        1.0
      See Also:
        `removeTimelineObjects(IGanttChartNode, ILayer, Collection)`, `clearTimelineObjects()`, `clearTimelineObjects(ILayer)`, `clearTimelineObjects(IGanttChartNode, ILayer)`

    - #### clearTimelineObjects

          public void clearTimelineObjects(ILayer layer)

      Removes all timeline objects from the given layer for all nodes. A call to this method will cause a `GanttChartModelEvent` to be fired with the ID equal to `GanttChartModelEvent.ID.TIMELINE_OBJECTS_REMOVED`.
      Parameters:
        `layer` - the layer on which to remove all timeline objects
      Since:
        1.0
      See Also:
        `removeTimelineObjects(IGanttChartNode, ILayer, Collection)`, `clearTimelineObjects()`, `clearTimelineObjects(IGanttChartNode)`, `clearTimelineObjects(IGanttChartNode, ILayer)`

    - #### clearTimelineObjects

          public void clearTimelineObjects()

      Removes all timeline objects from all nodes and all layers. A call to this method will cause a `GanttChartModelEvent` to be fired with the ID equal to `GanttChartModelEvent.ID.TIMELINE_OBJECTS_REMOVED`.
      Since:
        1.0
      See Also:
        `removeTimelineObjects(IGanttChartNode, ILayer, Collection)`, `clearTimelineObjects(ILayer)`, `clearTimelineObjects(IGanttChartNode)`, `clearTimelineObjects(IGanttChartNode, ILayer)`

    - #### getTimelineObjectsIterator

          public Iterator<S> getTimelineObjectsIterator(T node,
                                                        ILayer layer,
                                                        ITimeSpan span)

      Description copied from interface: `IGanttChartModel`
      Returns an `Iterator` that can be used to iterate over all timeline objects stored on the given node and layer within the given time span. This method is not allowed to return NULL.
      Specified by:
        `getTimelineObjectsIterator` in interface `IGanttChartModel<T extends IGanttChartNode<S>,S extends ITimelineObject>`
      Parameters:
        `node` - the tree node for which to return an iterator
        `layer` - the layer for which to return an iterator
        `span` - the time span for which to return an iterator
      Returns:
        an iterator for iterating over timeline objects stored on the given node, layer and time span

    - #### getTimeSpan

          public ITimeSpan getTimeSpan(S timelineObject)

      Description copied from interface: `IGanttChartModel`
      Returns the time span of the given timeline object. The span doesn't necessarily has to be stored directly on the object but might be retrieved by some other means. However, `DefaultGanttChartModel` does store the span on the internally used `IGanttChartNode` instances.
      Specified by:
        `getTimeSpan` in interface `IGanttChartModel<T extends IGanttChartNode<S>,S extends ITimelineObject>`
      Parameters:
        `timelineObject` - the object for which to return the time span
      Returns:
        the time span used by the given timeline object

    - #### removeTimelineObject

          public void removeTimelineObject(T node,
                                           ILayer layer,
                                           S timelineObject)

      Removes a single timeline object from the given node and layer. A call to this method will cause a `GanttChartModelEvent` to be fired with ID equal to `GanttChartModelEvent.ID.TIMELINE_OBJECTS_REMOVED`.
      Parameters:
        `node` - the tree node from which to remove objects
        `layer` - the layer from which to remove objects
        `timelineObject` - the object that will be removed
      Since:
        1.0
      See Also:
        `removeTimelineObjects(IGanttChartNode, ILayer, Collection)`

    - #### removeTimelineObjects

          public void removeTimelineObjects(T node,
                                            ILayer layer,
                                            Collection<S> timelineObjects)

      Removes a collection of objects from the given tree node and layer. A call to this method will cause a `GanttChartModelEvent` to be fired with ID equal to `GanttChartModelEvent.ID.TIMELINE_OBJECTS_REMOVED` .
      Parameters:
        `node` - the tree node from which to remove objects
        `layer` - the layer from which to remove objects
        `timelineObjects` - the objects that will be removed
      Since:
        1.0
      See Also:
        `addTimelineObjects(IGanttChartNode, ILayer, Collection)`, `clearTimelineObjects(IGanttChartNode, ILayer)`

    - #### setTimeSpan

          public void setTimeSpan(S timelineObject,
                                  ITimeSpan span)

      Sets a new time span on the given timeline object. Calling this method will cause a `GanttChartModelEvent` to be fired where the ID is equal to `GanttChartModelEvent.ID.TIMELINE_OBJECT_CHANGED`.
      Parameters:
        `timelineObject` - the target timeline object
        `span` - the new time span
      Since:
        1.0
      See Also:
        `getTimeSpan(ITimelineObject)`

    - #### addRelationship

          public void addRelationship(IRelationship<S> relationship)

      Adds a single relationship to the model. A relationship defines a source object and path, a target object and path that will be used by the `RelationshipLayer` to draw the lines and arrows between timeline objects. Calling this method will cause a `GanttChartModelEvent` to be thrown (ID equals `GanttChartModelEvent.ID.RELATIONSHIP_ADDED`).
      Parameters:
        `relationship` - the relationship object to add
      Since:
        1.0
      See Also:
        `addRelationships(Collection)`

    - #### addRelationships

          public void addRelationships(Collection<IRelationship<S>> relationships)

      Adds a collection of relationships to the model. Each relationship defines a source object and path, a target object and path that will be used by the `RelationshipLayer` to draw the lines and arrows between timeline objects. Calling this method will cause a `GanttChartModelEvent` to be thrown where the ID is equal to `GanttChartModelEvent.ID.RELATIONSHIP_ADDED`.
      Parameters:
        `relationships` - the relationships that need to be added
      Since:
        1.0
      See Also:
        `removeRelationships(Collection)`, `clearRelationships()`

    - #### clearRelationships

          public void clearRelationships()

      Removes all relationships from the model. Calling this method will cause a `GanttChartModelEvent` to be thrown where the ID is equal to `GanttChartModelEvent.ID.RELATIONSHIP_REMOVED`.
      Since:
        1.0
      See Also:
        `getRelationships()`, `addRelationships(Collection)`, `removeRelationships(Collection)`

    - #### getRelationships

          public Iterator<IRelationship<S>> getRelationships()

      Description copied from interface: `IGanttChartModel`
      Returns all relationships so that they can be visualized by the `RelationshipLayer`.
      Specified by:
        `getRelationships` in interface `IGanttChartModel<T extends IGanttChartNode<S>,S extends ITimelineObject>`
      Returns:
        all relationships currently known to the model

    - #### setRelationships

          public void setRelationships(Collection<IRelationship<S>> relationships)

      Sets all relationships at once.
      Parameters:
        `relationships` - the new relationsips to use
      Since:
        1.0

    - #### getRelationships

          public Iterator<IRelationship<S>> getRelationships(S obj)

      Description copied from interface: `IGanttChartModel`
      Returns those relationships that have the given timeline object either as a source or as a target object. This method gets called when the timeline object is currently visible and the `RelationshipLayer` wants to figure out which lines need to be drawn.
      Specified by:
        `getRelationships` in interface `IGanttChartModel<T extends IGanttChartNode<S>,S extends ITimelineObject>`
      Parameters:
        `obj` - the object for which to return relationships
      Returns:
        all relationships where the given object is either the source or the target

    - #### removeRelationship

          public void removeRelationship(IRelationship relationship)

      Removes a single relationship from the model.
      Parameters:
        `relationship` - the relationship to remove
      Since:
        1.0
      See Also:
        `removeRelationships(Collection)`

    - #### removeRelationships

          public void removeRelationships(Collection<IRelationship> rel)

      Removes a collection of relationships from the model. Calling this method will cause a `GanttChartModelEvent` to be thrown where the ID is equal to `GanttChartModelEvent.ID.RELATIONSHIP_REMOVED`.
      Parameters:
        `rel` - the relationships to remove
      Since:
        1.0
      See Also:
        `getRelationships()`, `addRelationships(Collection)`, `clearRelationships()`

    - #### timelineObjectChanged

          public void timelineObjectChanged(S timelineObject)

      Triggers a `GanttChartModelEvent` that informs listeners that the given timeline object has been changed.
      Parameters:
        `timelineObject` - the object that was modified
      Since:
        1.0

    - #### getTimelineObjectPath

          public TimelineObjectPath getTimelineObjectPath(T node,
                                                          S timelineObject,
                                                          ILayer layer)

      Returns a timeline object path for the given node and object.
      Parameters:
        `node` - the Gantt chart node
        `timelineObject` - the timeline object
        `layer` - the layer on which the timeline object is displayed
      Returns:
        a timeline object path
      Since:
        1.0

    - #### getChildrenTimelineObjects

          public Iterator<S> getChildrenTimelineObjects(S parent)

      Description copied from interface: `IGanttChartModel`
      Returns an iterator over the children of the given parent timeline object.
      Specified by:
        `getChildrenTimelineObjects` in interface `IGanttChartModel<T extends IGanttChartNode<S>,S extends ITimelineObject>`
      Parameters:
        `parent` - the parent timeline object
      Returns:
        an iterator used for iterating over the list of children timeline objects associated with the given parent timeline object

    - #### isParentTimelineObject

          public boolean isParentTimelineObject(S timelineObject)

      Description copied from interface: `IGanttChartModel`
      Determines whether the given timeline object is a parent timeline object. A parent timeline object references children timeline objects. This concept is often used to display the union of several time spans of timeline objects (summary).
      Specified by:
        `isParentTimelineObject` in interface `IGanttChartModel<T extends IGanttChartNode<S>,S extends ITimelineObject>`
      Parameters:
        `timelineObject` - the timeline object to check
      Returns:
        TRUE if the given timeline object is a parent of one or more children timeline objects
      See Also:
        `IGanttChartModel.getChildrenTimelineObjects(Object)`

    - #### addSpreadsheet

          public void addSpreadsheet(ISpreadsheet spreadsheet)

      Adds a spreadsheet to the model.
      Parameters:
        `spreadsheet` - the spreadsheet to add
      Since:
        2.1

    - #### removeSpreadsheet

          public void removeSpreadsheet(ISpreadsheet spreadsheet)

      Removes a spreadsheet from the model.
      Parameters:
        `spreadsheet` - the spreadsheet to remove
      Since:
        2.1

    - #### getSpreadsheets

          public Iterator<ISpreadsheet> getSpreadsheets()

      Description copied from interface: `IGanttChartModel`
      Returns an iterator over the spreadsheets used by the model. The layer container manages a single instance of `SpreadsheetLayer` which is capable of displaying one spreadsheet at a time.
      Specified by:
        `getSpreadsheets` in interface `IGanttChartModel<T extends IGanttChartNode<S>,S extends ITimelineObject>`
      Returns:
        an iterator over all spreadsheets defined for the Gantt chart

    - #### getSpreadsheetValue

          public Object getSpreadsheetValue(ISpreadsheet spreadsheet,
                                            T node,
                                            ITimeSpan span)

      Description copied from interface: `IGanttChartModel`
      Returns an object for the given tree node, the given spreadsheet and the given time span. Time spans passed to this method usually define a whole day, month, week or year.
      Specified by:
        `getSpreadsheetValue` in interface `IGanttChartModel<T extends IGanttChartNode<S>,S extends ITimelineObject>`
      Parameters:
        `spreadsheet` - the spreadsheet for which to return a value for the given node and time span
        `node` - a node within the tree table on the left-hand side of the Gantt chart
        `span` - the time span for which to return a value (the span is usually a whole day, month, week ...)
      Returns:
        a value for a spreadsheet cell where the cell is defined by the given node and time span
      See Also:
        `IGanttChartModel.getSpreadsheetValueType(ISpreadsheet, Object, ITimeSpan)`

    - #### getSpreadsheetValueType

          public Class getSpreadsheetValueType(ISpreadsheet spreadsheet,
                                               T node,
                                               ITimeSpan span)

      Description copied from interface: `IGanttChartModel`
      Returns the type of the object shown within the specified spreadsheet cell (specification via tree node, spreadsheet, time span). This method is important for looking up the correct cell editor for the spreadsheet cell if the cell currently does not provide a value.
      Specified by:
        `getSpreadsheetValueType` in interface `IGanttChartModel<T extends IGanttChartNode<S>,S extends ITimelineObject>`
      Parameters:
        `spreadsheet` - the spreadsheet for which to return a value type
        `node` - a node within the tree table on the left-hand side of the Gantt chart
        `span` - the time span for which to return a value type (the span is usually a whole day, month, week ...)
      Returns:
        the type of object that will be shown in the given time span for the given node
      See Also:
        `IGanttChartModel.getSpreadsheetValue(ISpreadsheet, Object, ITimeSpan)`

    - #### setSpreadsheetValue

          public void setSpreadsheetValue(T node,
                                          ISpreadsheet spreadsheet,
                                          ITimeSpan span,
                                          Object value)

      Sets an object/value in a spreadsheet cell where the cell is specified by the combination of the given tree table node, the spreadsheet and the time span. Calling this method causes a `GanttChartModelEvent` to be fired (ID = `GanttChartModelEvent.ID.SPREADSHEET_VALUE_CHANGED`.
      Parameters:
        `node` - a node within the tree table on the left-hand side of the Gantt chart
        `spreadsheet` - the spreadsheet where the value gets edited
        `span` - the time span for which to set a value (usually a whole day, month, week ...)
        `value` - the new object/value for the spreadsheet cell
      Since:
        2.1

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