public class IlpEquipmentHandlerWithDataSource extends IlpGraphHandlerWithDataSource implements IlpEquipmentHandler
IlpMutableDataSource
and an
IlpEquipmentAdapter
are in use.
The handler performs editing operations by accessing the data source. Any changes in the data source are then propagated to the equipment model through the adapter.
The handler also communicates directly with the adapter.
The methods createObjectId
, createObject
and others can be overridden in subclasses.
IlpEquipmentController.setHandler(ilog.cpl.equipment.IlpEquipmentHandler)
,
IlpEquipmentAdapter
,
IlpDataSource
LINK_FROM_NODE, LINK_FROM_PORT, LINK_TO_NODE, LINK_TO_PORT
Constructor and Description |
---|
IlpEquipmentHandlerWithDataSource(IlpEquipment equipment,
IlpAbstractNodeAdapter adapter,
IlpMutableDataSource datasource)
Creates the handler.
|
IlpEquipmentHandlerWithDataSource(IlpMutableEquipmentModel model,
IlpEquipmentView view,
IlpEquipmentController controller,
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
IlpEquipmentHandlerWithoutDataSource ). |
protected String |
getClassName(IlpAttributeGroup attributes)
Returns the class name for objects created by this handler.
|
IlpEquipmentController |
getEquipmentController()
Returns the controller with which this handler is associated
and from which it gets its requests.
|
IlpMutableEquipmentModel |
getEquipmentModel()
Returns the model with which this handler is associated.
|
IlpEquipmentView |
getEquipmentView()
Returns the view with which this handler is associated.
|
protected Logger |
getHandlerLogger()
Returns the logger used to log messages by this handler.
|
findIlpClass, getAdapter, getDataSource, getGraphModel, getGraphView, handleChangeRelationship, handleCloneObject, handleCollapseObject, handleCreateObject, handleExpandObject, handleLoad, handleMoveObject, handleRemoveObject, handleUpdateObject, propagatePositionToDataSource, setDataSource, setGraphController, setGraphModel, setGraphView, setPropagatePositionToDataSource
createObject, endBatch, getDefaultClass, getGraphController, startBatch
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleChangeRelationship, handleCloneObject, handleCreateObject, handleRemoveObject, handleUpdateObject
handleMoveObject
handleCollapseObject, handleExpandObject
handleLoad
public IlpEquipmentHandlerWithDataSource(IlpEquipment equipment, IlpAbstractNodeAdapter adapter, IlpMutableDataSource datasource)
equipment
- The Equipment component.adapter
- The adapter between the data source and the
equipment's model, usually an
IlpEquipmentAdapter
.datasource
- The data source.public IlpEquipmentHandlerWithDataSource(IlpMutableEquipmentModel model, IlpEquipmentView view, IlpEquipmentController controller, IlpAbstractNodeAdapter adapter, IlpMutableDataSource datasource)
model
- The Equipment component's model.view
- The Equipment component's view.controller
- The Equipment component's controller.adapter
- The adapter between the data source and the
equipment's model, usually an
IlpEquipmentAdapter
.datasource
- The data source.protected Logger getHandlerLogger()
IlpAbstractGraphHandler
getHandlerLogger
in class IlpAbstractGraphHandler
protected IlpGraphHandlerWithoutDataSource createSimpleHandler()
IlpEquipmentHandlerWithoutDataSource
).createSimpleHandler
in class IlpGraphHandlerWithDataSource
protected String getClassName(IlpAttributeGroup attributes)
IlpAbstractGraphHandler
getClassName
in class IlpAbstractGraphHandler
attributes
- The attribute group set in the created representation
objects.IlpAbstractGraphHandler.findIlpClass(Class, IlpAttributeGroup)
protected Object createObjectId(Class clazz, IlpAttributeGroup attributes, Map properties)
IlpAbstractGraphHandler
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()
.
createObjectId
in class IlpAbstractGraphHandler
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 IlpDefaultClass createDefaultClass()
IlpAbstractGraphHandler
public IlpMutableEquipmentModel getEquipmentModel()
public IlpEquipmentView getEquipmentView()
public IlpEquipmentController getEquipmentController()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.