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.
source| Constructor and Description |
|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
IlvTimeInterval |
getNewTimeInterval()
Returns the activity's new time interval.
|
IlvTimeInterval |
getOldTimeInterval()
Returns the activity's old time interval.
|
void |
setNewTimeInterval(IlvTimeInterval interval)
Sets the activity's proposed new time interval.
|
getActivitygetNewValue, getOldValue, isAboutToChangeEvent, isChangedEvent, isVetoed, setNewValue, vetogetSource, toStringpublic ActivityTimeIntervalEvent(IlvActivity activity, IlvTimeInterval oldInterval, IlvTimeInterval newInterval, boolean aboutToChangeEvent)
ActivityTimeIntervalEvent generated
by the specified activity and with the specified old and new
time interval values.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.public IlvTimeInterval getOldTimeInterval()
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.IlvTimeInterval of the activity.public IlvTimeInterval getNewTimeInterval()
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.IlvTimeInterval of the activity.public void setNewTimeInterval(IlvTimeInterval interval)
activityTimeIntervalAboutToChange event handler.
By using this method, a listener can constrain changes to the
activity's interval.interval - the activity's time interval© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.