public class IlpNetworkHandlerWithDataSource extends IlpGraphHandlerWithDataSource implements IlpNetworkHandler
IlpMutableDataSource and an
IlpNetworkAdapter are in use.
The handler performs editing operations by accessing the data source. Any changes in the data source are then extended to the network model through the adapter.
The handler also directly communicates with the adapter.
The methods createObjectId, createObject
and others can be overridden in subclasses.
IlpNetworkController.setHandler(ilog.cpl.network.IlpNetworkHandler),
IlpNetworkAdapter,
IlpDataSourceLINK_FROM_NODE, LINK_FROM_PORT, LINK_TO_NODE, LINK_TO_PORT| Constructor and Description |
|---|
IlpNetworkHandlerWithDataSource(IlpMutableNetworkModel model,
IlpNetworkView view,
IlpNetworkController controller,
IlpAbstractNodeAdapter adapter,
IlpMutableDataSource datasource)
Creates the handler.
|
IlpNetworkHandlerWithDataSource(IlpNetwork network)
Creates the handler.
|
IlpNetworkHandlerWithDataSource(IlpNetwork network,
IlpAbstractNodeAdapter adapter,
IlpMutableDataSource datasource)
Creates the handler.
|
| Modifier and Type | Method and Description |
|---|---|
protected IlpDefaultClass |
createDefaultClass()
Returns the graph handler default position attribute class.
|
protected Object |
createObjectId(Class clazz,
IlpAttributeGroup attributes,
Map properties)
Returns an object id for the creation of a new object.
|
protected IlpGraphHandlerWithoutDataSource |
createSimpleHandler()
Instantiates the non-datasource handler (an instance of
IlpNetworkHandlerWithoutDataSource). |
protected String |
getClassName(IlpAttributeGroup attributes)
Returns the class name for objects created by this handler.
|
protected Logger |
getHandlerLogger()
Use the correct logger for either IlpNetworkHandlerWithDataSource
or IlpEquipmentHandlerWithDataSource.
|
IlpNetwork |
getNetwork()
Deprecated.
Please use
getNetworkModel,
getNetworkView,
getNetworkController instead. |
IlpNetworkController |
getNetworkController()
Returns the controller that is associated to this handler
and from which it gets its requests.
|
IlpMutableNetworkModel |
getNetworkModel()
Returns the model that is associated to this handler.
|
IlpNetworkView |
getNetworkView()
Returns the view that is associated to this handler.
|
findIlpClass, getAdapter, getDataSource, getGraphModel, getGraphView, handleChangeRelationship, handleCloneObject, handleCollapseObject, handleCreateObject, handleExpandObject, handleLoad, handleMoveObject, handleRemoveObject, handleUpdateObject, propagatePositionToDataSource, setDataSource, setGraphController, setGraphModel, setGraphView, setPropagatePositionToDataSourcecreateObject, endBatch, getDefaultClass, getGraphController, startBatchclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleChangeRelationship, handleCloneObject, handleCreateObject, handleRemoveObject, handleUpdateObjecthandleMoveObjecthandleCollapseObject, handleExpandObjecthandleLoadpublic IlpNetworkHandlerWithDataSource(IlpNetwork network)
network - The network component.public IlpNetworkHandlerWithDataSource(IlpNetwork network, IlpAbstractNodeAdapter adapter, IlpMutableDataSource datasource)
network - The network component.adapter - The adapter between the data source and the network model,
usually an IlpNetworkAdapter.datasource - The data source.public IlpNetworkHandlerWithDataSource(IlpMutableNetworkModel model, IlpNetworkView view, IlpNetworkController controller, IlpAbstractNodeAdapter adapter, IlpMutableDataSource datasource)
model - The network component model.view - The network component view.controller - The network component controller.adapter - The adapter between the data source and the network model.It is
usually an IlpNetworkAdapter.datasource - The data source.protected Logger getHandlerLogger()
getHandlerLogger in class IlpAbstractGraphHandlerprotected IlpGraphHandlerWithoutDataSource createSimpleHandler()
IlpNetworkHandlerWithoutDataSource).createSimpleHandler in class IlpGraphHandlerWithDataSourceprotected String getClassName(IlpAttributeGroup attributes)
IlpAbstractGraphHandlergetClassName in class IlpAbstractGraphHandlerattributes - The attribute group set in the created representation
objects.IlpAbstractGraphHandler.findIlpClass(Class, IlpAttributeGroup)protected Object createObjectId(Class clazz, IlpAttributeGroup attributes, Map properties)
IlpAbstractGraphHandlerThis 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().
createObjectId in class IlpAbstractGraphHandlerclazz - 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 IlpDefaultClass createDefaultClass()
createDefaultClass in class IlpAbstractGraphHandlerIlpAbstractGraphHandler.getDefaultClass(),
IlpAbstractGraphHandler.createObject(Class, IlpAttributeGroup, Map, Object)@Deprecated public IlpNetwork getNetwork()
getNetworkModel,
getNetworkView,
getNetworkController instead.public IlpMutableNetworkModel getNetworkModel()
public IlpNetworkView getNetworkView()
public IlpNetworkController getNetworkController()
© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.