com.dlsc.flexgantt.model.gantt

## Class GanttChartModelEvent

- java.lang.Object
- - java.util.EventObject
  - - com.dlsc.flexgantt.model.gantt.GanttChartModelEvent

- All Implemented Interfaces:
    Serializable

      public class GanttChartModelEvent
      extends EventObject

  An event object class used for informing `IGanttChartModelListener` instances about changes in the model that they are observing.
  Since:
    1.0
  Author:
    Dirk Lemmermann
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `GanttChartModelEvent.ID` An event identifier used to indicate what kind of event has taken place.

  - ### Field Summary

    - ### Fields inherited from class java.util.EventObject

      `source`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GanttChartModelEvent(IGanttChartModel model, GanttChartModelEvent.ID id)` Constructs a new model event.
    `GanttChartModelEvent(IGanttChartModel model, GanttChartModelEvent.ID id, Collection<IRelationship> relationships)` Constructs a new model event.
    `GanttChartModelEvent(IGanttChartModel model, GanttChartModelEvent.ID id, ILayer layer)` Constructs a new model event.
    `GanttChartModelEvent(IGanttChartModel model, GanttChartModelEvent.ID id, ISpreadsheet spreadsheet)` Constructs a new model event.
    `GanttChartModelEvent(IGanttChartModel model, GanttChartModelEvent.ID id, ITimeSpan timeSpan)` Constructs a new model event.
    `GanttChartModelEvent(IGanttChartModel model, GanttChartModelEvent.ID id, Object node, ILayer layer, TimelineObjectPath[] timelineObjects)` Constructs a new model event.
    `GanttChartModelEvent(IGanttChartModel model, GanttChartModelEvent.ID id, Object timelineObject, ITimeSpan timeSpan)` Constructs a new model event.
    `GanttChartModelEvent(IGanttChartModel model, GanttChartModelEvent.ID id, Object node, ITimeSpan timeSpan, Object spreadsheeetValue)` Constructs a new model event.
    `GanttChartModelEvent(IGanttChartModel model, GanttChartModelEvent.ID id, TimelineObjectPath path)` Constructs a new model event.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `GanttChartModelEvent.ID` | `getId()` Returns the event's identifier that can be used by model observers to find out what has changed in the model.
    `ILayer` | `getLayer()` Returns the layer where the event occured.
    `IGanttChartModel` | `getModel()` Returns the source model of the event.
    `Object` | `getNode()` Returns the tree table node that was affected by the change.
    `Collection<IRelationship>` | `getRelationships()` Returns the relationships that were added to or removed from the model.
    `ISpreadsheet` | `getSpreadsheet()` Returns the spreadsheet that was added / removed, or where a value was changed.
    `Object` | `getSpreadsheetValue()` Returns the value that was entered into a spreadsheet cell.
    `Object` | `getTimelineObject()` Returns the timeline object that was affected by a change in the model.
    `TimelineObjectPath[]` | `getTimelineObjectPaths()` Returns the timeline objects that were affected by the change.
    `ITimeSpan` | `getTimeSpan()` Returns the time span that was affected by the change.

    - ### Methods inherited from class java.util.EventObject

      `getSource, toString`

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

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

- - ### Constructor Detail

    - #### GanttChartModelEvent

          public GanttChartModelEvent(IGanttChartModel model,
                                      GanttChartModelEvent.ID id,
                                      ILayer layer)

      Constructs a new model event.
      Parameters:
        `model` - the source of the event
        `id` - the identifier used to distinguish between different types of events
        `layer` - the layer that was affected by some kind of change in the model
      Since:
        1.0

    - #### GanttChartModelEvent

          public GanttChartModelEvent(IGanttChartModel model,
                                      GanttChartModelEvent.ID id,
                                      ISpreadsheet spreadsheet)

      Constructs a new model event.
      Parameters:
        `model` - the source of the event
        `id` - the identifier used to distinguish between different types of events
        `spreadsheet` - the layer that was affected by some kind of change in the model
      Since:
        1.0

    - #### GanttChartModelEvent

          public GanttChartModelEvent(IGanttChartModel model,
                                      GanttChartModelEvent.ID id,
                                      Collection<IRelationship> relationships)

      Constructs a new model event.
      Parameters:
        `model` - the source of the event
        `id` - the identifier used to distinguish between different types of events
        `relationships` - the relationships that were removed or added to the model
      Since:
        2.0

    - #### GanttChartModelEvent

          public GanttChartModelEvent(IGanttChartModel model,
                                      GanttChartModelEvent.ID id,
                                      ITimeSpan timeSpan)

      Constructs a new model event.
      Parameters:
        `model` - the source of the event
        `id` - the identifier used to distinguish between different types of events
        `timeSpan` - the time span that was affected by some kind of change in the model
      Since:
        1.0

    - #### GanttChartModelEvent

          public GanttChartModelEvent(IGanttChartModel model,
                                      GanttChartModelEvent.ID id,
                                      Object timelineObject,
                                      ITimeSpan timeSpan)

      Constructs a new model event.
      Parameters:
        `model` - the source of the event
        `id` - the identifier used to distinguish between different types of events
        `timelineObject` - the modified timeline object
        `timeSpan` - the time span that was affected by some kind of change in the model
      Since:
        1.0

    - #### GanttChartModelEvent

          public GanttChartModelEvent(IGanttChartModel model,
                                      GanttChartModelEvent.ID id,
                                      TimelineObjectPath path)

      Constructs a new model event.
      Parameters:
        `model` - the source of the event
        `id` - the identifier used to distinguish between different types of events
        `path` - the timeline object path that was affected by some kind of change in the model
      Since:
        1.0

    - #### GanttChartModelEvent

          public GanttChartModelEvent(IGanttChartModel model,
                                      GanttChartModelEvent.ID id,
                                      Object node,
                                      ILayer layer,
                                      TimelineObjectPath[] timelineObjects)

      Constructs a new model event.
      Parameters:
        `model` - the source of the event
        `id` - the identifier used to distinguish between different types of events
        `node` - the node that was affected by some kind of change in the model
        `layer` - the layer that was affected by some kind of change in the model
        `timelineObjects` - the timeline objects affected by some kind of change in the model
      Since:
        1.0

    - #### GanttChartModelEvent

          public GanttChartModelEvent(IGanttChartModel model,
                                      GanttChartModelEvent.ID id)

      Constructs a new model event.
      Parameters:
        `model` - the source of the event
        `id` - the identifier used to distinguish between different types of events
      Since:
        1.0

    - #### GanttChartModelEvent

          public GanttChartModelEvent(IGanttChartModel model,
                                      GanttChartModelEvent.ID id,
                                      Object node,
                                      ITimeSpan timeSpan,
                                      Object spreadsheeetValue)

      Constructs a new model event.
      Parameters:
        `model` - the source of the event
        `id` - the identifier used to distinguish between different types of events
        `node` - the tree node of the row where the cell was edited
        `timeSpan` - the time span for which a value was entered into the cell
        `spreadsheeetValue` - the value that was entered into the cell
      Since:
        2.1

  - ### Method Detail

    - #### getLayer

          public ILayer getLayer()

      Returns the layer where the event occured.
      Returns:
        the layer that was affected by the change
      Since:
        1.0

    - #### getSpreadsheet

          public ISpreadsheet getSpreadsheet()

      Returns the spreadsheet that was added / removed, or where a value was changed.
      Returns:
        the spreadsheet where the event occured
      Since:
        2.1

    - #### getTimeSpan

          public ITimeSpan getTimeSpan()

      Returns the time span that was affected by the change.
      Returns:
        the time span affected by the change.
      Since:
        1.0

    - #### getModel

          public IGanttChartModel getModel()

      Returns the source model of the event.
      Returns:
        the event's source
      Since:
        1.0

    - #### getId

          public GanttChartModelEvent.ID getId()

      Returns the event's identifier that can be used by model observers to find out what has changed in the model.
      Returns:
        the event identifier
      Since:
        1.0

    - #### getNode

          public Object getNode()

      Returns the tree table node that was affected by the change.
      Returns:
        the affected node
      Since:
        1.0

    - #### getTimelineObject

          public Object getTimelineObject()

      Returns the timeline object that was affected by a change in the model.
      Returns:
        the timeline object
      Since:
        1.0

    - #### getTimelineObjectPaths

          public TimelineObjectPath[] getTimelineObjectPaths()

      Returns the timeline objects that were affected by the change.
      Returns:
        the affected timeline objects
      Since:
        1.0

    - #### getRelationships

          public Collection<IRelationship> getRelationships()

      Returns the relationships that were added to or removed from the model.
      Returns:
        the added or removed relationships
      Since:
        2.0

    - #### getSpreadsheetValue

          public Object getSpreadsheetValue()

      Returns the value that was entered into a spreadsheet cell.
      Returns:
        the new spreadsheet value
      Since:
        2.1

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