public class IlvDefaultGanttModel extends IlvAbstractGanttModel
IlvDefaultGanttModel
is a default implementation of the
IlvGanttModel
interface, suitable for many
applications.
An instance of IlvDefaultGanttModel
has several parameters that
affect its performance in two categories: initial capacity and
load factor. The capacity is the number of buckets in each
collection of data model entities, and the initial capacity is simply the
capacity at the time that the data model is created. The load factor
is a measure of how full a collection is allowed to get before its capacity
is automatically increased. When the number of entries in a collection
exceeds the product of the load factor and the current capacity, the capacity
of the collection is roughly doubled.
As a general rule, the default load factor (0.75) offers a good trade-off
between time and space costs. The expected number of data model entities and
the load factor should be taken into account when setting the initial
capacities. It is desirable to minimize the number of times that a collection
has its capacity increased, as this is an expensive operation time-wise. If
the initial capacity of a collection is greater than the maximum number of
data model entities divided by the load factor, the collection will never
have its capacity increased.
ADJUSTING_PROPERTY, BATCHING_PROPERTY
Constructor and Description |
---|
IlvDefaultGanttModel()
Constructs a new instance of
IlvDefaultGanttModel that is
empty. |
IlvDefaultGanttModel(int initialActivityCapacity,
int initialResourceCapacity,
int initialConstraintCapacity,
int initialReservationCapacity)
Constructs a new instance of
IlvDefaultGanttModel that is
empty. |
IlvDefaultGanttModel(int initialActivityCapacity,
int initialResourceCapacity,
int initialConstraintCapacity,
int initialReservationCapacity,
float loadFactor)
Constructs a new instance of
IlvDefaultGanttModel that is
empty. |
Modifier and Type | Method and Description |
---|---|
void |
addActivity(IlvActivity newActivity,
IlvActivity parent,
int index)
Adds
newActivity as a child of parent activity
at the specified location in its list of child activities. |
void |
addConstraint(IlvConstraint newConstraint)
Adds
newConstraint to the data model. |
void |
addReservation(IlvReservation newReservation)
Adds
newReservation to the data model. |
void |
addResource(IlvResource newResource,
IlvResource parent,
int index)
Adds
newResource as a child of parent resource
at the specified location in its list of child resources. |
Iterator<IlvActivity> |
childActivityIterator(IlvActivity parent)
Returns an iterator over the parent activity's children.
|
Iterator<IlvResource> |
childResourceIterator(IlvResource parent)
Returns an iterator over the parent resource's children.
|
Iterator<IlvConstraint> |
constraintIterator()
Returns an iterator over all the constraints in the data model.
|
Iterator<IlvConstraint> |
constraintIteratorFromActivity(IlvActivity fromActivity)
Returns an iterator over the constraints in the data model that have the
specified activity as their source or from activity.
|
Iterator<IlvConstraint> |
constraintIteratorToActivity(IlvActivity toActivity)
Returns an iterator over the constraints in the data model that have the
specified activity as their target or to activity.
|
boolean |
contains(IlvConstraint constraint)
Returns whether the specified constraint is a member of the data model.
|
boolean |
contains(IlvHierarchyNode activityOrResource)
Returns whether the specified activity or resource is a member of the
data model.
|
boolean |
contains(IlvReservation reservation)
Returns whether the specified reservation is a member of the data model.
|
void |
fireReservationEvent(ReservationEvent event)
Fires a reservation event to all subscribed listeners.
|
IlvActivity |
getChildActivity(IlvActivity parent,
int index)
Returns the child of the specified parent activity at index
index . |
int |
getChildActivityCount(IlvActivity parent)
Returns the number of children of the specified parent activity.
|
int |
getChildActivityIndex(IlvActivity parent,
IlvActivity child)
Returns the index of the specified child in the parent activity's list
of children.
|
IlvResource |
getChildResource(IlvResource parent,
int index)
Returns the child of the specified parent resource at index
index . |
int |
getChildResourceCount(IlvResource parent)
Returns the number of children of the specified parent resource.
|
int |
getChildResourceIndex(IlvResource parent,
IlvResource child)
Returns the index of the specified child in the parent resource's list
of children.
|
IlvActivity |
getParentActivity(IlvActivity activity)
Returns the parent activity of the specified activity or
null
if the activity is the root activity of the data model. |
int |
getParentActivityIndex(IlvActivity activity)
Returns the index of the specified activity within its parent activity.
|
IlvResource |
getParentResource(IlvResource resource)
Returns the parent resource of the specified resource or
null
if the resource is the root resource of the data model. |
int |
getParentResourceIndex(IlvResource resource)
Returns the index of the specified resource within its parent resource.
|
IlvActivity |
getRootActivity()
Returns the root activity of the data model or
null if the
data model contains no activities. |
IlvResource |
getRootResource()
Returns the root resource of the data model or
null if the
data model contains no resources. |
void |
moveActivity(IlvActivity activity,
IlvActivity newParent,
int newIndex)
Moves the specified activity from its current location in the tree to a
new location.
|
void |
moveResource(IlvResource resource,
IlvResource newParent,
int newIndex)
Moves the specified resource from its current location in the tree to a
new location.
|
void |
removeActivity(IlvActivity activity)
Removes the specified child activity from its parent.
|
void |
removeActivity(IlvActivity parent,
int index)
Removes the child activity from parent that is at the specified
location in its list of child activities.
|
void |
removeConstraint(IlvConstraint constraint)
Removes the specified
constraint from the data model. |
void |
removeReservation(IlvReservation reservation)
Removes the specified
reservation from the data model. |
void |
removeResource(IlvResource resource)
Removes the specified child resource from its parent.
|
void |
removeResource(IlvResource parent,
int index)
Removes the child resource from parent that is at the specified
location in its list of child resources.
|
Iterator<IlvReservation> |
reservationIterator()
Returns an iterator over all the reservations in the data model.
|
Iterator<IlvReservation> |
reservationIterator(IlvActivity activity)
Returns an iterator over all the reservations in the data model
that are associated with the specified activity.
|
Iterator<IlvReservation> |
reservationIterator(IlvResource resource)
Returns an iterator over all the reservations in the data model
that are associated with the specified resource.
|
Iterator<IlvReservation> |
reservationIterator(IlvResource resource,
IlvTimeInterval interval)
Returns an iterator over all the reservations in the data model
that are associated with the specified resource and where the assigned
activity intersects the specified time interval.
|
void |
setRootActivity(IlvActivity root)
Sets the root activity of the data model.
|
void |
setRootResource(IlvResource root)
Sets the root resource of the data model.
|
activityPreorderIterator, activityPreorderIterator, addActivity, addActivityHierarchyListener, addActivityListener, addConstraintListener, addGanttModelPropertyListener, addReservationListener, addResource, addResourceHierarchyListener, addResourceListener, clear, fireActivitiesInserted, fireActivitiesInserted, fireActivitiesRemoved, fireActivitiesRemoved, fireActivityEvent, fireActivityInserted, fireActivityMoved, fireActivityRemoved, fireConstraintEvent, fireConstraintInserted, fireConstraintRemoved, fireConstraintRemoved, fireGanttModelPropertyEvent, fireReservationInserted, fireReservationRemoved, fireReservationRemoved, fireResourceEvent, fireResourceInserted, fireResourceMoved, fireResourceRemoved, fireResourcesInserted, fireResourcesInserted, fireResourcesRemoved, fireResourcesRemoved, getActivityHierarchyListeners, getActivityListeners, getChild, getChildCount, getChildIndex, getParent, getParentIndex, getResourceHierarchyListeners, getResourceListeners, isAdjusting, isBatching, registerEventListener, removeActivityHierarchyListener, removeActivityListener, removeConstraintListener, removeGanttModelPropertyListener, removeReservationListener, removeResourceHierarchyListener, removeResourceListener, resourcePreorderIterator, resourcePreorderIterator, setAdjusting, setBatching, writeEventListeners
public IlvDefaultGanttModel(int initialActivityCapacity, int initialResourceCapacity, int initialConstraintCapacity, int initialReservationCapacity, float loadFactor)
IlvDefaultGanttModel
that is
empty. The data model has the specified initial capacities and load factor.initialActivityCapacity
- The initial activity capacity.initialResourceCapacity
- The initial resource capacity.initialConstraintCapacity
- The initial constraint capacity.initialReservationCapacity
- The initial reservation capacity.loadFactor
- The load factor.public IlvDefaultGanttModel(int initialActivityCapacity, int initialResourceCapacity, int initialConstraintCapacity, int initialReservationCapacity)
IlvDefaultGanttModel
that is
empty. The data model has the specified initial capacities and a default
load factor of 0.75
.initialActivityCapacity
- The initial activity capacity.initialResourceCapacity
- The initial resource capacity.initialConstraintCapacity
- The initial constraint capacity.initialReservationCapacity
- The initial reservation capacity.public IlvDefaultGanttModel()
IlvDefaultGanttModel
that is
empty. The data model has an initial capacity of 101
activities, 101
resources, 101
constraints, and
211
reservations. The data model has a default load factor of
0.75
.public boolean contains(IlvHierarchyNode activityOrResource)
activityOrResource
- The activity or resource.public IlvActivity getRootActivity()
null
if the
data model contains no activities.null
.public void setRootActivity(IlvActivity root)
ConstraintRemovedEvent
s and
ReservationRemovedEvent
s for each removed constraint and
reservation. The removingActivity property of these events will be
true
. Then, if there was a previous root activity, the data
model will fire an ActivitiesRemovedEvent
for the old root.
Finally, if the new root activity is not null
, the data model
will fire an ActivitiesInsertedEvent
for
the new root.root
- The new root activity or null
if the data model
is to contain no activities.ActivityHierarchyListener.activitiesInserted(ilog.views.gantt.event.ActivitiesInsertedEvent)
,
ActivityHierarchyListener.activitiesRemoved(ilog.views.gantt.event.ActivitiesRemovedEvent)
public Iterator<IlvActivity> childActivityIterator(IlvActivity parent)
childActivityIterator
in interface IlvGanttModel
childActivityIterator
in class IlvAbstractGanttModel
parent
- The parent activity.parent
.public IlvActivity getParentActivity(IlvActivity activity)
null
if the activity is the root activity of the data model.activity
- The activity. The implementation of this method uses
IlvGanttModelUtil.checkValidMemberActivity(ilog.views.gantt.IlvActivity, ilog.views.gantt.IlvGanttModel)
to validate
activity
.null
.IllegalArgumentException
- if activity
is not a
member of this data model.public int getParentActivityIndex(IlvActivity activity)
activity
- The activity. The implementation of this method uses
IlvGanttModelUtil.checkValidMemberActivity(ilog.views.gantt.IlvActivity, ilog.views.gantt.IlvGanttModel)
to validate
activity
.-1
.IllegalArgumentException
- if activity
is not a
member of this data model.public int getChildActivityCount(IlvActivity parent)
parent
- The parent activity. The implementation of this method
uses IlvGanttModelUtil.checkValidMemberActivity(ilog.views.gantt.IlvActivity, ilog.views.gantt.IlvGanttModel)
to validate
parent
.IllegalArgumentException
- if parent
is not a member
of this data model.public IlvActivity getChildActivity(IlvActivity parent, int index)
index
.parent
- The parent activity. The implementation of this method
uses IlvGanttModelUtil.checkValidMemberActivity(ilog.views.gantt.IlvActivity, ilog.views.gantt.IlvGanttModel)
to validate
parent
.index
- The child index.index
.IllegalArgumentException
- if parent
is not a member
of this data model.IndexOutOfBoundsException
- if index
is out of range
(index < 0 || index >= getChildActivityCount(parent)).public int getChildActivityIndex(IlvActivity parent, IlvActivity child)
parent
- The parent activity. The implementation of this method
uses IlvGanttModelUtil.checkValidMemberActivity(ilog.views.gantt.IlvActivity, ilog.views.gantt.IlvGanttModel)
to validate
parent
.child
- The child activity to find the index of.-1
if the
activity is not a child of parent
.IllegalArgumentException
- if parent
is not a member
of this data model.public void addActivity(IlvActivity newActivity, IlvActivity parent, int index)
newActivity
as a child of parent
activity
at the specified location in its list of child activities. The current
child activity at index index
and any subsequent activities
are shifted to the right by having their indices incremented. After the
activity has been added, the data model will fire an
ActivitiesInsertedEvent
.newActivity
- The activity to add.parent
- The parent activity to which newActivity
is
added. The implementation of this method uses
IlvGanttModelUtil.checkValidMemberActivity(ilog.views.gantt.IlvActivity, ilog.views.gantt.IlvGanttModel)
to validate
parent
.index
- The location within the parent activity's list of children to
insert the new activity.
If index >= getChildActivityCount(parent)
then newActivity
is appended as the last child of
parent
.IllegalArgumentException
- if newActivity
is
null
or parent
is not a member of this data
model.IndexOutOfBoundsException
- if index
is out of range
(index < 0).ActivityHierarchyListener.activitiesInserted(ilog.views.gantt.event.ActivitiesInsertedEvent)
public void removeActivity(IlvActivity parent, int index)
ConstraintRemovedEvent
s
and ReservationRemovedEvent
s for each removed constraint and
reservation. The removingActivity property of these events will be
true
. Then, the data model will fire an
ActivitiesRemovedEvent
.parent
- The parent activity from which to remove the child activity.
The implementation of this method uses
IlvGanttModelUtil.checkValidMemberActivity(ilog.views.gantt.IlvActivity, ilog.views.gantt.IlvGanttModel)
to validate
parent
.index
- The location within parent's list of children to
remove the child activity.IllegalArgumentException
- if parent is null
or is not a member of this data model.IndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= getChildActivityCount(parent)).ActivityHierarchyListener.activitiesRemoved(ilog.views.gantt.event.ActivitiesRemovedEvent)
public void removeActivity(IlvActivity activity)
ConstraintRemovedEvent
s and
ReservationRemovedEvent
s for each removed constraint and
reservation. The removingActivity property of these events will be
true
. Then, the data model will fire an
ActivitiesRemovedEvent
.
This method cannot be used to remove the data model's root activity. Use
setRootActivity(null)
for that purpose.activity
- The activity to remove. It must be a member of this data
model, but cannot be the root activity. The implementation of this method
uses IlvGanttModelUtil.checkValidNonRootMemberActivity(ilog.views.gantt.IlvActivity, ilog.views.gantt.IlvGanttModel)
to
validate activity before removing it.IllegalArgumentException
- if activity is
null
, is not a member of this data model, or is the root
activity.ActivityHierarchyListener.activitiesRemoved(ilog.views.gantt.event.ActivitiesRemovedEvent)
public void moveActivity(IlvActivity activity, IlvActivity newParent, int newIndex)
ActivityMovedEvent
.activity
- The activity to move. It must be a member of this data
model, but cannot be the root activity. The implementation of this method
uses IlvGanttModelUtil.checkValidNonRootMemberActivity(ilog.views.gantt.IlvActivity, ilog.views.gantt.IlvGanttModel)
to
validate activity.newParent
- The parent activity to which activity
will be
made a child. It must be a member of this data model. The implementation of
this method uses IlvGanttModelUtil.checkValidMemberActivity(ilog.views.gantt.IlvActivity, ilog.views.gantt.IlvGanttModel)
to validate newParent.newIndex
- The location within newParent
's list of
children that activity
will be inserted. If
newIndex >= getChildActivityCount(newParent)
then
activity
will be appended as the last child of
newParent
.IllegalArgumentException
- if activity
is
null
, is not a member of this data model, or is the root
activity. Also, if newParent
is not a member of this data
model.IndexOutOfBoundsException
- if newIndex
is out of
range (newIndex < 0).ActivityHierarchyListener.activityMoved(ilog.views.gantt.event.ActivityMovedEvent)
public IlvResource getRootResource()
null
if the
data model contains no resources.null
.public void setRootResource(IlvResource root)
ReservationRemovedEvent
s for each removed reservation. The
removingResource
property of these events will be true
. Then, if there was a
previous root resource, the data model will fire a
ResourcesRemovedEvent
for the old root.
Finally, if the new root resource is not null
, the data model
will fire a ResourcesInsertedEvent
for the
new root.root
- The new root resource or null
if the data model
is to contain no resources.ResourceHierarchyListener.resourcesInserted(ilog.views.gantt.event.ResourcesInsertedEvent)
,
ResourceHierarchyListener.resourcesRemoved(ilog.views.gantt.event.ResourcesRemovedEvent)
public Iterator<IlvResource> childResourceIterator(IlvResource parent)
childResourceIterator
in interface IlvGanttModel
childResourceIterator
in class IlvAbstractGanttModel
parent
- The parent resource.parent
.public IlvResource getParentResource(IlvResource resource)
null
if the resource is the root resource of the data model.resource
- The resource. The implementation of this method uses
IlvGanttModelUtil.checkValidMemberResource(ilog.views.gantt.IlvResource, ilog.views.gantt.IlvGanttModel)
to validate
resource
.null
.IllegalArgumentException
- if resource
is not a
member of this data model.public int getParentResourceIndex(IlvResource resource)
resource
- The resource. The implementation of this method uses
IlvGanttModelUtil.checkValidMemberResource(ilog.views.gantt.IlvResource, ilog.views.gantt.IlvGanttModel)
to validate
resource
.-1
.IllegalArgumentException
- if resource
is not a
member of this data model.public int getChildResourceCount(IlvResource parent)
parent
- The parent resource. The implementation of this method
uses IlvGanttModelUtil.checkValidMemberResource(ilog.views.gantt.IlvResource, ilog.views.gantt.IlvGanttModel)
to validate
parent
.IllegalArgumentException
- if parent
is not a member
of this data model.public IlvResource getChildResource(IlvResource parent, int index)
index
.parent
- The parent resource. The implementation of this method
uses IlvGanttModelUtil.checkValidMemberResource(ilog.views.gantt.IlvResource, ilog.views.gantt.IlvGanttModel)
to validate
parent
.index
- The child index.index
.IllegalArgumentException
- if parent
is not a member
of this data model.IndexOutOfBoundsException
- if index
is out of range
(index < 0 || index >= getChildResourceCount(parent)).public int getChildResourceIndex(IlvResource parent, IlvResource child)
parent
- The parent resource. The implementation of this method
uses IlvGanttModelUtil.checkValidMemberResource(ilog.views.gantt.IlvResource, ilog.views.gantt.IlvGanttModel)
to validate
parent
.child
- The child resource to find the index of.-1
if the
resource is not a child of parent
.IllegalArgumentException
- if parent
is not a member
of this data model.public void addResource(IlvResource newResource, IlvResource parent, int index)
newResource
as a child of parent
resource
at the specified location in its list of child resources. The current
child resource at index index
and any subsequent resources
are shifted to the right by having their indices incremented. After the
resource has been added, the data model will fire a
ResourcesInsertedEvent
.newResource
- The resource to add.parent
- The parent resource to which newResource
is
added. The implementation of this method uses
IlvGanttModelUtil.checkValidMemberResource(ilog.views.gantt.IlvResource, ilog.views.gantt.IlvGanttModel)
to validate
parent
.index
- The location within the parent resource's list of children to
insert the new resource. If index >= parent.getChildCount()
then newResource
is appended as the last child of
parent
.IllegalArgumentException
- if newResource
is
null
or parent
is not a member of this data
model.IndexOutOfBoundsException
- if index
is out of range
(index < 0).ResourceHierarchyListener.resourcesInserted(ilog.views.gantt.event.ResourcesInsertedEvent)
public void removeResource(IlvResource parent, int index)
ReservationRemovedEvent
s for each
removed reservation. The removingResource
property of these events will be true
.
Then, the data model will fire a
ResourcesRemovedEvent
.parent
- The parent resource from which to remove the child resource.
The implementation of this method uses
IlvGanttModelUtil.checkValidMemberResource(ilog.views.gantt.IlvResource, ilog.views.gantt.IlvGanttModel)
to validate
parent
.index
- The location within parent's list of children to
remove the child resource.IllegalArgumentException
- if parent is null
or is not a member of this data model.IndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= getChildResourceCount(parent)).ResourceHierarchyListener.resourcesRemoved(ilog.views.gantt.event.ResourcesRemovedEvent)
public void removeResource(IlvResource resource)
ReservationRemovedEvent
s for each removed
reservation. The removingResource
property of these events will be true
.
Then, the data model will fire a
ResourcesRemovedEvent
. This method cannot
be used to remove the data model's root resource.
Use setRootResource(null)
for that purpose.resource
- The resource to remove. It must be a member of this data
model, but cannot be the root resource. The implementation of this method
uses IlvGanttModelUtil.checkValidNonRootMemberResource(ilog.views.gantt.IlvResource, ilog.views.gantt.IlvGanttModel)
to
validate resource before removing it.IllegalArgumentException
- if resource is
null
, is not a member of this data model, or is the root
resource.ResourceHierarchyListener.resourcesRemoved(ilog.views.gantt.event.ResourcesRemovedEvent)
public void moveResource(IlvResource resource, IlvResource newParent, int newIndex)
ResourceMovedEvent
.resource
- The resource to move. It must be a member of this data
model, but cannot be the root resource. The implementation of this method
uses IlvGanttModelUtil.checkValidNonRootMemberResource(ilog.views.gantt.IlvResource, ilog.views.gantt.IlvGanttModel)
to
validate resource.newParent
- The parent resource to which resource
will be
made a child. It must be a member of this data model. The implementation of
this method uses IlvGanttModelUtil.checkValidMemberResource(ilog.views.gantt.IlvResource, ilog.views.gantt.IlvGanttModel)
to validate newParent.newIndex
- The location within newParent
's list of
children that resource
will be inserted. If
newIndex >= getChildResourceCount(newParent)
then
resource
will be appended as the last child of newParent
.IllegalArgumentException
- if resource
is
null
, is not a member of this data model, or is the root
resource. Also, if
newParent
is not a member of this data model.IndexOutOfBoundsException
- if newIndex
is out of
range (newIndex < 0).ResourceHierarchyListener.resourceMoved(ilog.views.gantt.event.ResourceMovedEvent)
public boolean contains(IlvConstraint constraint)
constraint
- The constraint.public Iterator<IlvConstraint> constraintIterator()
public Iterator<IlvConstraint> constraintIteratorFromActivity(IlvActivity fromActivity)
fromActivity
- The from activity.public Iterator<IlvConstraint> constraintIteratorToActivity(IlvActivity toActivity)
toActivity
- The to activity.public void addConstraint(IlvConstraint newConstraint)
newConstraint
to the data model. The constraint's
from and to activities must already be members of this
data model.
After the constraint has been added, the data model will fire a
ConstraintInsertedEvent
.newConstraint
- The constraint to add.
The implementation of this method uses
IlvGanttModelUtil.checkValidNewConstraint(ilog.views.gantt.IlvConstraint, ilog.views.gantt.IlvGanttModel)
to validate newConstraint
.IllegalArgumentException
- if newConstraint
is
null
, is a member of a data model already, or its constrained
activities are not members of this data model.ConstraintListener.constraintChanged(ilog.views.gantt.event.ConstraintEvent)
public void removeConstraint(IlvConstraint constraint)
constraint
from the data model. After
the constraint has been removed, the data model will fire a
ConstraintRemovedEvent
.constraint
- The constraint to remove.
The implementation of this method uses
IlvGanttModelUtil.checkValidMemberConstraint(ilog.views.gantt.IlvConstraint, ilog.views.gantt.IlvGanttModel)
to validate
constraint
before removing it.IllegalArgumentException
- if constraint
is
null
or is not a member of this data model.ConstraintListener.constraintChanged(ilog.views.gantt.event.ConstraintEvent)
public boolean contains(IlvReservation reservation)
reservation
- The reservation.public Iterator<IlvReservation> reservationIterator()
public Iterator<IlvReservation> reservationIterator(IlvActivity activity)
activity
- The activity.public Iterator<IlvReservation> reservationIterator(IlvResource resource)
resource
- The resource.public Iterator<IlvReservation> reservationIterator(IlvResource resource, IlvTimeInterval interval)
interval
by evaluating
anActivity.getTimeInterval().overlaps(interval)
.resource
- The resource.interval
- The activity time interval of interest.IlvActivity.getTimeInterval()
public void addReservation(IlvReservation newReservation)
newReservation
to the data model. The reservation's
resource and activity must already be members of this data model. After the
reservation has been added, the data model will fire a
ReservationInsertedEvent
.newReservation
- The reservation to add.
The implementation of this method uses
IlvGanttModelUtil.checkValidNewReservation(ilog.views.gantt.IlvReservation, ilog.views.gantt.IlvGanttModel)
to
validate newReservation
.IllegalArgumentException
- if newReservation
is
null
, is a member of a data model already, its resource is
is not a member of this data model, or its activity is not a member of
this data model.ReservationListener.reservationChanged(ilog.views.gantt.event.ReservationEvent)
public void removeReservation(IlvReservation reservation)
reservation
from the data model. After
the reservation has been removed, the data model will fire a
ReservationRemovedEvent
.reservation
- The reservation to remove.
The implementation of this method uses
IlvGanttModelUtil.checkValidMemberReservation(ilog.views.gantt.IlvReservation, ilog.views.gantt.IlvGanttModel)
to
validate reservation
before removing it.IllegalArgumentException
- if reservation
is
null
or is not a member of this data model.ReservationListener.reservationChanged(ilog.views.gantt.event.ReservationEvent)
public void fireReservationEvent(ReservationEvent event)
IlvAbstractGanttModel
so that when a
ReservedResourceEvent
is fired, the data model will update its
internal hashtables with the new activity-to-resource mapping.
Warning: This method is considered to be part of an
IlvGanttModel
's internal implementation and not a
public API.
You should only invoke this method directly if you have created your own
IlvReservation
implementation that does not subclass
IlvAbstractReservation
.
fireReservationEvent
in interface IlvGanttModel
fireReservationEvent
in class IlvAbstractGanttModel
event
- The reservation event.ReservationListener.reservationChanged(ilog.views.gantt.event.ReservationEvent)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.