ilog.cpl.graph
Class IlpGraphHandlerWithoutDataSource

java.lang.Object
  extended by ilog.cpl.graph.IlpAbstractGraphHandler
      extended by ilog.cpl.graph.IlpGraphHandlerWithoutDataSource
All Implemented Interfaces:
IlpExpansionHandler, IlpGraphHandler, IlpLoadHandler, IlpNodeHandler, IlpPositionHandler
Direct Known Subclasses:
IlpEquipmentHandlerWithoutDataSource, IlpNetworkHandlerWithoutDataSource

public abstract class IlpGraphHandlerWithoutDataSource
extends IlpAbstractGraphHandler

This class is the preferred handler for the graph controller when IlpDataSource is not used.

The handler performs editing operations by accessing the representation objects and the model.

Since:
JTGO 4.0
See Also:
IlpGraphController.setGraphHandler(ilog.cpl.graph.IlpGraphHandler)

Field Summary
 
Fields inherited from interface ilog.cpl.graph.IlpNodeHandler
LINK_FROM_NODE, LINK_FROM_PORT, LINK_TO_NODE, LINK_TO_PORT
 
Constructor Summary
protected IlpGraphHandlerWithoutDataSource(IlpGraphController controller, JComponent component)
          Creates the handler.
 
Method Summary
 void handleChangeRelationship(IlpRepresentationObject object, IlpRepresentationObject parent, IlpPosition position)
          Requests the change of relationship in an object.
 void handleCloneObject(Collection objects)
          Requests the creation of a set of copied objects.
 void handleCollapseObject(IlpRepresentationObject object)
          Requests the collapse of a container object.
 Object handleCreateObject(Class clazz, IlpAttributeGroup attributes, Map properties, IlpPosition position)
          Creates an object in the model.
 void handleExpandObject(IlpRepresentationObject object)
          Requests the expansion of a container object.
 void handleLoad(URL networkDescription)
          Erases the model and loads a set of objects, given as a URL, into the model.
 void handleMoveObject(Map newPositions)
          Requests a change to the position or shape of a set of representation objects.
 void handleRemoveObject(Collection objects)
          Deletes a set of objects from the model.
 void handleUpdateObject(IlpRepresentationObject object, Map newValues)
          Requests a change to some of the properties of an object.
 
Methods inherited from class ilog.cpl.graph.IlpAbstractGraphHandler
createDefaultClass, createObject, createObjectId, endBatch, findIlpClass, getClassName, getDefaultClass, getGraphController, getGraphModel, getHandlerLogger, setGraphController, startBatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlpGraphHandlerWithoutDataSource

protected IlpGraphHandlerWithoutDataSource(IlpGraphController controller,
                                           JComponent component)
Creates the handler.

Parameters:
controller - The controller.
component - The component where the controller is attached to.
Method Detail

handleCreateObject

public Object handleCreateObject(Class clazz,
                                 IlpAttributeGroup attributes,
                                 Map properties,
                                 IlpPosition position)
Creates an object in the model.

Parameters:
clazz - A subclass of IlpRepresentationNode.
attributes - A set of attributes for the object to be created, or null.
properties - A set of hints for the object to be created, or null.
position - The desired position/shape of the object, or null.
Returns:
Identifier of the object that has just been created

handleRemoveObject

public void handleRemoveObject(Collection objects)
Deletes a set of objects from the model.

Parameters:
objects - A collection of IlpRepresentationObjects.

handleUpdateObject

public void handleUpdateObject(IlpRepresentationObject object,
                               Map newValues)
Requests a change to some of the properties of an object.

Parameters:
object - The representation object.
newValues - A map, mapping each IlpAttribute to be changed to its new values.

handleCloneObject

public void handleCloneObject(Collection objects)
Requests the creation of a set of copied objects.

Parameters:
objects - A collection of IlpRepresentationObjects.

handleChangeRelationship

public void handleChangeRelationship(IlpRepresentationObject object,
                                     IlpRepresentationObject parent,
                                     IlpPosition position)
Requests the change of relationship in an object.

Parameters:
object - The representation object.
parent - The new parent of the object; null implies a root object.
position - The position of the object.
See Also:
IlpNodeHandler.handleChangeRelationship(ilog.cpl.model.IlpRepresentationObject, ilog.cpl.model.IlpRepresentationObject, ilog.cpl.graphic.IlpPosition)

handleMoveObject

public void handleMoveObject(Map newPositions)
Requests a change to the position or shape of a set of representation objects.

Parameters:
newPositions - A map, from IlpRepresentationObject to IlpPositionChange.

handleExpandObject

public void handleExpandObject(IlpRepresentationObject object)
Requests the expansion of a container object.

Parameters:
object - The container to be expanded.

handleCollapseObject

public void handleCollapseObject(IlpRepresentationObject object)
Requests the collapse of a container object.

Parameters:
object - The container to be collapsed.

handleLoad

public void handleLoad(URL networkDescription)
Erases the model and loads a set of objects, given as a URL, into the model. The format of the network description depends on the handler implementation.

Parameters:
networkDescription - The URL that gives access to the model description. Its format depends on the handler implementation.


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