public interface IlvReservation
IlvReservation
defines the abstract behavior of an
assignment of an IlvResource
to an IlvActivity
.
The activity reserving the resource is immutable once the
IlvReservation
has been created. However, the resource that has
been reserved can be modified by invoking setResource(ilog.views.gantt.IlvResource)
.
IlvReservation
implementations are expected to route their
property change events to the Gantt data model
.
Therefore, although there is no accessor to the data model in this interface,
the reservation implementation must have some method of obtaining the model
it belongs to. Here is an example of how the IlvReservation
implementation should fire its property change events:
void fireEvent (ReservationEvent event) { IlvGanttModel model = ..... if (model != null) model.fireReservationEvent(event); }
Modifier and Type | Method and Description |
---|---|
IlvActivity |
getActivity()
Returns the activity for this reservation.
|
IlvResource |
getResource()
Returns the resource for this reservation.
|
void |
setGanttModelImpl(IlvGanttModel model)
This method is invoked by the
IlvGanttModel when the reservation
is added or removed. |
void |
setResource(IlvResource resource)
Sets the resource for this reservation.
|
IlvResource getResource()
void setResource(IlvResource resource)
resource
must be a member of the same
data model. Before the resource is modified the reservation's data model,
if any, will fire an aboutToChange
ReservedResourceEvent
.
After the resource is modified, the reservation's data model will fire a
changed ReservedResourceEvent
.
The implementation of this method can use
IlvGanttModelUtil.checkValidMemberResource(ilog.views.gantt.IlvResource, ilog.views.gantt.IlvGanttModel)
to validate
resource
.
resource
- The resource.IllegalArgumentException
- if resource
is
null
or is not a member of the same data model as this
reservationReservationEvent
,
ReservationListener.reservationChanged(ilog.views.gantt.event.ReservationEvent)
IlvActivity getActivity()
void setGanttModelImpl(IlvGanttModel model)
IlvGanttModel
when the reservation
is added or removed.
Warning: This method is considered to be part of an
IlvReservation
's internal implementation and is not a public
API.
You should only invoke this method directly if you have created your own
IlvGanttModel
implementation.
model
- The data model that this reservation has been added to, or
null
if this reservation has been removed from the data model.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.