ilog.views.gantt
Interface IlvConstraint

All Known Implementing Classes:
IlvAbstractConstraint, IlvGeneralConstraint, IlvSimpleConstraint, IlvTableConstraint

public interface IlvConstraint

IlvConstraint defines the abstract behavior of a constraint between two IlvActivity objects. Each constraint is defined by a type, its From activity, and its To activity.

IlvConstraint 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 constraint implementation must have some method of obtaining the model it belongs to. Here is an example of how the IlvConstraint implementation should fire its property change events:

 void fireEvent (ConstraintEvent event) {
   IlvGanttModel model = .....
   if (model != null)
     model.fireConstraintEvent(event);
 }
 


Method Summary
 IlvActivity getFromActivity()
          Returns the source or From activity for this constraint.
 IlvActivity getToActivity()
          Returns the target or To activity for this constraint.
 IlvConstraintType getType()
          Returns the type of this constraint.
 void setGanttModelImpl(IlvGanttModel model)
          This method is invoked by the IlvGanttModel when the constraint is added or removed.
 void setType(IlvConstraintType type)
          Sets the type of this constraint.
 

Method Detail

getType

IlvConstraintType getType()
Returns the type of this constraint.

Returns:
The constraint type.

setType

void setType(IlvConstraintType type)
Sets the type of this constraint.

Parameters:
type - The constraint type.

getFromActivity

IlvActivity getFromActivity()
Returns the source or From activity for this constraint.

Returns:
The source activity.

getToActivity

IlvActivity getToActivity()
Returns the target or To activity for this constraint.

Returns:
The target activity.

setGanttModelImpl

void setGanttModelImpl(IlvGanttModel model)
This method is invoked by the IlvGanttModel when the constraint is added or removed.

Warning: This method is considered to be part of an IlvConstraint's internal implementation and is not a public API. You should only invoke this method directly if you have created your own IlvGanttModel implementation.

Parameters:
model - The data model that this constraint has been added to, or null if this constraint has been removed from the data model.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.