diff options
author | nirmal070125 <nirmal070125@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-06 18:20:14 +0000 |
---|---|---|
committer | nirmal070125 <nirmal070125@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-06 18:20:14 +0000 |
commit | 94ef23a1a25f056e0bf8f96d4bb97312ebc86f8b (patch) | |
tree | 826dcc8ec895387eecec1be765c0b73f2f02d7b1 /collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/NormalWire.java | |
parent | 3b3beac5adfa1995a9a4c92fd92a881f024be08e (diff) |
added support to inclusion, added a test case to demonstrate layout algorithm
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1154566 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/NormalWire.java')
-rwxr-xr-x | collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/NormalWire.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/NormalWire.java b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/NormalWire.java index 5ceece65bc..54fe2f5d04 100755 --- a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/NormalWire.java +++ b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/NormalWire.java @@ -24,9 +24,12 @@ import org.w3c.dom.Element; public class NormalWire extends Wire{ - - public Element addElement(Document document, String svgNs, - Reference aReference, Service aService){ + @Override + public Element addElement(Document document, String svgNs, Object a, + Object b, int changingFactor, String color) { + + Reference aReference = (Reference)a; + Service aService = (Service)b; Element polyline = document.createElementNS(svgNs, "polyline"); int x1=aReference.getxCoordinate()+aReference.getHeight()*3/2; @@ -34,12 +37,8 @@ public class NormalWire extends Wire{ int x2=aService.getxCoordinate()+aService.getHeight()/2; int y2=aService.getyCoordinate()+aService.getHeight()/2; - //polyline.setAttributeNS(null,"class", "Connect"); - polyline.setAttributeNS(null, "points", x1+","+ - y1+" "+x2+","+y2 - ); - polyline.setAttributeNS(null, "stroke", "black"); - polyline.setAttributeNS(null, "stroke-width", "2"); + + polyline = setWireAttributes(x1, y1, x2, y2, polyline, changingFactor, color); return polyline; } |