diff options
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.java | 24 |
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"); |