ilog.views.gantt.event
Class ActivityTimeIntervalEvent
java.lang.Object
java.util.EventObject
ilog.views.gantt.util.event.IlvPropertyEvent
ilog.views.gantt.event.ActivityPropertyEvent
ilog.views.gantt.event.ActivityTimeIntervalEvent
- All Implemented Interfaces:
- ActivityEvent, Serializable
public class ActivityTimeIntervalEvent
- extends ActivityPropertyEvent
ActivityTimeIntervalEvent is fired by an
IlvActivity both before and after its time interval is modified.
Immediately before its time interval is modified, an IlvActivity
fires an aboutToChange ActivityTimeIntervalEvent in
all listeners registered with the Gantt data model. Listeners can modify or
constrain the proposed time interval by invoking
setNewTimeInterval().
Alternatively, a listener can veto the proposed change by invoking
veto().
After its time interval is modified, an IlvActivity will fire a
changed ActivityTimeIntervalEvent in all listeners
registered with the Gantt data model. Listeners can access the old and new
values of the activity's time interval, but cannot modify them via the event
mechanism.
- See Also:
IlvActivity,
IlvGanttModel.addActivityListener(ilog.views.gantt.event.ActivityListener),
Serialized Form
ActivityTimeIntervalEvent
public ActivityTimeIntervalEvent(IlvActivity activity,
IlvTimeInterval oldInterval,
IlvTimeInterval newInterval,
boolean aboutToChangeEvent)
- Constructs a new
ActivityTimeIntervalEvent generated
by the specified activity and with the specified old and new
time interval values.
- Parameters:
activity - the activity where the event originatedoldInterval - the activity's previous time intervalnewInterval - the activity's new time intervalaboutToChangeEvent - true if this is an
activityTimeIntervalAboutToChange event or false
if this is an activityTimeIntervalChanged event.
getOldTimeInterval
public IlvTimeInterval getOldTimeInterval()
- Returns the activity's old time interval. If this is being asked in
the context of a listener's
activityTimeIntervalAboutToChange
event handler, then this will be the same as the activity's current
interval since the change has not actually occurred yet. In the context
of a listener's activityTimeIntervalChanged method, this
will be the activity's interval prior to the current modification being
reported.
- Returns:
- The old
IlvTimeInterval of the activity.
getNewTimeInterval
public IlvTimeInterval getNewTimeInterval()
- Returns the activity's new time interval. If this is being asked in
the context of a listener's
activityTimeIntervalAboutToChange
event handler, then this is the activity's proposed value. In the context
of a listener's activityTimeIntervalChanged method, this
is the activity's new time interval which is being reported.
- Returns:
- The new
IlvTimeInterval of the activity.
setNewTimeInterval
public void setNewTimeInterval(IlvTimeInterval interval)
- Sets the activity's proposed new time interval. This method only has
meaning in the context of a listener's
activityTimeIntervalAboutToChange event handler.
By using this method, a listener can constrain changes to the
activity's interval.
- Parameters:
interval - the activity's time interval
Copyright © 1996-2007 ILOG S.A. All rights reserved. Documentation homepage.