summaryrefslogtreecommitdiffstats
path: root/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/CompositeArtifact.java
diff options
context:
space:
mode:
Diffstat (limited to 'collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/CompositeArtifact.java')
-rwxr-xr-xcollaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/CompositeArtifact.java58
1 files changed, 28 insertions, 30 deletions
diff --git a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/CompositeArtifact.java b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/CompositeArtifact.java
index af2a525577..0496f7c6cc 100755
--- a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/CompositeArtifact.java
+++ b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/CompositeArtifact.java
@@ -26,34 +26,32 @@ import org.w3c.dom.Element;
* Structure of a "Composite" element in SCA, as a SVG element
*
*/
-public class CompositeArtifact 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", "#E5E5E5");
- rectangle.setAttributeNS(null, "stroke", "#919191");
- rectangle.setAttributeNS(null, "alignment-baseline", "middle");
-
- return rectangle;
- }
-
-// //OBSOLETE
-// public Element addElement(Document document, String svgNs, int x, int y) {
-// return null;
-// }
-
+public class CompositeArtifact 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", "#E5E5E5");
+ rectangle.setAttributeNS(null, "stroke", "#919191");
+ rectangle.setAttributeNS(null, "alignment-baseline", "middle");
+
+ return rectangle;
+ }
+
+ // //OBSOLETE
+ // public Element addElement(Document document, String svgNs, int x, int y) {
+ // return null;
+ // }
+
}