public class ActivityPropertyEvent extends IlvPropertyEvent implements ActivityEvent
ActivityPropertyEvent
is the superclass of all property
aboutToChange and changed events fired by
IlvActivity
's.
Basic support is provided for storing the property's old and new values,
along with veto capabilities for aboutToChange events. Concrete
subclasses should provide typesafe accessors for the property's values. For
example:
class ActivityFooEvent extends ActivityPropertyEvent { public ActivityFooEvent(IlvActivity activity, Foo oldVal, Foo newVal, boolean aboutToChangeEvent) { super(activity, oldVal, newVal, aboutToChangeEvent); } public Foo getOldFoo() { return (Foo)getOldValue(); } public Foo getNewFoo() { return (Foo)getNewValue(); } public void setNewFoo(Foo newVal) { setNewValue(newVal); } }Interested
ActivityListener
's must register with the gantt
data model to receive these events. IlvActivity
does not
handle direct listener subscriptions.source
Constructor and Description |
---|
ActivityPropertyEvent(IlvActivity activity,
Object oldValue,
Object newValue,
boolean aboutToChangeEvent)
Constructs a new
ActivityPropertyEvent generated by the
specified activity. |
Modifier and Type | Method and Description |
---|---|
IlvActivity |
getActivity()
Returns the activity where this event originated.
|
getNewValue, getOldValue, isAboutToChangeEvent, isChangedEvent, isVetoed, setNewValue, veto
getSource, toString
public ActivityPropertyEvent(IlvActivity activity, Object oldValue, Object newValue, boolean aboutToChangeEvent)
ActivityPropertyEvent
generated by the
specified activity.activity
- the activity where the event originatedoldValue
- the property's previous valuenewValue
- the property's new valueaboutToChangeEvent
- true
if this is a property
aboutToChange event or false
if this is a property
changed event.public IlvActivity getActivity()
getActivity
in interface ActivityEvent
IlvActivity
, origin of the event.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.