diff options
author | nirmal070125 <nirmal070125@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-13 07:37:39 +0000 |
---|---|---|
committer | nirmal070125 <nirmal070125@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-13 07:37:39 +0000 |
commit | b8d829dd982e8c4fa170f8bb8b095e8a1be8115e (patch) | |
tree | 98417bfacd7e8acf00c417a6c2efcf36a7916de9 /collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Reference.java | |
parent | 4793edeb2e0b18059c965759c78f06c6b77faf67 (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/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"); |