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>
AdaptedChildimplementation.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractAdaptedConnectable()
-
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 theConnectionModelwithin theModelstructure.AdaptedConnector<M>getAdaptedConnector(java.lang.Class<? extends ConnectionModel> connectionClass, AdaptedConnectorRole type)Obtains theAdaptedConnectorImpl.java.util.List<AdaptedConnector<M>>getAdaptedConnectors()Obtains theAdaptedConnectorImplinstances.AdaptedModel<M>getAdaptedModel()Obtains theAdaptedModel.java.util.List<AdaptedConnection<?>>getConnections()Obtains theAdaptedConnectioninstances of thisAdaptedConnectableand all itsAdaptedConnectableinstances.intgetDragLatency()Obtains the the drag latency.<T extends Model>
AdaptedPotentialConnectiongetPotentialConnection(AdaptedConnectable<T> target)Obtains theAdaptedPotentialConnectionto the target.SelectOnlygetSelectOnly()Obtains whetherSelectOnly.javafx.beans.property.Property<java.lang.String>getStylesheet()Obtains thePropertyto the style sheet for thisAdaptedConnectable.javafx.beans.property.ReadOnlyProperty<java.net.URL>getStylesheetUrl()Obtains thePropertyto the style sheet URL for this visual of thisAdaptedConnectable.protected voidinit()Initialises thisAdaptedModel.protected abstract voidloadDescendantConnections(java.util.List<AdaptedConnection<?>> connections)Loads the descendantAdaptedConnectioninstances.voidoverlay(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-ConnectionModelClass.role-AdaptedConnectorRole.connector-ModelToConnection.- Returns:
AdaptedConnector.
-
init
protected void init()
Description copied from class:AbstractAdaptedFactory.AbstractAdaptedModelInitialises thisAdaptedModel.
-
getConnections
public java.util.List<AdaptedConnection<?>> getConnections()
Description copied from interface:AdaptedConnectableObtains theAdaptedConnectioninstances of thisAdaptedConnectableand all itsAdaptedConnectableinstances.- Specified by:
getConnectionsin interfaceAdaptedConnectable<R extends Model>- Returns:
AdaptedConnectioninstances.
-
loadDescendantConnections
protected abstract void loadDescendantConnections(java.util.List<AdaptedConnection<?>> connections)
Loads the descendantAdaptedConnectioninstances.- Parameters:
connections- List to add theAdaptedConnectioninstances.
-
getStylesheet
public javafx.beans.property.Property<java.lang.String> getStylesheet()
Description copied from interface:AdaptedConnectableObtains thePropertyto the style sheet for thisAdaptedConnectable.- Specified by:
getStylesheetin interfaceAdaptedConnectable<R extends Model>- Returns:
Propertyto the style sheet for thisAdaptedConnectable.
-
getStylesheetUrl
public javafx.beans.property.ReadOnlyProperty<java.net.URL> getStylesheetUrl()
Description copied from interface:AdaptedConnectableObtains the
Propertyto the style sheet URL for this visual of thisAdaptedConnectable.May be
nullto indicate no specific styling.- Specified by:
getStylesheetUrlin interfaceAdaptedConnectable<R extends Model>- Returns:
ReadOnlyPropertyto the style sheetURL. May benull.
-
getAdaptedConnectors
public java.util.List<AdaptedConnector<M>> getAdaptedConnectors()
Description copied from interface:AdaptedConnectableObtains theAdaptedConnectorImplinstances.- Specified by:
getAdaptedConnectorsin interfaceAdaptedConnectable<R extends Model>- Returns:
AdaptedConnectorImplinstances.
-
getPotentialConnection
public <T extends Model> AdaptedPotentialConnection getPotentialConnection(AdaptedConnectable<T> target)
Description copied from interface:AdaptedConnectableObtains theAdaptedPotentialConnectionto the target.- Specified by:
getPotentialConnectionin interfaceAdaptedConnectable<R extends Model>- Type Parameters:
T- TargetModeltype.- Parameters:
target- TargetAdaptedConnectable,- Returns:
AdaptedPotentialConnectionto the target ornullif no means to connect to target.
-
createConnection
public <T extends Model> void createConnection(AdaptedConnectable<T> target, AdaptedConnectorRole sourceRole)
Description copied from interface:AdaptedConnectableCreates theConnectionModelwithin theModelstructure.- Specified by:
createConnectionin interfaceAdaptedConnectable<R extends Model>- Type Parameters:
T- TargetModeltype.- Parameters:
target- TargetAdaptedConnectable.sourceRole-AdaptedConnectorRoleof the this sourceAdaptedConnectable.
-
getAdaptedConnector
public AdaptedConnector<M> getAdaptedConnector(java.lang.Class<? extends ConnectionModel> connectionClass, AdaptedConnectorRole type)
Description copied from interface:AdaptedConnectableObtains theAdaptedConnectorImpl.- Specified by:
getAdaptedConnectorin interfaceAdaptedConnectable<R extends Model>- Parameters:
connectionClass-ConnectionModelClass.type-AdaptedConnectorRole.- Returns:
AdaptedConnectorImpl.
-
getDragLatency
public int getDragLatency()
Description copied from interface:AdaptedConnectableObtains the the drag latency.- Specified by:
getDragLatencyin interfaceAdaptedConnectable<R extends Model>- Returns:
- Drag latency.
-
getSelectOnly
public SelectOnly getSelectOnly()
Description copied from interface:AdaptedConnectableObtains whetherSelectOnly.- Specified by:
getSelectOnlyin interfaceAdaptedConnectable<R extends Model>- Returns:
SelectOnlyornullto allow functionality.
-
getAdaptedModel
public AdaptedModel<M> getAdaptedModel()
Description copied from interface:ModelActionContextObtains the
AdaptedModel.Will only be
nullif action is to create aModel.- Specified by:
getAdaptedModelin interfaceModelActionContext<R extends Model,O,M extends Model>- Returns:
AdaptedModelornull.
-
overlay
public void overlay(OverlayVisualFactory overlayVisualFactory)
Description copied from interface:ModelActionContextShows an overlay at the position of the action.- Specified by:
overlayin 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:AdaptedConnectableUndertakes theModelAction.- Specified by:
actionin interfaceAdaptedConnectable<R extends Model>- Type Parameters:
r- RootModeltype.o- Operations type.- Parameters:
action-ModelAction.
-
-