summaryrefslogtreecommitdiffstats
path: root/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Service.java
diff options
context:
space:
mode:
authornirmal070125 <nirmal070125@13f79535-47bb-0310-9956-ffa450edef68>2011-06-13 07:37:39 +0000
committernirmal070125 <nirmal070125@13f79535-47bb-0310-9956-ffa450edef68>2011-06-13 07:37:39 +0000
commitb8d829dd982e8c4fa170f8bb8b095e8a1be8115e (patch)
tree98417bfacd7e8acf00c417a6c2efcf36a7916de9 /collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Service.java
parent4793edeb2e0b18059c965759c78f06c6b77faf67 (diff)
Another version of layout algorithm and diagram creation
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1135039 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Service.java')
-rw-r--r--collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Service.java24
1 files changed, 4 insertions, 20 deletions
diff --git a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Service.java b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Service.java
index 986cc1b99c..37adb65f39 100644
--- a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Service.java
+++ b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Service.java
@@ -27,22 +27,6 @@ public class Service extends Artifact{
public static final int MAXIMUM_HEIGHT = 30 ; //default value
public static final int SPACING = 10 ; //default value
-// public static Element addServiceElement(Document document, String svgNs, int midX, int midY) {
-// // Create the rectangle.
-// Element polygon = document.createElementNS(svgNs, "polygon");
-// polygon.setAttributeNS(null, "points",
-// ""+ (midX-COMMON_LENGTH) +","+midY+" " +
-// ""+ (midX+(COMMON_LENGTH/2)) +","+midY+" " +
-// ""+ (midX+COMMON_LENGTH) +","+(midY-COMMON_LENGTH)+" " +
-// ""+ (midX+(COMMON_LENGTH/2)) +","+(midY-COMMON_LENGTH*2)+" " +
-// ""+ (midX-COMMON_LENGTH) +","+(midY-COMMON_LENGTH*2)+" " +
-// ""+ (midX-(COMMON_LENGTH/2)) +","+(midY-COMMON_LENGTH)+" "
-// );
-// polygon.setAttributeNS(null, "fill", "#00CD66");
-// polygon.setAttributeNS(null, "stroke", "#008B45");
-//
-// return polygon;
-// }
/**
* In a Service the (x,y) coordinates refers to the top corner edge of the polygon
@@ -66,10 +50,10 @@ public class Service extends Artifact{
polygon.setAttributeNS(null, "points",
""+ x +","+y+" " +
""+ (x+2*halfOfHeight) +","+(y)+" " +
- ""+ (x+3*halfOfHeight) +","+(y-halfOfHeight)+" " +
- ""+ (x+2*halfOfHeight) +","+(y-2*halfOfHeight)+" " +
- ""+ (x) +","+(y-2*halfOfHeight)+" " +
- ""+ (x+halfOfHeight) +","+(y-halfOfHeight)+" "
+ ""+ (x+3*halfOfHeight) +","+(y+halfOfHeight)+" " +
+ ""+ (x+2*halfOfHeight) +","+(y+2*halfOfHeight)+" " +
+ ""+ (x) +","+(y+2*halfOfHeight)+" " +
+ ""+ (x+halfOfHeight) +","+(y+halfOfHeight)+" "
);
polygon.setAttributeNS(null, "fill", "#00CD66");