ilog.views.gantt.model.general
Class ActivityUserPropertyEvent

java.lang.Object
  extended by java.util.EventObject
      extended by ilog.views.gantt.util.event.IlvPropertyEvent
          extended by ilog.views.gantt.event.ActivityPropertyEvent
              extended by ilog.views.gantt.model.general.ActivityUserPropertyEvent
All Implemented Interfaces:
ActivityEvent, Serializable

public class ActivityUserPropertyEvent
extends ActivityPropertyEvent

ActivityUserPropertyEvent is fired by an IlvGeneralActivity both before and after a user-defined property is modified. Immediately before a property is modified, an IlvGeneralActivity fires an aboutToChange ActivityUserPropertyEvent 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 IlvGeneralActivity will apply the change and fire a changed ActivityUserPropertyEvent to all listeners registered with the Gantt data model.

Since:
JViews 5.5
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ActivityUserPropertyEvent(IlvActivity activity, String property, Object oldValue, Object newValue, boolean aboutToChangeEvent)
          Creates a new ActivityUserPropertyEvent generated by the specified activity.
 
Method Summary
 Object getNewValue()
          Returns the new value of the property.
 Object getOldValue()
          Returns the old value of the property.
 String getPropertyName()
          Returns the name of the property that has been modified.
 void setNewValue(Object newValue)
          Sets the proposed new value of the property.
 
Methods inherited from class ilog.views.gantt.event.ActivityPropertyEvent
getActivity
 
Methods inherited from class ilog.views.gantt.util.event.IlvPropertyEvent
isAboutToChangeEvent, isChangedEvent, isVetoed, veto
 
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
 

Constructor Detail

ActivityUserPropertyEvent

public ActivityUserPropertyEvent(IlvActivity activity,
                                 String property,
                                 Object oldValue,
                                 Object newValue,
                                 boolean aboutToChangeEvent)
Creates a new ActivityUserPropertyEvent generated by the specified activity.

Parameters:
activity - The activity 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.
Method Detail

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 em>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.