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 interface
AdaptedModelVisualFactoryContext.Connector
Connector.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <R extends Model,O>
voidaction(ModelAction<R,O,M> action)
AllowsModelAction
instances to be actioned via visual.<R extends Model,O>
javafx.scene.Nodeaction(ModelAction<R,O,M> action, AdaptedActionVisualFactory visualFactory)
Convenience method to add aModelAction
to be actioned viaAdaptedActionVisualFactory
.javafx.scene.layout.Pane
addIndent(javafx.scene.layout.HBox parent)
Adds an indentPane
.<N extends javafx.scene.Node>
NaddNode(javafx.scene.layout.Pane parent, N node)
Add theNode
to the parentPane
returning it.<N extends javafx.scene.layout.Region>
AdaptedModelVisualFactoryContext.Connectorconnector(AdaptedConnectorVisualFactory<N> visualFactory, java.lang.Class... connectionModelClasses)
javafx.scene.Node
createImageWithHover(java.lang.Class<?> resourceClass, java.lang.String imageFilePath, java.lang.String hoverImageFilePath)
Convenience method to create aNode
withImage
and hoverImage
.
-
-
-
Method Detail
-
addNode
<N extends javafx.scene.Node> N addNode(javafx.scene.layout.Pane parent, N node)
Add the
Node
to the parentPane
returning it.This allows for convenient adding new
Node
instances toPane
.- Type Parameters:
N
-Node
type.- 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:
Pane
for the indent.
-
connector
<N extends javafx.scene.layout.Region> AdaptedModelVisualFactoryContext.Connector connector(AdaptedConnectorVisualFactory<N> visualFactory, java.lang.Class... connectionModelClasses)
- Type Parameters:
N
-Node
type.- Parameters:
visualFactory
-AdaptedConnectorVisualFactory
.connectionModelClasses
-ConnectionModel
Class
instances 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 aNode
withImage
and hoverImage
. Typically this is to create button for the action.- Parameters:
resourceClass
-Class
within the class path containing the images.imageFilePath
- Path to theImage
.hoverImageFilePath
- Path to the hoverImage
.- Returns:
Node
for theImage
with hover.- See Also:
DefaultImages
-
action
<R extends Model,O> void action(ModelAction<R,O,M> action)
Allows
ModelAction
instances to be actioned via visual.This allows custom visuals (e.g. button) tor trigger an action.
- Type Parameters:
R
- RootModel
type.O
- Operations type.- Parameters:
action
-ModelAction
to be actioned.
-
action
<R extends Model,O> javafx.scene.Node action(ModelAction<R,O,M> action, AdaptedActionVisualFactory visualFactory)
Convenience method to add aModelAction
to be actioned viaAdaptedActionVisualFactory
.- Type Parameters:
R
- RootModel
type.O
- Operations type.- Parameters:
action
-ModelAction
to be actioned.visualFactory
-AdaptedActionVisualFactory
.- Returns:
Node
to trigger theModelAction
.
-
-