Skip to content

Commit

Permalink
Format Configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
atextor committed Jan 14, 2021
1 parent bcb641b commit 22e522e
Showing 1 changed file with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,37 @@
public class Configuration {
@Builder.Default
public String dotBinary = "dot";

@Builder.Default
public String fontname = "Verdana";

@Builder.Default
public int fontsize = 12;

@Builder.Default
public String nodeFontname = "Verdana";

@Builder.Default
public int nodeFontsize = 12;

@Builder.Default
public String nodeShape = "box";

@Builder.Default
public String nodeMargin = "0.05,0.0";

@Builder.Default
public String nodeStyle = "rounded";

@Builder.Default
public Format format = Format.SVG;

@Builder.Default
public LayoutDirection layoutDirection = LayoutDirection.LEFT_TO_RIGHT;

public enum Format {
PNG, SVG;
PNG,
SVG;

public String getExtension() {
return toString().toLowerCase();
Expand All @@ -53,10 +63,8 @@ public String getExtension() {
@Override
public String toString() {
return switch ( this ) {
case PNG:
yield "png";
case SVG:
yield "svg";
case PNG -> "png";
case SVG -> "svg";
};
}
}
Expand All @@ -68,10 +76,8 @@ public enum LayoutDirection {
@Override
public String toString() {
return switch ( this ) {
case TOP_TO_BOTTOM:
yield "top_to_bottom";
case LEFT_TO_RIGHT:
yield "left_to_right";
case TOP_TO_BOTTOM -> "top_to_bottom";
case LEFT_TO_RIGHT -> "left_to_right";
};
}
}
Expand Down

0 comments on commit 22e522e

Please sign in to comment.