Class DefaultDOTVisualizationHelper<N,E>
- java.lang.Object
-
- net.automatalib.visualization.DefaultVisualizationHelper<N,E>
-
- net.automatalib.serialization.dot.DefaultDOTVisualizationHelper<N,E>
-
- All Implemented Interfaces:
DOTVisualizationHelper<N,E>
,VisualizationHelper<N,E>
public class DefaultDOTVisualizationHelper<N,E> extends DefaultVisualizationHelper<N,E> implements DOTVisualizationHelper<N,E>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.automatalib.visualization.VisualizationHelper
VisualizationHelper.CommonAttrs, VisualizationHelper.CommonStyles, VisualizationHelper.EdgeAttrs, VisualizationHelper.EdgeStyles, VisualizationHelper.MTSEdgeAttrs, VisualizationHelper.NodeAttrs, VisualizationHelper.NodeShapes, VisualizationHelper.NodeStyles
-
-
Constructor Summary
Constructors Constructor Description DefaultDOTVisualizationHelper()
DefaultDOTVisualizationHelper(@Nullable VisualizationHelper<N,? super E> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getEdgeProperties(N src, E edge, N tgt, Map<String,String> properties)
Retrieves the properties for rendering a single edge.void
getGlobalEdgeProperties(Map<String,String> properties)
void
getGlobalNodeProperties(Map<String,String> properties)
boolean
getNodeProperties(N node, Map<String,String> properties)
Retrieves the properties for rendering a single node.void
writePostamble(Appendable a)
Called after the node and edge data are written, but before the closing brace.void
writePreamble(Appendable a)
Called before the node and edge data are written, but after the opening "digraph {" statement.-
Methods inherited from class net.automatalib.visualization.DefaultVisualizationHelper
initialNodes
-
-
-
-
Constructor Detail
-
DefaultDOTVisualizationHelper
public DefaultDOTVisualizationHelper()
-
DefaultDOTVisualizationHelper
public DefaultDOTVisualizationHelper(@Nullable VisualizationHelper<N,? super E> delegate)
-
-
Method Detail
-
getGlobalNodeProperties
public void getGlobalNodeProperties(Map<String,String> properties)
- Specified by:
getGlobalNodeProperties
in interfaceVisualizationHelper<N,E>
-
getGlobalEdgeProperties
public void getGlobalEdgeProperties(Map<String,String> properties)
- Specified by:
getGlobalEdgeProperties
in interfaceVisualizationHelper<N,E>
-
getNodeProperties
public boolean getNodeProperties(N node, Map<String,String> properties)
Description copied from interface:VisualizationHelper
Retrieves the properties for rendering a single node. Additionally, the return value allows to control whether to omit this node from rendering. Iffalse
is returned, the node will not be rendered. Consequently, any modifications to the properties map will have no effect.The properties are stored in the
Map
argument. Note that if an implementation of a base class is overridden, it is probably a good idea to callsuper.getNodeProperties(node, properties);
at the beginning of the method.- Specified by:
getNodeProperties
in interfaceVisualizationHelper<N,E>
- Overrides:
getNodeProperties
in classDefaultVisualizationHelper<N,E>
- Parameters:
node
- the node to be renderedproperties
- the property map- Returns:
- whether this node should be rendered
-
getEdgeProperties
public boolean getEdgeProperties(N src, E edge, N tgt, Map<String,String> properties)
Description copied from interface:VisualizationHelper
Retrieves the properties for rendering a single edge. Additionally, the return value allows to control whether to omit this edge from rendering. Iffalse
is returned, the edge will not be rendered. Consequently, any modifications to the properties map will have no effect.The properties are stored in the
Map
argument. Note that if an implementation of a base class is overridden, it is probably a good idea to callsuper.getEdgeProperties(node, properties);
at the beginning of the method.- Specified by:
getEdgeProperties
in interfaceVisualizationHelper<N,E>
- Overrides:
getEdgeProperties
in classDefaultVisualizationHelper<N,E>
edge
- the edge to be renderedproperties
- the property map- Returns:
- whether this edge should be rendered
-
writePreamble
public void writePreamble(Appendable a) throws IOException
Description copied from interface:DOTVisualizationHelper
Called before the node and edge data are written, but after the opening "digraph {" statement.- Specified by:
writePreamble
in interfaceDOTVisualizationHelper<N,E>
- Parameters:
a
- theAppendable
to write to- Throws:
IOException
- if writing toa
throws.
-
writePostamble
public void writePostamble(Appendable a) throws IOException
Description copied from interface:DOTVisualizationHelper
Called after the node and edge data are written, but before the closing brace.- Specified by:
writePostamble
in interfaceDOTVisualizationHelper<N,E>
- Parameters:
a
- theAppendable
to write to- Throws:
IOException
- if writing toa
throws.
-
-