- java.lang.Object
-
- net.officefloor.gef.editor.internal.models.AdaptedConnectorImpl<R,O,M>
-
- All Implemented Interfaces:
AdaptedConnector<M>
public class AdaptedConnectorImpl<R extends Model,O,M extends Model> extends java.lang.Object implements AdaptedConnector<M>
Adapted connector.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description AdaptedConnectorImpl(AdaptedConnectable<M> parentAdaptedConnectable, java.lang.Class<? extends ConnectionModel> connectionClass, AdaptedConnectorRole role, ModelToConnection<R,O,M,?,? extends ConnectionModel> modelToConnection)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AdaptedConnectorRole
getAssociationRole()
Obtains the role of thisAdaptedConnector
.java.lang.Class<? extends ConnectionModel>
getConnectionModelClass()
Obtains theConnectionModel
Class
.AdaptedConnectable<M>
getParentAdaptedConnectable()
Obtains the parentAdaptedConnectable
.boolean
isAssociationCreateConnection()
Indicates if able to create anAdaptedConnection
from the association ofAdaptedConnector
instances.void
setAssociation(java.util.List<AdaptedConnector<M>> associatedAdaptedConnectors, AdaptedConnectorRole associatedRole)
Specifies the associatedAdaptedConnector
instances.
-
-
-
Constructor Detail
-
AdaptedConnectorImpl
public AdaptedConnectorImpl(AdaptedConnectable<M> parentAdaptedConnectable, java.lang.Class<? extends ConnectionModel> connectionClass, AdaptedConnectorRole role, ModelToConnection<R,O,M,?,? extends ConnectionModel> modelToConnection)
Instantiate.- Parameters:
parentAdaptedConnectable
- ParentAdaptedConnectable
containing thisAdaptedConnectorImpl
.connectionClass
-ConnectionModel
Class
.role
-AdaptedConnectorRole
.modelToConnection
-ModelToConnection
for theConnectionModel
Class
.
-
-
Method Detail
-
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.
-
-