@@ -0,0 +1,1601 @@
+package org.vaadin.addon.gwtgraphics.client.stroke;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Apublic class Stroke %7B%0A%0A%09public static enum LineCap %7B%0A%09%09BUTT,%0A%09%09SQUARE,%0A%09%09ROUND%0A%09%7D%0A%09%0A%09public static enum LineJoin %7B%0A%09%09MITER,%0A%09%09ROUND,%0A%09%09BEVEL%0A%09%7D%0A%09%0A%09private List%3CDouble%3E dashArray = null;%0A%09private LineCap lineCap = null;%0A%09private LineJoin lineJoin = null;%0A%09private String color;%0A%09private double width = 1.0;%0A%09private double miterLimit = 4.0;%0A%09private double dashOffset = 0.0;%0A%09private double opacity = 1.0;%0A%09%0A%09public Stroke() %7B%0A%09%09this(%22black%22);%0A%09%7D%0A%09%0A%09public Stroke(String color) %7B%0A%09%09this.color = color == null ? %22%22 : color;%0A%09%7D%0A%09%0A%09public void setDashArray(double... values) %7B%0A%09%09if(dashArray != null) %7B%0A%09%09%09dashArray = new ArrayList%3CDouble%3E();%0A%09%09%7D%0A%09%09dashArray.clear();%0A%09%09for(double d : values) %7B%0A%09%09%09dashArray.add(d);%0A%09%09%7D%0A%09%7D%0A%09%0A%09/**%0A%09 * Returns a temporary array with the defined dash array values%0A%09 * %0A%09 * @return%0A%09 */%0A%09public double%5B%5D getDashArray() %7B%0A%09%09if(dashArray == null) %7B%0A%09%09%09return new double%5B0%5D;%0A%09%09%7D%0A%09%09double%5B%5D values = new double%5BdashArray.size()%5D;%0A%09%09int i = 0;%0A%09%09for(double d : dashArray) %7B%0A%09%09%09values%5Bi++%5D = d;%0A%09%09%7D%0A%09%09return values;%0A%09%7D%0A%09%0A%09public void setDashOffset(double offs) %7B%0A%09%09dashOffset = offs;%0A%09%7D%0A%09%0A%09public double getDashOffset() %7B%0A%09%09return dashOffset;%0A%09%7D%0A%09%0A%09public void setColor(String color) %7B%0A%09%09color = color == null ? %22none%22 : color;%0A%09%7D%0A%09%0A%09public String getColor() %7B%0A%09%09return color;%0A%09%7D%0A%09%0A%09/**%0A%09 * Returns properties formatted for inclusion in an SVG tag%0A%09 * %0A%09 * @return a string representing a number of SVG properties%0A%09 */%0A%09public String toSVGString() %7B%0A%09%09%0A%09%09%0A%09%09return %22%22;%0A%09%7D%0A%09%0A%7D%0A

Add Stroke API