com.dlsc.flexgantt.model.dateline
Class DatelineModelEvent

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

public class DatelineModelEvent
extends java.util.EventObject

An event object used by dateline models to inform listeners about various changes to the models. Listeners that want to receive dateline model events need to implement the IDatelineModelListener interface and register themselves as listeners.

Since:
1.0
Author:
Dirk Lemmermann
See Also:
IDatelineModelListener, IDatelineModel.addDatelineModelListener(IDatelineModelListener), Serialized Form

Nested Class Summary
static class DatelineModelEvent.ID
          An enumerator that contains values used for identifying different types of events.
 
Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DatelineModelEvent(IDatelineModel model, DatelineModelEvent.ID id)
          Constructs a new dateline model event.
DatelineModelEvent(IDatelineModel model, DatelineModelEvent.ID id, ITimeSpan requestedVisibleTimeSpan)
          Constructs a new dateline model event.
 
Method Summary
 DatelineModelEvent.ID getId()
          Returns the event type identifier that allows the application to distinguish between different types of events that can occure on the model.
 IDatelineModel getModel()
          Returns the dateline model that was the source of the event.
 ITimeSpan getRequestedVisibleTimeSpan()
          Returns the time span that was requested from the dateline model to be visible.
 
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

DatelineModelEvent

public DatelineModelEvent(IDatelineModel model,
                          DatelineModelEvent.ID id,
                          ITimeSpan requestedVisibleTimeSpan)
Constructs a new dateline model event.

Parameters:
model - the model where the event occured
id - the type identifier that allows to distinguish between different kinds of events (new time span, different dateline width, ...)
requestedVisibleTimeSpan - only used after a call to IDatelineModel.requestVisibleTimeSpan(ITimeSpan)
Since:
1.0

DatelineModelEvent

public DatelineModelEvent(IDatelineModel model,
                          DatelineModelEvent.ID id)
Constructs a new dateline model event.

Parameters:
model - the model where the event occured
id - the type identifier that allows to distinguish between different kinds of events (new time span, different dateline width, ...)
Since:
1.0
Method Detail

getId

public DatelineModelEvent.ID getId()
Returns the event type identifier that allows the application to distinguish between different types of events that can occure on the model.

Returns:
the event type identifier
Since:
1.0

getModel

public IDatelineModel getModel()
Returns the dateline model that was the source of the event.

Returns:
the event source (the dateline model)
Since:
1.0

getRequestedVisibleTimeSpan

public ITimeSpan getRequestedVisibleTimeSpan()
Returns the time span that was requested from the dateline model to be visible.

Returns:
the requested time span
Since:
1.0
See Also:
IDatelineModel.requestVisibleTimeSpan(ITimeSpan)