public abstract class IlvAbstractConstraint extends Object implements IlvConstraint, Serializable
IlvAbstractConstraint
is the superclass of all
IlvConstraint
implementations. It provides a basic framework of
event and property support which can be used by all concrete subclasses.
All constraint events are routed to the Gantt data model where interested
listeners can register. Constraints do not handle listener subscription and
notification directly. Subclasses should always use the fireEvent(ilog.views.gantt.event.ConstraintEvent)
method to fire ConstraintEvent
events so that generated events will
be routed properly.Constructor and Description |
---|
IlvAbstractConstraint()
Creates a new
IlvAbstractConstraint . |
Modifier and Type | Method and Description |
---|---|
protected void |
fireEvent(ConstraintEvent event)
Fires an event from this constraint.
|
protected ConstraintTypeEvent |
fireTypeAboutToChange(IlvConstraintType newType)
Fires a
typeAboutToChange event and returns the event after
dispatching it to all listeners. |
protected void |
fireTypeChanged(IlvConstraintType oldType)
Fires a
typeChanged event. |
protected IlvGanttModel |
getGanttModel()
Returns the data model that is managing this constraint.
|
protected String |
paramString()
Returns a parameter string that represents the state of this constraint.
|
void |
setGanttModelImpl(IlvGanttModel model)
This method is invoked by
IlvGanttModel when the constraint
is added or removed. |
String |
toString()
Returns a string representation of this constraint.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFromActivity, getToActivity, getType, setType
public IlvAbstractConstraint()
IlvAbstractConstraint
.protected IlvGanttModel getGanttModel()
null
if this constraint has not been added to a
data model yet.public void setGanttModelImpl(IlvGanttModel model)
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.
setGanttModelImpl
in interface IlvConstraint
model
- The data model that this constraint has been added to, or
null
if this constraint has been removed from the data model.protected final void fireEvent(ConstraintEvent event)
event
- The constraint event.protected ConstraintTypeEvent fireTypeAboutToChange(IlvConstraintType newType)
typeAboutToChange
event and returns the event after
dispatching it to all listeners.newType
- The new type proposed for the constraint.ConstraintTypeEvent
protected void fireTypeChanged(IlvConstraintType oldType)
typeChanged
event.oldType
- The previous type of the constraint.ConstraintTypeEvent
protected String paramString()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.