diff options
Diffstat (limited to 'collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/PropertyArtifact.java')
-rwxr-xr-x | collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/PropertyArtifact.java | 66 |
1 files changed, 31 insertions, 35 deletions
diff --git a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/PropertyArtifact.java b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/PropertyArtifact.java index f1151f8b57..d9bad6e017 100755 --- a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/PropertyArtifact.java +++ b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/PropertyArtifact.java @@ -22,41 +22,37 @@ package org.apache.tuscany.sca.impl.artifacts; import org.w3c.dom.Document; import org.w3c.dom.Element; -public class PropertyArtifact extends Artifact{ - - /** - * Property is a square. - * ___ - * | | - * |___| - * - */ - 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, "width", height+""); - rectangle.setAttributeNS(null, "height", height+""); - rectangle.setAttributeNS(null, "fill", "#EEEE00"); - rectangle.setAttributeNS(null, "stroke", "#EEC900"); - //rectangle.setAttributeNS(null, "fill-opacity", "0.75"); - - return rectangle; - } - - - public Element addElement(Document document, String svgNs, int x, int y, - int height) { - - return addElement(document, svgNs, x, y, height, height); - } +public class PropertyArtifact extends Artifact { + /** + * Property is a square. + * ___ + * | | + * |___| + * + */ + 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, "width", height + ""); + rectangle.setAttributeNS(null, "height", height + ""); + rectangle.setAttributeNS(null, "fill", "#EEEE00"); + rectangle.setAttributeNS(null, "stroke", "#EEC900"); + //rectangle.setAttributeNS(null, "fill-opacity", "0.75"); + + return rectangle; + } + + public Element addElement(Document document, String svgNs, int x, int y, int height) { + + return addElement(document, svgNs, x, y, height, height); + } } |