public class ResourcePropertyEvent extends IlvPropertyEvent implements ResourceEvent
ResourcePropertyEvent
is the superclass of all property
aboutToChange and changed events fired by
IlvResource
'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 ResourceFooEvent extends ResourcePropertyEvent { public ResourceFooEvent (IlvResource resource, Foo oldVal, Foo newVal, boolean aboutToChangeEvent) { super(resource, oldVal, newVal, aboutToChangeEvent);} public Foo getOldFoo () { return (Foo)getOldValue();} public Foo getNewFoo () { return (Foo)getNewValue();} public void setNewFoo (Foo newVal) { setNewValue(newVal);} }Interested
ResourceListener
's must register with the gantt
data model to receive these events. IlvResource
does not
handle direct listener subscriptions.source
Constructor and Description |
---|
ResourcePropertyEvent(IlvResource resource,
Object oldValue,
Object newValue,
boolean aboutToChangeEvent)
Constructs a new
ResourcePropertyEvent generated by the
specified resource. |
Modifier and Type | Method and Description |
---|---|
IlvResource |
getResource()
Returns the resource where this event originated.
|
getNewValue, getOldValue, isAboutToChangeEvent, isChangedEvent, isVetoed, setNewValue, veto
getSource, toString
public ResourcePropertyEvent(IlvResource resource, Object oldValue, Object newValue, boolean aboutToChangeEvent)
ResourcePropertyEvent
generated by the
specified resource.resource
- the resource 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 IlvResource getResource()
getResource
in interface ResourceEvent
IlvResource
where this event originated.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.