public class ResourceIDEvent extends ResourcePropertyEvent
ResourceIDEvent is fired by an IlvResource both
before and after its id is modified. Immediately before its id is modified,
an IlvResource fires an aboutToChange
ResourceIDEvent in all listeners registered with the Gantt data
model.
Listeners can modify or constrain the proposed id by invoking
setNewID().
Alternatively, a listener can veto the proposed change by invoking
veto().
After its id is modified, an IlvResource will fire a
changed ResourceIDEvent in all listeners registered
with the Gantt data model. Listeners can access the old and new values of the
resource's id, but cannot modify them via the event mechanism.
source| Constructor and Description |
|---|
ResourceIDEvent(IlvResource resource,
String oldID,
String newID,
boolean aboutToChangeEvent)
Constructs a new
ResourceIDEvent generated
by the specified resource and with the specified old and new
id values. |
| Modifier and Type | Method and Description |
|---|---|
String |
getNewID()
Returns the resource's new id.
|
String |
getOldID()
Returns the resource's old id.
|
void |
setNewID(String id)
Sets the resource's proposed new id.
|
getResourcegetNewValue, getOldValue, isAboutToChangeEvent, isChangedEvent, isVetoed, setNewValue, vetogetSource, toStringpublic ResourceIDEvent(IlvResource resource, String oldID, String newID, boolean aboutToChangeEvent)
ResourceIDEvent generated
by the specified resource and with the specified old and new
id values.resource - the resource where the event originatedoldID - the resource's previous idnewID - the resource's new idaboutToChangeEvent - true if this is a
resourceIDAboutToChange event or false if this
is a resourceIDChanged event.public String getOldID()
resourceIDAboutToChange event, then this will be the
same as the resource's current id since the change has not actually
occurred yet. If this is a resourceIDChanged event, this
will be the resource's id prior to the current modification being
reported.String representing the old id.public String getNewID()
resourceIDAboutToChange event, then this is will be
the resource's proposed value. If this is a resourceIDChanged
event, this will be the resource's new id which is being reported.String representing the new id.public void setNewID(String id)
resourceIDAboutToChange event. By using this method, a
listener can constrain changes to the resource's id.id - the resource's id© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.