com.dlsc.flexgantt.model.gantt
Class GanttChartModelEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.dlsc.flexgantt.model.gantt.GanttChartModelEvent
All Implemented Interfaces:
java.io.Serializable

public class GanttChartModelEvent
extends java.util.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
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
GanttChartModelEvent(IGanttChartModel model, GanttChartModelEvent.ID id)
          Constructs a new model event.
GanttChartModelEvent(IGanttChartModel model, GanttChartModelEvent.ID id, ILayer layer)
          Constructs a new model event.
GanttChartModelEvent(IGanttChartModel model, GanttChartModelEvent.ID id, ITimeSpan timeSpan)
          Constructs a new model event.
GanttChartModelEvent(IGanttChartModel model, GanttChartModelEvent.ID id, java.lang.Object node, ILayer layer, TimelineObjectPath[] timelineObjects)
          Constructs a new model event.
GanttChartModelEvent(IGanttChartModel model, GanttChartModelEvent.ID id, java.lang.Object timelineObject, ITimeSpan timeSpan)
          Constructs a new model event.
GanttChartModelEvent(IGanttChartModel model, GanttChartModelEvent.ID id, TimelineObjectPath path)
          Constructs a new model event.
 
Method Summary
 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.
 java.lang.Object getNode()
          Returns the tree table node that was affected by the change.
 java.lang.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.
 java.lang.String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
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,
                            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,
                            java.lang.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,
                            java.lang.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
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

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 java.lang.Object getNode()
Returns the tree table node that was affected by the change.

Returns:
the affected node
Since:
1.0

getTimelineObject

public java.lang.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

toString

public java.lang.String toString()
Overrides:
toString in class java.util.EventObject