public abstract class IlpAbstractGraphHandler extends Object implements IlpGraphHandler
The handler performs editing operations by accessing the representation objects and the model.
IlpGraphController.setGraphHandler(ilog.cpl.graph.IlpGraphHandler)
LINK_FROM_NODE, LINK_FROM_PORT, LINK_TO_NODE, LINK_TO_PORT
Modifier | Constructor and Description |
---|---|
protected |
IlpAbstractGraphHandler(IlpGraphController contr)
Creates the handler.
|
Modifier and Type | Method and Description |
---|---|
protected abstract IlpDefaultClass |
createDefaultClass()
Returns the graph handler default position attribute class.
|
protected IlpObject |
createObject(Class<?> clazz,
IlpAttributeGroup attributes,
Map<String,Object> properties,
Object id)
Returns a new object corresponding to an object id returned
by
createObjectId . |
protected abstract Object |
createObjectId(Class<?> clazz,
IlpAttributeGroup attributes,
Map<String,Object> properties)
Returns an object id for the creation of a new object.
|
protected void |
endBatch()
Terminates a batch of modifications in the underlying model.
|
protected IlpClass |
findIlpClass(Class<?> clazz,
IlpAttributeGroup attributes)
Returns an
IlpClass for the creation of a new object. |
protected abstract String |
getClassName(IlpAttributeGroup attributes)
Returns the class name for objects created by this handler.
|
protected IlpClass |
getDefaultClass()
Returns the default business class for the objects created
using this handler.
|
protected IlpGraphController |
getGraphController()
Returns the controller component.
|
protected IlpMutableGraphModel |
getGraphModel()
Returns the model component.
|
protected abstract Logger |
getHandlerLogger()
Returns the logger used to log messages by this handler.
|
protected void |
setGraphController(IlpGraphController controller)
Sets the controller component.
|
protected void |
startBatch()
Start a batch of modifications in the underlying model.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleChangeRelationship, handleCloneObject, handleCreateObject, handleRemoveObject, handleUpdateObject
handleMoveObject
handleCollapseObject, handleExpandObject
handleLoad
protected IlpAbstractGraphHandler(IlpGraphController contr)
contr
- The controller.protected abstract Logger getHandlerLogger()
protected IlpClass getDefaultClass()
protected IlpGraphController getGraphController()
protected void setGraphController(IlpGraphController controller)
protected IlpMutableGraphModel getGraphModel()
protected void startBatch()
protected void endBatch()
protected abstract Object createObjectId(Class<?> clazz, IlpAttributeGroup attributes, Map<String,Object> properties)
This method should be overridden in subclasses. The default implementation returns a String.
Note that object identifiers are subject to some constraints; for
details, see IlpObject.getIdentifier()
.
clazz
- An implementation 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
.protected IlpObject createObject(Class<?> clazz, IlpAttributeGroup attributes, Map<String,Object> properties, Object id)
createObjectId
.
This method should be overridden in subclasses. The default
implementation returns the id itself, assuming it is an
IlpObject
.
clazz
- An implementation 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
.id
- The object identifier to use for object creation.IlpObject>
.protected IlpClass findIlpClass(Class<?> clazz, IlpAttributeGroup attributes)
IlpClass
for the creation of a new object.
This method should be overridden in subclasses. The default
implementation uses an IlpDefaultClassManager
to return
an IlpClass
containing the given attributes.
clazz
- An implementation of IlpRepresentationNode
.attributes
- A set of attributes for the object to be created,
or null
.createObject(Class, IlpAttributeGroup, Map, Object)
protected abstract IlpDefaultClass createDefaultClass()
protected abstract String getClassName(IlpAttributeGroup attributes)
attributes
- The attribute group set in the created representation
objects.findIlpClass(Class, IlpAttributeGroup)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.