ilog.views.gantt.event
Class ActivityNameEvent
java.lang.Object
java.util.EventObject
ilog.views.gantt.util.event.IlvPropertyEvent
ilog.views.gantt.event.ActivityPropertyEvent
ilog.views.gantt.event.ActivityNameEvent
- All Implemented Interfaces:
- ActivityEvent, Serializable
public class ActivityNameEvent
- extends ActivityPropertyEvent
ActivityNameEvent is fired by an IlvActivity both
before and after its name is modified. Immediately before its name is
modified, an IlvActivity fires an aboutToChange
ActivityNameEvent in all listeners registered with the Gantt
data model.
Listeners can modify or constrain the proposed name by invoking
setNewName().
Alternatively, a listener can veto the proposed change by invoking
veto().
After its name is modified, an IlvActivity will fire a
changed ActivityNameEvent in all listeners registered
with the Gantt data model. Listeners can access the old and new values of the
activity's name, but cannot modify them via the event mechanism.
- See Also:
IlvActivity,
IlvGanttModel.addActivityListener(ilog.views.gantt.event.ActivityListener),
Serialized Form
|
Constructor Summary |
ActivityNameEvent(IlvActivity activity,
String oldName,
String newName,
boolean aboutToChangeEvent)
Constructs a new ActivityNameEvent generated
by the specified activity and with the specified old and new
name values. |
ActivityNameEvent
public ActivityNameEvent(IlvActivity activity,
String oldName,
String newName,
boolean aboutToChangeEvent)
- Constructs a new
ActivityNameEvent generated
by the specified activity and with the specified old and new
name values.
- Parameters:
activity - the activity where the event originatedoldName - the activity's previous namenewName - the activity's new nameaboutToChangeEvent - true if this is an
activityNameAboutToChange event or false if this
is an activityNameChanged event.
getOldName
public String getOldName()
- Returns the activity's old name. If this is a
activityNameAboutToChange event, then this will be the
same as the activity's current name since the change has not actually
occurred yet. If this is a activityNameChanged event, this
will be the activity's name prior to the current modification being
reported.
- Returns:
- The
String representing the activity's old name.
getNewName
public String getNewName()
- Returns the activity's new name. If this is a
activityNameAboutToChange event, then this is will be
the activity's proposed value. If this is a
activityNameChanged
event, this will be the activity's new name which is being reported.
- Returns:
- The
String representing the activity's new name.
setNewName
public void setNewName(String name)
- Sets the activity's proposed new name. This method only has meaning if this
is a
activityNameAboutToChange event. By using this method, a
listener can constrain changes to the activity's name.
- Parameters:
name - the activity's name
Copyright © 1996-2007 ILOG S.A. All rights reserved. Documentation homepage.