diff options
Diffstat (limited to 'collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Reference.java')
-rw-r--r-- | collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Reference.java | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Reference.java b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Reference.java index 6a3f7ff9d1..f89fc2ab5f 100644 --- a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Reference.java +++ b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Reference.java @@ -27,27 +27,6 @@ public class Reference extends Artifact { public static final int MAXIMUM_HEIGHT = 30 ; //default value public static final int SPACING = 10 ; //default value -//private static final int COMMON_LENGTH = 20 ; - -// public static Element addReferenceElement(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", "#BF3EFF"); -// polygon.setAttributeNS(null, "stroke", "#68228B"); -// //rectangle.setAttributeNS(null, "alignment-baseline", "central"); -// -// return polygon; -// } -// /** * In a Reference the (x,y) coordinates refers to the top corner edge of the polygon @@ -72,10 +51,10 @@ public class Reference 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", "#BF3EFF"); |