Package dk.gtz.graphedit.internal
Class DemoSyntaxFactory
java.lang.Object
dk.gtz.graphedit.internal.DemoSyntaxFactory
- All Implemented Interfaces:
ISyntaxFactory
Syntax factory implementation for the default basic demonstration syntax
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavafx.scene.NodecreateEdgeView(String bufferKey, UUID edgeKey, ViewModelEdge edgeValue, ViewModelGraph graph, javafx.scene.transform.Affine viewportTransform) Create a new javafx edge representationcreateEdgeViewModel(UUID edgeKey, ModelEdge edgeValue) Create a new viewmodel edge representationjavafx.scene.NodecreateVertexView(String bufferKey, UUID vertexKey, ViewModelVertex vertexValue, ViewModelGraph graph, javafx.scene.transform.Affine viewportTransform) Create a new javafx vertex representationcreateVertexViewModel(UUID vertexKey, ModelVertex vertexValue) Create a new viewmodel vertex representationGet a list of names that this syntax has been previously known as.Get the associated syntax version migrater.Get the long-form description of the syntax.Get the name of the syntax that this factory generates.
-
Constructor Details
-
DemoSyntaxFactory
public DemoSyntaxFactory()Constructs a new instance of the demo syntaxfactory
-
-
Method Details
-
getSyntaxName
Description copied from interface:ISyntaxFactoryGet the name of the syntax that this factory generates.- Specified by:
getSyntaxNamein interfaceISyntaxFactory- Returns:
- The name-string of the syntax
-
getLegacyNames
Description copied from interface:ISyntaxFactoryGet a list of names that this syntax has been previously known as. This is useful if you want to rename your syntax because of name clashes.- Specified by:
getLegacyNamesin interfaceISyntaxFactory- Returns:
- An unmodifiable list of names
-
getSyntaxDescription
Description copied from interface:ISyntaxFactoryGet the long-form description of the syntax.- Specified by:
getSyntaxDescriptionin interfaceISyntaxFactory- Returns:
- A possibly multiline string with a description of the syntax
-
createVertexView
public javafx.scene.Node createVertexView(String bufferKey, UUID vertexKey, ViewModelVertex vertexValue, ViewModelGraph graph, javafx.scene.transform.Affine viewportTransform) Description copied from interface:ISyntaxFactoryCreate a new javafx vertex representation- Specified by:
createVertexViewin interfaceISyntaxFactory- Parameters:
bufferKey- The key of the buffer that contains the graph that contains this viewvertexKey- The primary key of the new vertex representationvertexValue- The viewmodel value of the new vertex representationgraph- The parent syntax graphviewportTransform- The translational, rotational and scale transform of the related viewport- Returns:
- The new vertex javafx representation
-
createEdgeView
public javafx.scene.Node createEdgeView(String bufferKey, UUID edgeKey, ViewModelEdge edgeValue, ViewModelGraph graph, javafx.scene.transform.Affine viewportTransform) Description copied from interface:ISyntaxFactoryCreate a new javafx edge representation- Specified by:
createEdgeViewin interfaceISyntaxFactory- Parameters:
bufferKey- The key of the buffer that contains the graph that contains this viewedgeKey- The primary key of the new edge representationedgeValue- The viewmodel value of the new edge representationgraph- The parent syntax graphviewportTransform- The translational, rotational and scale transform of the related viewport- Returns:
- The new edge javafx representation
-
createVertexViewModel
Description copied from interface:ISyntaxFactoryCreate a new viewmodel vertex representation- Specified by:
createVertexViewModelin interfaceISyntaxFactory- Parameters:
vertexKey- The primary key of the new vertex representationvertexValue- The model vertex to base on- Returns:
- A new instance of a viewmodel vertex representation specific to this syntax.
-
createEdgeViewModel
Description copied from interface:ISyntaxFactoryCreate a new viewmodel edge representation- Specified by:
createEdgeViewModelin interfaceISyntaxFactory- Parameters:
edgeKey- The primary key of the new edge representationedgeValue- The model edge to base on- Returns:
- A new instance of a viewmodel edge representation specific to this syntax.
-
getMigrater
Description copied from interface:ISyntaxFactoryGet the associated syntax version migrater.- Specified by:
getMigraterin interfaceISyntaxFactory- Returns:
- empty if this syntax does not support version migration. Otherwise an instance of the appropriate migrater for this syntax.
-
getSyntaxTools
Description copied from interface:ISyntaxFactory- Specified by:
getSyntaxToolsin interfaceISyntaxFactory- Returns:
- empty if no additional tools are required or available
-