Package net.officefloor.gef.editor
Interface AdaptedModelVisualFactoryContext<M extends Model>
-
- All Superinterfaces:
AdaptedConnectorVisualFactoryContext
- All Known Subinterfaces:
AdaptedChildVisualFactoryContext<M>
- All Known Implementing Classes:
AdaptedChildVisualFactoryContextImpl,AdaptedModelVisualFactoryContextImpl
public interface AdaptedModelVisualFactoryContext<M extends Model> extends AdaptedConnectorVisualFactoryContext
Context for theAdaptedChildVisualFactory.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceAdaptedModelVisualFactoryContext.ConnectorConnector.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <R extends Model,O>
voidaction(ModelAction<R,O,M> action)AllowsModelActioninstances to be actioned via visual.<R extends Model,O>
javafx.scene.Nodeaction(ModelAction<R,O,M> action, AdaptedActionVisualFactory visualFactory)Convenience method to add aModelActionto be actioned viaAdaptedActionVisualFactory.javafx.scene.layout.PaneaddIndent(javafx.scene.layout.HBox parent)Adds an indentPane.<N extends javafx.scene.Node>
NaddNode(javafx.scene.layout.Pane parent, N node)Add theNodeto the parentPanereturning it.<N extends javafx.scene.layout.Region>
AdaptedModelVisualFactoryContext.Connectorconnector(AdaptedConnectorVisualFactory<N> visualFactory, java.lang.Class... connectionModelClasses)javafx.scene.NodecreateImageWithHover(java.lang.Class<?> resourceClass, java.lang.String imageFilePath, java.lang.String hoverImageFilePath)Convenience method to create aNodewithImageand hoverImage.
-
-
-
Method Detail
-
addNode
<N extends javafx.scene.Node> N addNode(javafx.scene.layout.Pane parent, N node)Add the
Nodeto the parentPanereturning it.This allows for convenient adding new
Nodeinstances toPane.- Type Parameters:
N-Nodetype.- Parameters:
parent- ParentPane.node-Node.- Returns:
- Input
Node
-
addIndent
javafx.scene.layout.Pane addIndent(javafx.scene.layout.HBox parent)
Adds an indentPane.- Parameters:
parent- ParentHBox.- Returns:
Panefor the indent.
-
connector
<N extends javafx.scene.layout.Region> AdaptedModelVisualFactoryContext.Connector connector(AdaptedConnectorVisualFactory<N> visualFactory, java.lang.Class... connectionModelClasses)
- Type Parameters:
N-Nodetype.- Parameters:
visualFactory-AdaptedConnectorVisualFactory.connectionModelClasses-ConnectionModelClassinstances that this connector satisfies.- Returns:
AdaptedModelVisualFactoryContext.Connector.- See Also:
DefaultConnectors
-
createImageWithHover
javafx.scene.Node createImageWithHover(java.lang.Class<?> resourceClass, java.lang.String imageFilePath, java.lang.String hoverImageFilePath)Convenience method to create aNodewithImageand hoverImage. Typically this is to create button for the action.- Parameters:
resourceClass-Classwithin the class path containing the images.imageFilePath- Path to theImage.hoverImageFilePath- Path to the hoverImage.- Returns:
Nodefor theImagewith hover.- See Also:
DefaultImages
-
action
<R extends Model,O> void action(ModelAction<R,O,M> action)
Allows
ModelActioninstances to be actioned via visual.This allows custom visuals (e.g. button) tor trigger an action.
- Type Parameters:
R- RootModeltype.O- Operations type.- Parameters:
action-ModelActionto be actioned.
-
action
<R extends Model,O> javafx.scene.Node action(ModelAction<R,O,M> action, AdaptedActionVisualFactory visualFactory)
Convenience method to add aModelActionto be actioned viaAdaptedActionVisualFactory.- Type Parameters:
R- RootModeltype.O- Operations type.- Parameters:
action-ModelActionto be actioned.visualFactory-AdaptedActionVisualFactory.- Returns:
Nodeto trigger theModelAction.
-
-