summaryrefslogtreecommitdiffstats
path: root/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Property.java
diff options
context:
space:
mode:
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.java32
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);
+ }
}