summaryrefslogtreecommitdiffstats
path: root/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/main/SVGDiagramGenerator.java
diff options
context:
space:
mode:
authornirmal070125 <nirmal070125@13f79535-47bb-0310-9956-ffa450edef68>2011-06-07 05:17:25 +0000
committernirmal070125 <nirmal070125@13f79535-47bb-0310-9956-ffa450edef68>2011-06-07 05:17:25 +0000
commitc6406ddd51887ba702991e960512161a92697d5e (patch)
tree2610fc623f82de99962d08f7b337548777ac2045 /collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/main/SVGDiagramGenerator.java
parenta0a513f7e7cf5a91b3ca15f7ea279c88220e2aca (diff)
Work up to date: not stable
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1132863 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/main/SVGDiagramGenerator.java62
1 files changed, 31 insertions, 31 deletions
diff --git a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/main/SVGDiagramGenerator.java b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/main/SVGDiagramGenerator.java
index 6d17547d66..bce24de749 100644
--- a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/main/SVGDiagramGenerator.java
+++ b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/main/SVGDiagramGenerator.java
@@ -1,5 +1,5 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
+un * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
@@ -44,7 +44,7 @@ import org.apache.tuscany.sca.impl.artifacts.Wire;
public class SVGDiagramGenerator {
private static final File outFile = new File(System.getProperty("user.dir")
- + "/output/test.svg");
+ + "/output/reference.svg");
/**
* @param args
@@ -83,15 +83,15 @@ public class SVGDiagramGenerator {
Wire edge1 = new Wire();
Wire edge2 = new Wire();
- Element rectangle1 = comp1.addElement(doc, svgNS, 50, 20, 130, 200);
- Element text1 = Text.addTextElement(doc, svgNS, 150, 90, "SCA Component");
+ Element rectangle1 = comp1.addElement(doc, svgNS, 0, 0, 130, 200);
+ Element text1 = Text.addTextElement(doc, svgNS, 100, 70, "SCA Component");
Element property1 = prop1.addElement(doc, svgNS, 120, 10, 20);
Element property2 = prop2.addElement(doc, svgNS, 160, 10, 20);
- Element polygon1 = ser1.addElement(doc, svgNS, 50, 85, 30);
+ Element polygon1 = ser1.addElement(doc, svgNS, 15, 15, 30);
- Element polygon2 = ref1.addElement(doc, svgNS, 270, 60, 30);
+ Element polygon2 = ref1.addElement(doc, svgNS, 45, 15, 30);
Element polygon3 = ref2.addElement(doc, svgNS, 270, 110, 30);
//Element wire1 = edge1.addElement(doc, svgNS, 270, 60, 390, 85);
@@ -112,37 +112,37 @@ public class SVGDiagramGenerator {
//Element wire2 = Wire.addWireElement(doc, svgNS, 270, 110, 390, 265);
// Set the width and height attributes on the root 'svg' element.
- svgRoot.setAttributeNS(null, "width", "650");
- svgRoot.setAttributeNS(null, "height", "450");
+// svgRoot.setAttributeNS(null, "width", "200");
+// svgRoot.setAttributeNS(null, "height", "130");
Element composi = composite.addElement(doc, svgNS, 0, 0, 350, 650);
Element text4 = Text.addTextElement(doc, svgNS, 75, 320, "Composite");
- svgRoot.appendChild(composi);
- svgRoot.appendChild(text4);
+// svgRoot.appendChild(composi);
+// svgRoot.appendChild(text4);
- // Attach the rectangle to the root 'svg' element.
- svgRoot.appendChild(rectangle1);
- svgRoot.appendChild(text1);
- svgRoot.appendChild(property1);
- svgRoot.appendChild(property2);
- svgRoot.appendChild(polygon1);
+// // Attach the rectangle to the root 'svg' element.
+// svgRoot.appendChild(rectangle1);
+// svgRoot.appendChild(text1);
+// svgRoot.appendChild(property1);
+// svgRoot.appendChild(property2);
+// svgRoot.appendChild(polygon1);
svgRoot.appendChild(polygon2);
- svgRoot.appendChild(polygon3);
-
- svgRoot.appendChild(rectangle2);
- svgRoot.appendChild(text2);
- svgRoot.appendChild(polygon4);
- //svgRoot.appendChild(polygon3);
-
- svgRoot.appendChild(rectangle3);
- svgRoot.appendChild(text3);
- svgRoot.appendChild(polygon5);
-
- svgRoot.appendChild(wire1);
- svgRoot.appendChild(wire2);
- //svgRoot.setAttributeNS(null, "fill", "#CAE1FF");
- //System.out.println(doc.getDocumentElement().getAttribute("width"));
+// svgRoot.appendChild(polygon3);
+//
+// svgRoot.appendChild(rectangle2);
+// svgRoot.appendChild(text2);
+// svgRoot.appendChild(polygon4);
+// //svgRoot.appendChild(polygon3);
+//
+// svgRoot.appendChild(rectangle3);
+// svgRoot.appendChild(text3);
+// svgRoot.appendChild(polygon5);
+//
+// svgRoot.appendChild(wire1);
+// svgRoot.appendChild(wire2);
+// //svgRoot.setAttributeNS(null, "fill", "#CAE1FF");
+// //System.out.println(doc.getDocumentElement().getAttribute("width"));
return doc;
}