diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2011-09-01 15:57:25 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2011-09-01 15:57:25 +0000 |
commit | ab1cab29895c4cf841af608eef7d56bc61a413a8 (patch) | |
tree | 5caa52b0b9126826da4802a9cff82e46872b1c05 /collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Layer.java | |
parent | 39643d6d27627c7c5ad0bb74e68b8601f780086e (diff) |
Format the code and organize imports
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1164123 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rwxr-xr-x | collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Layer.java | 63 |
1 files changed, 30 insertions, 33 deletions
diff --git a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Layer.java b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Layer.java index 0a1ca90c1d..c3a41140f8 100755 --- a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Layer.java +++ b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Layer.java @@ -26,38 +26,35 @@ import org.w3c.dom.Element; * Structure of a "Outermost layer" : not a SCA artifact * */ -public class Layer extends Artifact{ - - - public Element addElement(Document document, String svgNs, int x, int y, - int height, int width) { - - this.setHeight(height); - this.setWidth(width); - this.setxCoordinate(x); - this.setyCoordinate(y); - - Element rectangle = document.createElementNS(svgNs, "rect"); - rectangle.setAttributeNS(null, "x", x+""); - rectangle.setAttributeNS(null, "y", y+""); - rectangle.setAttributeNS(null, "rx", getRoundCorner()); - rectangle.setAttributeNS(null, "ry", getRoundCorner()); - rectangle.setAttributeNS(null, "width", width+""); - rectangle.setAttributeNS(null, "height", height+""); - rectangle.setAttributeNS(null, "fill", "#E5E5D0"); - rectangle.setAttributeNS(null, "stroke", "#919191"); - rectangle.setAttributeNS(null, "alignment-baseline", "middle"); - - return rectangle; - } - - public Element addElement(Document document, String svgNs, int x, int y, - int height, int width, String fillColor) { - - Element rect = addElement(document, svgNs, x, y, height, width); - rect.setAttributeNS(null, "fill", fillColor); - - return rect; - } +public class Layer extends Artifact { + + public Element addElement(Document document, String svgNs, int x, int y, int height, int width) { + + this.setHeight(height); + this.setWidth(width); + this.setxCoordinate(x); + this.setyCoordinate(y); + + Element rectangle = document.createElementNS(svgNs, "rect"); + rectangle.setAttributeNS(null, "x", x + ""); + rectangle.setAttributeNS(null, "y", y + ""); + rectangle.setAttributeNS(null, "rx", getRoundCorner()); + rectangle.setAttributeNS(null, "ry", getRoundCorner()); + rectangle.setAttributeNS(null, "width", width + ""); + rectangle.setAttributeNS(null, "height", height + ""); + rectangle.setAttributeNS(null, "fill", "#E5E5D0"); + rectangle.setAttributeNS(null, "stroke", "#919191"); + rectangle.setAttributeNS(null, "alignment-baseline", "middle"); + + return rectangle; + } + + public Element addElement(Document document, String svgNs, int x, int y, int height, int width, String fillColor) { + + Element rect = addElement(document, svgNs, x, y, height, width); + rect.setAttributeNS(null, "fill", fillColor); + + return rect; + } } |