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
Nested ClassesModifier and TypeClassDescriptionstatic classRenderOptions.Builder<L extends Label>Builder forRenderOptions. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thearrowsizerecord component.private final booleanThe field for thecleanUpTemporaryFilesrecord component.private final intThe field for thedpirecord component.private final EdgeLabelFormat<? super L> The field for theedgeFormatrecord component.private final doubleThe field for theedgesizerecord component.The field for theextraArgumentsrecord component.private final intThe field for thefontsizerecord component.private final GraphFormatThe field for theformatrecord component.private final DiffNodeLabelFormat<? super L> The field for thenodeFormatrecord component.private final intThe field for thenodesizerecord component.private final VariationDiffLabelFormatThe field for thetreeFormatrecord component.private final booleanThe field for thewithlabelsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionRenderOptions(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 aRenderOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thearrowsizerecord component.booleanReturns the value of thecleanUpTemporaryFilesrecord component.static <L extends Label>
RenderOptions<L> DEFAULT()Default options.intdpi()Returns the value of thedpirecord component.EdgeLabelFormat<? super L> Returns the value of theedgeFormatrecord component.doubleedgesize()Returns the value of theedgesizerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theextraArgumentsrecord component.intfontsize()Returns the value of thefontsizerecord component.format()Returns the value of theformatrecord component.final inthashCode()Returns a hash code value for this object.DiffNodeLabelFormat<? super L> Returns the value of thenodeFormatrecord component.intnodesize()Returns the value of thenodesizerecord component.Converts this RenderOptions to options for linegraph export.final StringtoString()Returns a string representation of this record class.Returns the value of thetreeFormatrecord component.booleanReturns the value of thewithlabelsrecord component.
-
Field Details
-
format
The field for theformatrecord component. -
treeFormat
The field for thetreeFormatrecord component. -
nodeFormat
The field for thenodeFormatrecord component. -
edgeFormat
The field for theedgeFormatrecord component. -
cleanUpTemporaryFiles
private final boolean cleanUpTemporaryFilesThe field for thecleanUpTemporaryFilesrecord component. -
dpi
private final int dpiThe field for thedpirecord component. -
nodesize
private final int nodesizeThe field for thenodesizerecord component. -
edgesize
private final double edgesizeThe field for theedgesizerecord component. -
arrowsize
private final int arrowsizeThe field for thearrowsizerecord component. -
fontsize
private final int fontsizeThe field for thefontsizerecord component. -
withlabels
private final boolean withlabelsThe field for thewithlabelsrecord component. -
extraArguments
The field for theextraArgumentsrecord 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 aRenderOptionsrecord class.- Parameters:
format- the value for theformatrecord componenttreeFormat- the value for thetreeFormatrecord componentnodeFormat- the value for thenodeFormatrecord componentedgeFormat- the value for theedgeFormatrecord componentcleanUpTemporaryFiles- the value for thecleanUpTemporaryFilesrecord componentdpi- the value for thedpirecord componentnodesize- the value for thenodesizerecord componentedgesize- the value for theedgesizerecord componentarrowsize- the value for thearrowsizerecord componentfontsize- the value for thefontsizerecord componentwithlabels- the value for thewithlabelsrecord componentextraArguments- the value for theextraArgumentsrecord 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 theformatrecord component.- Returns:
- the value of the
formatrecord component
-
treeFormat
Returns the value of thetreeFormatrecord component.- Returns:
- the value of the
treeFormatrecord component
-
nodeFormat
Returns the value of thenodeFormatrecord component.- Returns:
- the value of the
nodeFormatrecord component
-
edgeFormat
Returns the value of theedgeFormatrecord component.- Returns:
- the value of the
edgeFormatrecord component
-
cleanUpTemporaryFiles
public boolean cleanUpTemporaryFiles()Returns the value of thecleanUpTemporaryFilesrecord component.- Returns:
- the value of the
cleanUpTemporaryFilesrecord component
-
dpi
public int dpi()Returns the value of thedpirecord component.- Returns:
- the value of the
dpirecord component
-
nodesize
public int nodesize()Returns the value of thenodesizerecord component.- Returns:
- the value of the
nodesizerecord component
-
edgesize
public double edgesize()Returns the value of theedgesizerecord component.- Returns:
- the value of the
edgesizerecord component
-
arrowsize
public int arrowsize()Returns the value of thearrowsizerecord component.- Returns:
- the value of the
arrowsizerecord component
-
fontsize
public int fontsize()Returns the value of thefontsizerecord component.- Returns:
- the value of the
fontsizerecord component
-
withlabels
public boolean withlabels()Returns the value of thewithlabelsrecord component.- Returns:
- the value of the
withlabelsrecord component
-
extraArguments
Returns the value of theextraArgumentsrecord component.- Returns:
- the value of the
extraArgumentsrecord component
-