Record Class RenderOptions<L extends Label>
java.lang.Object
java.lang.Record
org.variantsync.diffdetective.variation.diff.render.RenderOptions<L>
- Record Components:
format
- The format specifies if the input to render is a VariationDiff or DiffGraph. Most of the time you want to pickGraphFormat.VARIATION_DIFF
.treeFormat
- The export format for VariationDiff names and metadata. This format may read or write a VariationDiff source.nodeFormat
- The export format for DiffNodes. This format decides how nodes are labeled in the exported graph.edgeFormat
- The export format for edges in VariationDiffs. This format decides how edges are labeled as well as their direction.cleanUpTemporaryFiles
- During rendering, some temporary files might be created. Set this to true if these files should be deleted after rendering.dpi
- The resolution of the produced image. Higher yields a better resolution at the cost of a larger memory footprint.nodesize
- The size, nodes should be printed (in pixels?).edgesize
- The thickness of drawn edge lines.arrowsize
- The size of arrows that are drawn at the end of directed edges.fontsize
- The size of any rendered text.withlabels
- Set this to true if labels of nodes should be printed as text. False will show unlabeled nodes.extraArguments
- Arbitrary extra command-line arguments for the underlying renderer. For example, some formats require additional information. The list should be filled with alternating values for parameter names and their values. All values will be passed as is, separated with spaces to the command line call of the internal renderer.
public record RenderOptions<L extends Label>(GraphFormat format, VariationDiffLabelFormat treeFormat, DiffNodeLabelFormat<? super L extends Label> nodeFormat, EdgeLabelFormat<? super L extends Label> edgeFormat, boolean cleanUpTemporaryFiles, int dpi, int nodesize, double edgesize, int arrowsize, int fontsize, boolean withlabels, List<String> extraArguments)
extends Record
Configuration options to configure rendering of VariationDiffs.
- Author:
- Paul Bittner, Kevin Jedelhauser
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
RenderOptions.Builder<L extends Label>
Builder forRenderOptions
. -
Field Summary
Modifier and TypeFieldDescriptionprivate final int
The field for thearrowsize
record component.private final boolean
The field for thecleanUpTemporaryFiles
record component.private final int
The field for thedpi
record component.private final EdgeLabelFormat<? super L>
The field for theedgeFormat
record component.private final double
The field for theedgesize
record component.The field for theextraArguments
record component.private final int
The field for thefontsize
record component.private final GraphFormat
The field for theformat
record component.private final DiffNodeLabelFormat<? super L>
The field for thenodeFormat
record component.private final int
The field for thenodesize
record component.private final VariationDiffLabelFormat
The field for thetreeFormat
record component.private final boolean
The field for thewithlabels
record component. -
Constructor Summary
ConstructorDescriptionRenderOptions
(GraphFormat format, VariationDiffLabelFormat treeFormat, DiffNodeLabelFormat<? super L> nodeFormat, EdgeLabelFormat<? super L> edgeFormat, boolean cleanUpTemporaryFiles, int dpi, int nodesize, double edgesize, int arrowsize, int fontsize, boolean withlabels, List<String> extraArguments) Creates an instance of aRenderOptions
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thearrowsize
record component.boolean
Returns the value of thecleanUpTemporaryFiles
record component.static <L extends Label>
RenderOptions<L>DEFAULT()
Default options.int
dpi()
Returns the value of thedpi
record component.EdgeLabelFormat<? super L>
Returns the value of theedgeFormat
record component.double
edgesize()
Returns the value of theedgesize
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theextraArguments
record component.int
fontsize()
Returns the value of thefontsize
record component.format()
Returns the value of theformat
record component.final int
hashCode()
Returns a hash code value for this object.DiffNodeLabelFormat<? super L>
Returns the value of thenodeFormat
record component.int
nodesize()
Returns the value of thenodesize
record component.Converts this RenderOptions to options for linegraph export.final String
toString()
Returns a string representation of this record class.Returns the value of thetreeFormat
record component.boolean
Returns the value of thewithlabels
record component.
-
Field Details
-
format
The field for theformat
record component. -
treeFormat
The field for thetreeFormat
record component. -
nodeFormat
The field for thenodeFormat
record component. -
edgeFormat
The field for theedgeFormat
record component. -
cleanUpTemporaryFiles
private final boolean cleanUpTemporaryFilesThe field for thecleanUpTemporaryFiles
record component. -
dpi
private final int dpiThe field for thedpi
record component. -
nodesize
private final int nodesizeThe field for thenodesize
record component. -
edgesize
private final double edgesizeThe field for theedgesize
record component. -
arrowsize
private final int arrowsizeThe field for thearrowsize
record component. -
fontsize
private final int fontsizeThe field for thefontsize
record component. -
withlabels
private final boolean withlabelsThe field for thewithlabels
record component. -
extraArguments
The field for theextraArguments
record component.
-
-
Constructor Details
-
RenderOptions
public RenderOptions(GraphFormat format, VariationDiffLabelFormat treeFormat, DiffNodeLabelFormat<? super L> nodeFormat, EdgeLabelFormat<? super L> edgeFormat, boolean cleanUpTemporaryFiles, int dpi, int nodesize, double edgesize, int arrowsize, int fontsize, boolean withlabels, List<String> extraArguments) Creates an instance of aRenderOptions
record class.- Parameters:
format
- the value for theformat
record componenttreeFormat
- the value for thetreeFormat
record componentnodeFormat
- the value for thenodeFormat
record componentedgeFormat
- the value for theedgeFormat
record componentcleanUpTemporaryFiles
- the value for thecleanUpTemporaryFiles
record componentdpi
- the value for thedpi
record componentnodesize
- the value for thenodesize
record componentedgesize
- the value for theedgesize
record componentarrowsize
- the value for thearrowsize
record componentfontsize
- the value for thefontsize
record componentwithlabels
- the value for thewithlabels
record componentextraArguments
- the value for theextraArguments
record component
-
-
Method Details
-
DEFAULT
Default options. -
toLineGraphOptions
Converts this RenderOptions to options for linegraph export. Linegraph options are a subset of render options.- Returns:
- Options for linegraph export consistent to this RenderOptions.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
format
Returns the value of theformat
record component.- Returns:
- the value of the
format
record component
-
treeFormat
Returns the value of thetreeFormat
record component.- Returns:
- the value of the
treeFormat
record component
-
nodeFormat
Returns the value of thenodeFormat
record component.- Returns:
- the value of the
nodeFormat
record component
-
edgeFormat
Returns the value of theedgeFormat
record component.- Returns:
- the value of the
edgeFormat
record component
-
cleanUpTemporaryFiles
public boolean cleanUpTemporaryFiles()Returns the value of thecleanUpTemporaryFiles
record component.- Returns:
- the value of the
cleanUpTemporaryFiles
record component
-
dpi
public int dpi()Returns the value of thedpi
record component.- Returns:
- the value of the
dpi
record component
-
nodesize
public int nodesize()Returns the value of thenodesize
record component.- Returns:
- the value of the
nodesize
record component
-
edgesize
public double edgesize()Returns the value of theedgesize
record component.- Returns:
- the value of the
edgesize
record component
-
arrowsize
public int arrowsize()Returns the value of thearrowsize
record component.- Returns:
- the value of the
arrowsize
record component
-
fontsize
public int fontsize()Returns the value of thefontsize
record component.- Returns:
- the value of the
fontsize
record component
-
withlabels
public boolean withlabels()Returns the value of thewithlabels
record component.- Returns:
- the value of the
withlabels
record component
-
extraArguments
Returns the value of theextraArguments
record component.- Returns:
- the value of the
extraArguments
record component
-