ilog.ds.gantt
Class ConstraintEvent
java.lang.Object
|
+--java.util.EventObject
|
+--ilog.ds.AbstractDSEvent
|
+--ilog.ds.gantt.ConstraintEvent
- All Implemented Interfaces:
- Serializable
- public class ConstraintEvent
- extends AbstractDSEvent
Event class used for all events happening on a gantt constraint.
- See Also:
- Serialized Form
_constraint
protected Object _constraint
_fromActivity
protected Object _fromActivity
_toActivity
protected Object _toActivity
ConstraintEvent
public ConstraintEvent(Object source,
Object fromActivity,
Object toActivity,
Object constraint,
Map properties)
- Constructor to use for creating constraints.
- Parameters:
source
- The first parameter is the source of the event.parent
- The owner of the new constraint. Can be null
for a root reservation.fromActivity
- The origin activity concerned by the constraint. Can be
anything, as it is only used as a key.toActivity
- The target activity concerned by the constraint. Can be
anything, as it is only used as a key.constraint
- The constraint itself. Can be anything, as it is only used as
a key.properties
- It contains the named properties of the constraint, that is,
all the properties when the contraint is created.
ConstraintEvent
public ConstraintEvent(Object source,
Object constraint,
Map properties)
- Constructor to use for updating constraints.
- Parameters:
source
- The first parameter is the source of the event.constraint
- The constraint itself. Can be anything, as it is only used as
a key.properties
- Contains the named properties of the constraint, that is, all
the modified properties. Predefined named properties
fromActivity
and toActivity
are
used to respectively change from activity and to activity of
the constraint.
ConstraintEvent
public ConstraintEvent(Object source,
Object constraint)
- Constructor to use when the constraint is being deleted.
getConstraint
public Object getConstraint()
- Gets the constraint (to be used only as a key).
- Returns:
- the subject of this event
getFromActivity
public Object getFromActivity()
- Gets the source activity of the constraint, only useful for creation.
- Returns:
- the source activity of the subject of this event
getToActivity
public Object getToActivity()
- Gets the target activity of the constraint, only useful for creation.
- Returns:
- the target activity of the subject of this event