G
- The graph type this formatter is forpublic abstract class AbstractGraphFormatter<G extends AbstractGraph<?,?,?>>
extends java.lang.Object
Constructor and Description |
---|
AbstractGraphFormatter() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
createFormattedRepresentation(AbstractGraph<?,?,?> graph,
boolean includeWeights,
boolean useShortLabels,
boolean plotLoops)
Creates a formatted representation of the given graph.
|
static void |
formatDecorations(java.lang.StringBuilder builder,
AbstractVertex<?,?,?> vertex)
Utility function to format the decorations attached to a vertex.
|
protected abstract java.lang.String |
formatGraph(G graph,
boolean includeWeights,
boolean useShortLabels,
boolean plotLoops)
This method encapsulates the concrete graph formatting.
|
abstract java.lang.String |
getDefaultFileName()
Returns the default file name suggested by this formatter.
|
static java.lang.String |
getDotRepresentation(Color color)
Returns the dot (graphviz) representation of the given color.
|
public java.lang.String createFormattedRepresentation(AbstractGraph<?,?,?> graph, boolean includeWeights, boolean useShortLabels, boolean plotLoops)
graph
- The graph to formatincludeWeights
- Determines whether to include weights or not.useShortLabels
- Determines whether to use short labels or not.plotLoops
- Determines whether to plot loops or not.protected abstract java.lang.String formatGraph(G graph, boolean includeWeights, boolean useShortLabels, boolean plotLoops)
graph
- The input graph to formatincludeWeights
- Determines whether to include weights or not.useShortLabels
- Determines whether to use short labels or not.plotLoops
- Determines whether to plot loops or not.public static void formatDecorations(java.lang.StringBuilder builder, AbstractVertex<?,?,?> vertex)
builder
- The builder to send the output tovertex
- The vertex to work withpublic abstract java.lang.String getDefaultFileName()
public static java.lang.String getDotRepresentation(Color color)
color
- The color to convertCopyright 2017 Kieker Project, http://kieker-monitoring.net