Package dk.gtz.graphedit.spi
Interface ISyntaxFactory
- All Known Implementing Classes:
DemoSyntaxFactory
public interface ISyntaxFactory
Interface class for graph-syntax factories
-
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.
-
Method Details
-
getSyntaxName
String getSyntaxName()Get the name of the syntax that this factory generates.- Returns:
- The name-string of the syntax
-
getLegacyNames
Get 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.- Returns:
- An unmodifiable list of names
-
getSyntaxDescription
String getSyntaxDescription()Get the long-form description of the syntax.- Returns:
- A possibly multiline string with a description of the syntax
-
createVertexView
javafx.scene.Node createVertexView(String bufferKey, UUID vertexKey, ViewModelVertex vertexValue, ViewModelGraph graph, javafx.scene.transform.Affine viewportTransform) Create a new javafx vertex representation- 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
-
createVertexViewModel
Create a new viewmodel vertex representation- 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.
-
createEdgeView
javafx.scene.Node createEdgeView(String bufferKey, UUID edgeKey, ViewModelEdge edgeValue, ViewModelGraph graph, javafx.scene.transform.Affine viewportTransform) Create a new javafx edge representation- 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
-
createEdgeViewModel
Create a new viewmodel edge representation- 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
Optional<ISyntaxMigrater> getMigrater()Get the associated syntax version migrater.- Returns:
- empty if this syntax does not support version migration. Otherwise an instance of the appropriate migrater for this syntax.
-
getSyntaxTools
- Returns:
- empty if no additional tools are required or available
-