ilog.cpl.graph
Class GraphModelEvent

java.lang.Object
  extended by java.util.EventObject
      extended by ilog.util.IlEventObject
          extended by ilog.cpl.graph.GraphModelEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
EquipmentModelEvent, NetworkModelEvent

public abstract class GraphModelEvent
extends IlEventObject

This class describes a change in an IlpGraphModel.

Since:
JTGO 4.0
See Also:
GraphModelListener, Serialized Form

Nested Class Summary
static class GraphModelEvent.Type
          Event type
 
Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
protected GraphModelEvent(IlpGraphModel source, GraphModelEvent.Type type, Collection objects)
          Creates an event.
protected GraphModelEvent(IlpGraphModel source, GraphModelEvent.Type type, IlpRepresentationObject object)
          Creates an event.
protected GraphModelEvent(IlpGraphModel source, GraphModelEvent.Type type, IlpRepresentationObject link, boolean origin, IlpRepresentationObject oldEnd, IlpRepresentationObject newEnd)
          Creates an event.
protected GraphModelEvent(IlpGraphModel source, GraphModelEvent.Type type, IlpRepresentationObject object, int[] indices, IlpRepresentationObject[] children)
          Creates an event.
 
Method Summary
 IlpRepresentationObject[] getChildren()
          Returns the child objects themselves.
 int[] getIndices()
          Returns the indices of the children (after addition, before removal).
 IlpRepresentationObject getNewEnd()
          Returns the link's new end object.
 IlpRepresentationObject getObject()
          Returns the object the event is about.
 Collection getObjects()
          Returns the objects the event is about.
 IlpRepresentationObject getOldEnd()
          Returns the link's previous end object.
 boolean getOrigin()
          Returns true if the event is about the from end of the link, false if it is about the to end of the link.
 
Methods inherited from class ilog.util.IlEventObject
getType
 
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

GraphModelEvent

protected GraphModelEvent(IlpGraphModel source,
                          GraphModelEvent.Type type,
                          IlpRepresentationObject object)
Creates an event.

Parameters:
source - The model.
type - The event type (add/remove).
object - The object (that has been added/removed).

GraphModelEvent

protected GraphModelEvent(IlpGraphModel source,
                          GraphModelEvent.Type type,
                          Collection objects)
Creates an event.

Parameters:
source - The model.
type - The event type (roots added/removed).
objects - The roots (that have been added/removed).
Since:
JTGO 4.0

GraphModelEvent

protected GraphModelEvent(IlpGraphModel source,
                          GraphModelEvent.Type type,
                          IlpRepresentationObject object,
                          int[] indices,
                          IlpRepresentationObject[] children)
Creates an event.

Parameters:
source - The model.
type - The event type (children added/removed).
object - The parent object.
indices - The indices of the children (where the indices are taken after addition but before removal), in ascending order.
children - The children, in the same order as described in indices.

GraphModelEvent

protected GraphModelEvent(IlpGraphModel source,
                          GraphModelEvent.Type type,
                          IlpRepresentationObject link,
                          boolean origin,
                          IlpRepresentationObject oldEnd,
                          IlpRepresentationObject newEnd)
Creates an event.

Parameters:
source - The model.
type - The event type (link end changed).
link - The link.
origin - If this parameter is true, the from end is changed, otherwise the to end.
oldEnd - The previous link end object.
newEnd - The new link end object.
Method Detail

getObject

public IlpRepresentationObject getObject()
Returns the object the event is about.


getObjects

public Collection getObjects()
Returns the objects the event is about.

Returns:
A Collection of IlpRepresentationObjects
Since:
JTGO 4.0

getIndices

public int[] getIndices()
Returns the indices of the children (after addition, before removal).


getChildren

public IlpRepresentationObject[] getChildren()
Returns the child objects themselves.


getOrigin

public boolean getOrigin()
Returns true if the event is about the from end of the link, false if it is about the to end of the link.


getOldEnd

public IlpRepresentationObject getOldEnd()
Returns the link's previous end object.


getNewEnd

public IlpRepresentationObject getNewEnd()
Returns the link's new end object.



Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.