diff options
author | nirmal070125 <nirmal070125@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-07 05:17:25 +0000 |
---|---|---|
committer | nirmal070125 <nirmal070125@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-07 05:17:25 +0000 |
commit | c6406ddd51887ba702991e960512161a92697d5e (patch) | |
tree | 2610fc623f82de99962d08f7b337548777ac2045 /collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Property.java | |
parent | a0a513f7e7cf5a91b3ca15f7ea279c88220e2aca (diff) |
Work up to date: not stable
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1132863 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Property.java')
-rw-r--r-- | collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Property.java | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Property.java b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Property.java index c751db9b77..0d236ccfaa 100644 --- a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Property.java +++ b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Property.java @@ -24,7 +24,8 @@ import org.w3c.dom.Element; public class Property extends Artifact{ -// private static final String WIDTH = "20" ; + public static final int MAXIMUM_HEIGHT = 20 ; //default value + public static final int SPACING = 20 ; //default value // public static Element addPropertyElement(Document document, // String svgNs, int x, int y) { @@ -40,17 +41,18 @@ public class Property extends Artifact{ // return rectangle; // } - + /** + * Property is a square. + * ___ + * | | + * |___| + * + */ public Element addElement(Document document, String svgNs, int x, int y, int height, int width) { - return this.addElement(document, svgNs, x, y, height); - } - - public Element addElement(Document document, String svgNs, int x, int y, - int height) { this.setHeight(height); - this.setWidth(height); + this.setWidth(width); this.setxCoordinate(x); this.setyCoordinate(y); @@ -65,5 +67,19 @@ public class Property extends Artifact{ return rectangle; } + + + public Element addElement(Document document, String svgNs, int x, int y, + int height) { + + return addElement(document, svgNs, x, y, height, height); + } + + + public Element addElement(Document document, String svgNs, int x, int y) { + + + return addElement(document, svgNs, x, y, MAXIMUM_HEIGHT); + } } |