public interface IlvActivity extends IlvHierarchyNode
IlvActivity
defines the abstract behavior of a Gantt
activity. Each activity has a name, an identifier, a start time, and an end
time. Storage and lookup of IlvActivity
instances is expected
to be identity-based. Therefore, the default hashCode()
and
equals()
methods inherited from java.lang.Object
should not be overridden.
IlvActivity
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
activity implementation must have some method of obtaining the model it
belongs to. Here is an example of how the IlvActivity
implementation should fire its property change events:
void fireEvent(ActivityEvent event) { IlvGanttModel model = ..... if (model != null) model.fireActivityEvent(event); }
Modifier and Type | Method and Description |
---|---|
IlvUnaryPredicate<ActivityEvent> |
getChildEventFilter()
Returns a predicate that will be used to determine the events from this
activity's children that should be dispatched to this activity's
processChildEvent(ilog.views.gantt.event.ActivityEvent) method. |
Date |
getEndTime()
Returns the end time of the activity.
|
String |
getID()
Returns the ID string of the activity.
|
String |
getName()
Returns the name of the activity.
|
Date |
getStartTime()
Returns the start time of the activity.
|
IlvTimeInterval |
getTimeInterval()
Returns the time span between the start time and end time of the activity
as an interval.
|
void |
processChildEvent(ActivityEvent event)
This method is invoked by the
Gantt data model for
any events fired by the children of this activity and for which the
predicate returned by getChildEventFilter() evaluates to
true . |
void |
setEndTime(Date t)
Sets the end time of the activity.
|
void |
setGanttModelImpl(IlvGanttModel model)
This method is invoked by the
IlvGanttModel when the activity
is added or removed. |
void |
setID(String id)
Sets the ID string of the activity.
|
void |
setName(String name)
Sets the name of the activity.
|
void |
setStartTime(Date t)
Sets the start time of the activity.
|
void |
setTimeInterval(Date start,
Date end)
Sets the start time and end time of the activity.
|
void |
setTimeInterval(IlvTimeInterval interval)
Sets the start time and end time of the activity.
|
String getID()
void setID(String id)
id
- The activity's ID string.String getName()
void setName(String name)
name
- A descriptive name for this activity.Date getStartTime()
void setStartTime(Date t)
t > getEndTime()
, t
will actually become the
new end time and the previous end time will become the new start
time.t
- The start time.Date getEndTime()
void setEndTime(Date t)
t < getStartTime()
, t
will actually become the
new start time and the previous start time will become the new
end time.t
- The end time.IlvTimeInterval getTimeInterval()
void setTimeInterval(IlvTimeInterval interval)
interval
- The start and end time.void setTimeInterval(Date start, Date end)
end < start
, the values will be silently
swapped and start
will actually become the new end
time while end
will become the new start time.start
- The start time.end
- The end time.IlvUnaryPredicate<ActivityEvent> getChildEventFilter()
processChildEvent(ilog.views.gantt.event.ActivityEvent)
method. The Gantt data
model
applies the predicate to all ActivityEvent
s events fired by
the children of this activity. If the predicate evaluates to
true
, then the Gantt data model dispatches the child event to
the processChildEvent()
method. This allows you to easily
implement a parent activity property that is automatically computed
from one or more properties of its children.void processChildEvent(ActivityEvent event)
Gantt data model
for
any events fired by the children of this activity and for which the
predicate returned by getChildEventFilter()
evaluates to
true
.
This allows you to easily implement a parent activity property that is
automatically computed from one or more properties of its children.event
- The child activity event.void setGanttModelImpl(IlvGanttModel model)
IlvGanttModel
when the activity
is added or removed.
Warning: This method is considered to be part of an
IlvActivity
'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 activity has been added to, or
null
if this activity has been removed from the data model.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.