Class AbstractAdaptedConnectableFactory.AbstractAdaptedConnectable<R extends Model,O,M extends Model,E extends java.lang.Enum<E>,A extends AdaptedConnectable<M>,F extends AbstractAdaptedConnectableFactory<R,O,M,E,A>>
- 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,A,F>
-
- All Implemented Interfaces:
AdaptedConnectable<M>
,AdaptedModel<M>
,ModelActionContext<R,O,M>
- Direct Known Subclasses:
AdaptedAreaFactory.AdaptedAreaImpl
,AdaptedChildFactory.AdaptedChildImpl
- Enclosing class:
- AbstractAdaptedConnectableFactory<R extends Model,O,M extends Model,E extends java.lang.Enum<E>,A extends AdaptedModel<M>>
protected abstract static class AbstractAdaptedConnectableFactory.AbstractAdaptedConnectable<R extends Model,O,M extends Model,E extends java.lang.Enum<E>,A extends AdaptedConnectable<M>,F extends AbstractAdaptedConnectableFactory<R,O,M,E,A>> extends AbstractAdaptedFactory.AbstractAdaptedModel<R,O,M,E,A,F> implements AdaptedConnectable<M>, ModelActionContext<R,O,M>
AdaptedChild
implementation.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractAdaptedConnectable()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <r extends Model,o>
voidaction(ModelAction<r,o,M> action)
Undertakes theModelAction
.protected AdaptedConnector<M>
createAdaptedConnector(java.lang.Class<? extends ConnectionModel> connectionClass, AdaptedConnectorRole role, ModelToConnection<R,O,M,E,?> connector)
Allows overriding theAdaptedConnector
.<T extends Model>
voidcreateConnection(AdaptedConnectable<T> target, AdaptedConnectorRole sourceRole)
Creates theConnectionModel
within theModel
structure.AdaptedConnector<M>
getAdaptedConnector(java.lang.Class<? extends ConnectionModel> connectionClass, AdaptedConnectorRole type)
Obtains theAdaptedConnectorImpl
.java.util.List<AdaptedConnector<M>>
getAdaptedConnectors()
Obtains theAdaptedConnectorImpl
instances.AdaptedModel<M>
getAdaptedModel()
Obtains theAdaptedModel
.java.util.List<AdaptedConnection<?>>
getConnections()
Obtains theAdaptedConnection
instances of thisAdaptedConnectable
and all itsAdaptedConnectable
instances.int
getDragLatency()
Obtains the the drag latency.<T extends Model>
AdaptedPotentialConnectiongetPotentialConnection(AdaptedConnectable<T> target)
Obtains theAdaptedPotentialConnection
to the target.SelectOnly
getSelectOnly()
Obtains whetherSelectOnly
.javafx.beans.property.Property<java.lang.String>
getStylesheet()
Obtains theProperty
to the style sheet for thisAdaptedConnectable
.javafx.beans.property.ReadOnlyProperty<java.net.URL>
getStylesheetUrl()
Obtains theProperty
to the style sheet URL for this visual of thisAdaptedConnectable
.protected void
init()
Initialises thisAdaptedModel
.protected abstract void
loadDescendantConnections(java.util.List<AdaptedConnection<?>> connections)
Loads the descendantAdaptedConnection
instances.void
overlay(OverlayVisualFactory overlayVisualFactory)
Shows an overlay at the position of the action.-
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
getErrorHandler
-
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
-
createAdaptedConnector
protected AdaptedConnector<M> createAdaptedConnector(java.lang.Class<? extends ConnectionModel> connectionClass, AdaptedConnectorRole role, ModelToConnection<R,O,M,E,?> connector)
Allows overriding theAdaptedConnector
.- Parameters:
connectionClass
-ConnectionModel
Class
.role
-AdaptedConnectorRole
.connector
-ModelToConnection
.- Returns:
AdaptedConnector
.
-
init
protected void init()
Description copied from class:AbstractAdaptedFactory.AbstractAdaptedModel
Initialises thisAdaptedModel
.
-
getConnections
public java.util.List<AdaptedConnection<?>> getConnections()
Description copied from interface:AdaptedConnectable
Obtains theAdaptedConnection
instances of thisAdaptedConnectable
and all itsAdaptedConnectable
instances.- Specified by:
getConnections
in interfaceAdaptedConnectable<R extends Model>
- Returns:
AdaptedConnection
instances.
-
loadDescendantConnections
protected abstract void loadDescendantConnections(java.util.List<AdaptedConnection<?>> connections)
Loads the descendantAdaptedConnection
instances.- Parameters:
connections
- List to add theAdaptedConnection
instances.
-
getStylesheet
public javafx.beans.property.Property<java.lang.String> getStylesheet()
Description copied from interface:AdaptedConnectable
Obtains theProperty
to the style sheet for thisAdaptedConnectable
.- Specified by:
getStylesheet
in interfaceAdaptedConnectable<R extends Model>
- Returns:
Property
to the style sheet for thisAdaptedConnectable
.
-
getStylesheetUrl
public javafx.beans.property.ReadOnlyProperty<java.net.URL> getStylesheetUrl()
Description copied from interface:AdaptedConnectable
Obtains the
Property
to the style sheet URL for this visual of thisAdaptedConnectable
.May be
null
to indicate no specific styling.- Specified by:
getStylesheetUrl
in interfaceAdaptedConnectable<R extends Model>
- Returns:
ReadOnlyProperty
to the style sheetURL
. May benull
.
-
getAdaptedConnectors
public java.util.List<AdaptedConnector<M>> getAdaptedConnectors()
Description copied from interface:AdaptedConnectable
Obtains theAdaptedConnectorImpl
instances.- Specified by:
getAdaptedConnectors
in interfaceAdaptedConnectable<R extends Model>
- Returns:
AdaptedConnectorImpl
instances.
-
getPotentialConnection
public <T extends Model> AdaptedPotentialConnection getPotentialConnection(AdaptedConnectable<T> target)
Description copied from interface:AdaptedConnectable
Obtains theAdaptedPotentialConnection
to the target.- Specified by:
getPotentialConnection
in interfaceAdaptedConnectable<R extends Model>
- Type Parameters:
T
- TargetModel
type.- Parameters:
target
- TargetAdaptedConnectable
,- Returns:
AdaptedPotentialConnection
to the target ornull
if no means to connect to target.
-
createConnection
public <T extends Model> void createConnection(AdaptedConnectable<T> target, AdaptedConnectorRole sourceRole)
Description copied from interface:AdaptedConnectable
Creates theConnectionModel
within theModel
structure.- Specified by:
createConnection
in interfaceAdaptedConnectable<R extends Model>
- Type Parameters:
T
- TargetModel
type.- Parameters:
target
- TargetAdaptedConnectable
.sourceRole
-AdaptedConnectorRole
of the this sourceAdaptedConnectable
.
-
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>
- Parameters:
connectionClass
-ConnectionModel
Class
.type
-AdaptedConnectorRole
.- Returns:
AdaptedConnectorImpl
.
-
getDragLatency
public int getDragLatency()
Description copied from interface:AdaptedConnectable
Obtains the the drag latency.- Specified by:
getDragLatency
in interfaceAdaptedConnectable<R extends Model>
- Returns:
- Drag latency.
-
getSelectOnly
public SelectOnly getSelectOnly()
Description copied from interface:AdaptedConnectable
Obtains whetherSelectOnly
.- Specified by:
getSelectOnly
in interfaceAdaptedConnectable<R extends Model>
- Returns:
SelectOnly
ornull
to allow functionality.
-
getAdaptedModel
public AdaptedModel<M> getAdaptedModel()
Description copied from interface:ModelActionContext
Obtains the
AdaptedModel
.Will only be
null
if action is to create aModel
.- Specified by:
getAdaptedModel
in interfaceModelActionContext<R extends Model,O,M extends Model>
- Returns:
AdaptedModel
ornull
.
-
overlay
public void overlay(OverlayVisualFactory overlayVisualFactory)
Description copied from interface:ModelActionContext
Shows an overlay at the position of the action.- Specified by:
overlay
in interfaceModelActionContext<R extends Model,O,M extends Model>
- Parameters:
overlayVisualFactory
-OverlayVisualFactory
.
-
action
public <r extends Model,o> void action(ModelAction<r,o,M> action)
Description copied from interface:AdaptedConnectable
Undertakes theModelAction
.- Specified by:
action
in interfaceAdaptedConnectable<R extends Model>
- Type Parameters:
r
- RootModel
type.o
- Operations type.- Parameters:
action
-ModelAction
.
-
-