Skip to content

Commit

Permalink
formatted relevant code
Browse files Browse the repository at this point in the history
  • Loading branch information
p-goetz committed Jan 26, 2012
1 parent 56aa608 commit 607584d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/graph/Plot.java
Expand Up @@ -127,11 +127,12 @@ public void setDimensions(final short width, final short height) {
*/ */
public void setColors(String colors) { public void setColors(String colors) {
if (colors != null) { if (colors != null) {
if (colors.length() == 15 && if (colors.length() == 15
colors.matches("x[0-9A-Fa-f]{6} x[0-9A-Fa-f]{6}")) { && colors.matches("x[0-9A-Fa-f]{6} x[0-9A-Fa-f]{6}")) {
this.colors = colors; this.colors = colors;
} else { } else {
throw new IllegalArgumentException("colors parameter must match the format \"x000000 xFFFFFF\" for foreground and background colors"); throw new IllegalArgumentException(
"colors parameter must match the format \"x000000 xFFFFFF\" for foreground and background colors");
} }
} }
} }
Expand Down Expand Up @@ -232,7 +233,7 @@ private void writeGnuplotScript(final String basepath,
.append(Short.toString(width)).append(",") .append(Short.toString(width)).append(",")
.append(Short.toString(height)); .append(Short.toString(height));


if(colors != null) { if (colors != null) {
gp.append(" ").append(colors); gp.append(" ").append(colors);
} }


Expand Down

0 comments on commit 607584d

Please sign in to comment.