ilog.views.gantt.model.general
Class ConstraintUserPropertyEvent
java.lang.Object
java.util.EventObject
ilog.views.gantt.util.event.IlvPropertyEvent
ilog.views.gantt.event.ConstraintPropertyEvent
ilog.views.gantt.model.general.ConstraintUserPropertyEvent
- All Implemented Interfaces:
- ConstraintEvent, Serializable
public class ConstraintUserPropertyEvent
- extends ConstraintPropertyEvent
ConstraintUserPropertyEvent is fired by an
IlvGeneralConstraint both before and after a
user-defined property is modified.
Immediately before a property is modified, an
IlvGeneralConstraint fires an aboutToChange
ConstraintUserPropertyEvent to all
listeners
registered with the Gantt data model.
Listeners can modify or constrain the proposed property change by calling
setNewValue(java.lang.Object). Alternatively, a listener can veto the proposed change
by calling IlvPropertyEvent.veto(). If the property change is not vetoed, then
IlvGeneralConstraint will apply the change and fire a
changed ConstraintUserPropertyEvent to all listeners
registered with the Gantt data model.
- Since:
- JViews 5.5
- See Also:
- Serialized Form
ConstraintUserPropertyEvent
public ConstraintUserPropertyEvent(IlvConstraint constraint,
String property,
Object oldValue,
Object newValue,
boolean aboutToChangeEvent)
- Creates a new
ConstraintUserPropertyEvent generated by the
specified constraint.
- Parameters:
constraint - The constraint where the event originated.property - The name of the property.oldValue - The property's previous value.newValue - The property's new value.aboutToChangeEvent - true if this is a property
aboutToChange event or false if this is a property
changed event.
getPropertyName
public String getPropertyName()
- Returns the name of the property that has been modified.
getOldValue
public final Object getOldValue()
- Returns the old value of the property. If this is a property
aboutToChange event, this will be the same as the current value
of the property since the change has not actually occurred yet. If this is
a property changed event, this will be the property value prior
to the current modification being reported.
- Overrides:
getOldValue in class IlvPropertyEvent
getNewValue
public Object getNewValue()
- Returns the new value of the property. If this is a property
aboutToChange event, this will be the proposed value of the
property. If this is a property changed event, this will be the
new value of the property which is being reported.
- Overrides:
getNewValue in class IlvPropertyEvent
setNewValue
public void setNewValue(Object newValue)
- Sets the proposed new value of the property. This method has meaning
only if this is a property aboutToChange event.
- Overrides:
setNewValue in class IlvPropertyEvent
- Parameters:
newValue - The new value of the property.
Copyright © 1996-2007 ILOG S.A. All rights reserved. Documentation homepage.