Class AdaptedAreaFactory.AdaptedAreaImpl<R extends Model,O,M extends Model,E extends java.lang.Enum<E>>
- java.lang.Object
-
- net.officefloor.gef.editor.internal.models.AbstractAdaptedFactory.AbstractAdaptedModel<R,O,M,E,A,F>
-
- net.officefloor.gef.editor.internal.models.AbstractAdaptedConnectableFactory.AbstractAdaptedConnectable<R,O,M,E,AdaptedArea<M>,AdaptedAreaFactory<R,O,M,E>>
-
- net.officefloor.gef.editor.internal.models.AdaptedAreaFactory.AdaptedAreaImpl<R,O,M,E>
-
- All Implemented Interfaces:
AdaptedArea<M>
,AdaptedConnectable<M>
,AdaptedConnector<M>
,AdaptedModel<M>
,ModelActionContext<R,O,M>
- Enclosing class:
- AdaptedAreaFactory<R extends Model,O,M extends Model,E extends java.lang.Enum<E>>
public static class AdaptedAreaFactory.AdaptedAreaImpl<R extends Model,O,M extends Model,E extends java.lang.Enum<E>> extends AbstractAdaptedConnectableFactory.AbstractAdaptedConnectable<R,O,M,E,AdaptedArea<M>,AdaptedAreaFactory<R,O,M,E>> implements AdaptedArea<M>, AdaptedConnector<M>
AdaptedArea
implementation.
-
-
Constructor Summary
Constructors Constructor Description AdaptedAreaImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AdaptedConnector<M>
createAdaptedConnector(java.lang.Class<? extends ConnectionModel> connectionClass, AdaptedConnectorRole role, ModelToConnection<R,O,M,E,?> connector)
Allows overriding theAdaptedConnector
.AdaptedConnector<M>
getAdaptedConnector(java.lang.Class<? extends ConnectionModel> connectionClass, AdaptedConnectorRole type)
Obtains theAdaptedConnectorImpl
.<T> T
getAdapter(java.lang.Class<T> classKey)
Obtains the adapter.AdaptedConnectorRole
getAssociationRole()
Obtains the role of thisAdaptedConnector
.java.lang.Class<? extends ConnectionModel>
getConnectionModelClass()
Obtains theConnectionModel
Class
.org.eclipse.gef.geometry.planar.Dimension
getDimension()
Obtains theDimension
.org.eclipse.gef.geometry.planar.Dimension
getMinimumDimension()
Obtains the minimumDimension
for theAdaptedArea
.AdaptedConnectable<M>
getParentAdaptedConnectable()
Obtains the parentAdaptedConnectable
.ParentToAreaConnectionModel
getParentConnection()
Obtains theParentToAreaConnectionModel
.protected void
init()
Initialises thisAdaptedModel
.boolean
isAssociationCreateConnection()
Indicates if able to create anAdaptedConnection
from the association ofAdaptedConnector
instances.protected void
loadDescendantConnections(java.util.List<AdaptedConnection<?>> connections)
Loads the descendantAdaptedConnection
instances.void
setAssociation(java.util.List<AdaptedConnector<M>> associatedAdaptedConnectors, AdaptedConnectorRole associatedRole)
Specifies the associatedAdaptedConnector
instances.void
setDimension(org.eclipse.gef.geometry.planar.Dimension dimension)
Specifies theDimension
.-
Methods inherited from class net.officefloor.gef.editor.internal.models.AbstractAdaptedConnectableFactory.AbstractAdaptedConnectable
action, createConnection, getAdaptedConnectors, getAdaptedModel, getConnections, getDragLatency, getPotentialConnection, getSelectOnly, getStylesheet, getStylesheetUrl, overlay
-
Methods inherited from class net.officefloor.gef.editor.internal.models.AbstractAdaptedFactory.AbstractAdaptedModel
getChangeExecutor, getErrorHandler, getFactory, getInjector, getModel, getOperations, getParent, getRootModel, position, refreshContent, registerEventListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.officefloor.gef.editor.AdaptedConnectable
action, createConnection, getAdaptedConnectors, getConnections, getDragLatency, getErrorHandler, getPotentialConnection, getSelectOnly, getStylesheet, getStylesheetUrl
-
Methods inherited from interface net.officefloor.gef.editor.AdaptedModel
getModel, getParent
-
Methods inherited from interface net.officefloor.gef.editor.ModelActionContext
getChangeExecutor, getInjector, getModel, getOperations, getRootModel, position
-
-
-
-
Method Detail
-
init
protected void init()
Description copied from class:AbstractAdaptedFactory.AbstractAdaptedModel
Initialises thisAdaptedModel
.
-
getAdapter
public <T> T getAdapter(java.lang.Class<T> classKey)
Description copied from interface:AdaptedArea
Obtains the adapter.- Specified by:
getAdapter
in interfaceAdaptedArea<R extends Model>
- Type Parameters:
T
- Adapted type.- Parameters:
classKey
-Class
key.- Returns:
- Adapter or
null
if no adapter available.
-
getAdaptedConnector
public AdaptedConnector<M> getAdaptedConnector(java.lang.Class<? extends ConnectionModel> connectionClass, AdaptedConnectorRole type)
Description copied from interface:AdaptedConnectable
Obtains theAdaptedConnectorImpl
.- Specified by:
getAdaptedConnector
in interfaceAdaptedConnectable<R extends Model>
- Overrides:
getAdaptedConnector
in classAbstractAdaptedConnectableFactory.AbstractAdaptedConnectable<R extends Model,O,M extends Model,E extends java.lang.Enum<E>,AdaptedArea<M extends Model>,AdaptedAreaFactory<R extends Model,O,M extends Model,E extends java.lang.Enum<E>>>
- Parameters:
connectionClass
-ConnectionModel
Class
.type
-AdaptedConnectorRole
.- Returns:
AdaptedConnectorImpl
.
-
getMinimumDimension
public org.eclipse.gef.geometry.planar.Dimension getMinimumDimension()
Description copied from interface:AdaptedArea
Obtains the minimumDimension
for theAdaptedArea
.- Specified by:
getMinimumDimension
in interfaceAdaptedArea<R extends Model>
- Returns:
- Minimum
Dimension
for theAdaptedArea
.
-
getDimension
public org.eclipse.gef.geometry.planar.Dimension getDimension()
Description copied from interface:AdaptedArea
Obtains theDimension
.- Specified by:
getDimension
in interfaceAdaptedArea<R extends Model>
- Returns:
Dimension
.
-
setDimension
public void setDimension(org.eclipse.gef.geometry.planar.Dimension dimension)
Description copied from interface:AdaptedArea
Specifies theDimension
.- Specified by:
setDimension
in interfaceAdaptedArea<R extends Model>
- Parameters:
dimension
-Dimension
.
-
createAdaptedConnector
protected AdaptedConnector<M> createAdaptedConnector(java.lang.Class<? extends ConnectionModel> connectionClass, AdaptedConnectorRole role, ModelToConnection<R,O,M,E,?> connector)
Description copied from class:AbstractAdaptedConnectableFactory.AbstractAdaptedConnectable
Allows overriding theAdaptedConnector
.- Overrides:
createAdaptedConnector
in classAbstractAdaptedConnectableFactory.AbstractAdaptedConnectable<R extends Model,O,M extends Model,E extends java.lang.Enum<E>,AdaptedArea<M extends Model>,AdaptedAreaFactory<R extends Model,O,M extends Model,E extends java.lang.Enum<E>>>
- Parameters:
connectionClass
-ConnectionModel
Class
.role
-AdaptedConnectorRole
.connector
-ModelToConnection
.- Returns:
AdaptedConnector
.
-
getParentConnection
public ParentToAreaConnectionModel getParentConnection()
Description copied from interface:AdaptedArea
Obtains theParentToAreaConnectionModel
.- Specified by:
getParentConnection
in interfaceAdaptedArea<R extends Model>
- Returns:
ParentToAreaConnectionModel
.
-
loadDescendantConnections
protected void loadDescendantConnections(java.util.List<AdaptedConnection<?>> connections)
Description copied from class:AbstractAdaptedConnectableFactory.AbstractAdaptedConnectable
Loads the descendantAdaptedConnection
instances.- Specified by:
loadDescendantConnections
in classAbstractAdaptedConnectableFactory.AbstractAdaptedConnectable<R extends Model,O,M extends Model,E extends java.lang.Enum<E>,AdaptedArea<M extends Model>,AdaptedAreaFactory<R extends Model,O,M extends Model,E extends java.lang.Enum<E>>>
- Parameters:
connections
- List to add theAdaptedConnection
instances.
-
getParentAdaptedConnectable
public AdaptedConnectable<M> getParentAdaptedConnectable()
Description copied from interface:AdaptedConnector
Obtains the parentAdaptedConnectable
.- Specified by:
getParentAdaptedConnectable
in interfaceAdaptedConnector<R extends Model>
- Returns:
- Parent
AdaptedConnectable
.
-
getConnectionModelClass
public java.lang.Class<? extends ConnectionModel> getConnectionModelClass()
Description copied from interface:AdaptedConnector
Obtains theConnectionModel
Class
.- Specified by:
getConnectionModelClass
in interfaceAdaptedConnector<R extends Model>
- Returns:
ConnectionModel
Class
.
-
setAssociation
public void setAssociation(java.util.List<AdaptedConnector<M>> associatedAdaptedConnectors, AdaptedConnectorRole associatedRole)
Description copied from interface:AdaptedConnector
Specifies the associated
AdaptedConnector
instances.Visually multiple
AdaptedConnectionPart
instances may be connected via the singleAdaptedConnectorPart
Node
.- Specified by:
setAssociation
in interfaceAdaptedConnector<R extends Model>
- Parameters:
associatedAdaptedConnectors
- AssociatedAdaptedConnector
instances.associatedRole
-AdaptedConnectorRole
.
-
isAssociationCreateConnection
public boolean isAssociationCreateConnection()
Description copied from interface:AdaptedConnector
Indicates if able to create anAdaptedConnection
from the association ofAdaptedConnector
instances.- Specified by:
isAssociationCreateConnection
in interfaceAdaptedConnector<R extends Model>
- Returns:
true
if able to createAdaptedConnection
.
-
getAssociationRole
public AdaptedConnectorRole getAssociationRole()
Description copied from interface:AdaptedConnector
Obtains the role of thisAdaptedConnector
.- Specified by:
getAssociationRole
in interfaceAdaptedConnector<R extends Model>
- Returns:
AdaptedConnectorRole
. May benull
to indicate fills all roles.
-
-