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