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

Field Summary
protected  Object _constraint
           
protected  Object _fromActivity
           
protected  Object _toActivity
           
 
Fields inherited from class ilog.ds.AbstractDSEvent
_properties, _type, ADD, REMOVE, UPDATE
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ConstraintEvent(Object source, Object constraint)
          Constructor to use when the constraint is being deleted.
ConstraintEvent(Object source, Object constraint, Map properties)
          Constructor to use for updating constraints.
ConstraintEvent(Object source, Object fromActivity, Object toActivity, Object constraint, Map properties)
          Constructor to use for creating constraints.
 
Method Summary
 Object getConstraint()
          Gets the constraint (to be used only as a key).
 Object getFromActivity()
          Gets the source activity of the constraint, only useful for creation.
 Object getToActivity()
          Gets the target activity of the constraint, only useful for creation.
 
Methods inherited from class ilog.ds.AbstractDSEvent
getProperties, getType
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_constraint

protected Object _constraint

_fromActivity

protected Object _fromActivity

_toActivity

protected Object _toActivity
Constructor Detail

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.
Method Detail

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