summaryrefslogtreecommitdiffstats
path: root/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/Entity.java
diff options
context:
space:
mode:
Diffstat (limited to 'collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/Entity.java')
-rwxr-xr-xcollaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/Entity.java44
1 files changed, 40 insertions, 4 deletions
diff --git a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/Entity.java b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/Entity.java
index 711a5b5394..b9a38a0deb 100755
--- a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/Entity.java
+++ b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/Entity.java
@@ -6,11 +6,14 @@ import java.util.HashSet;
public abstract class Entity {
+ private int id=-1; //a unique integer id (0..n)
private String name; // a unique name
+ private int spaceFactor = 2; //which determines the free space surrounded by this
private int x; // x coordinate
private int y; // y coordinate
private int level=-1; // corresponding row which this entity is placed
private int lane=-1; // corresponding column which this entity is placed
+ private boolean isPossitionSet = false;
private int height; // height of the entity
private int width; // width of the entity
private int refHeight; // height of a reference element
@@ -19,6 +22,9 @@ public abstract class Entity {
private int defaultNoOfSers; // default # of service elements
private int defaultNoOfRefs; // default # of reference elements
private int defaultNoOfProps; // default # of property elements
+ private int startPosition=0;
+ private Entity parent = null;
+
private ArrayList<String> references = new ArrayList<String>();
@@ -41,14 +47,14 @@ public abstract class Entity {
public int getX() {
return x;
}
- public void setX(int x) {
- this.x = x;
+ public void setX(int init) {
+ this.x = init + width * spaceFactor * lane;
}
public int getY() {
return y;
}
- public void setY(int y) {
- this.y = y;
+ public void setY(int init) {
+ this.y = init + height * spaceFactor * level;
}
public int getLevel() {
return level;
@@ -183,6 +189,36 @@ public abstract class Entity {
public ArrayList<String> getReferences() {
return references;
}
+ public void setId(int id) {
+ this.id = id;
+ }
+ public int getId() {
+ return id;
+ }
+ public void setPossitionSet(boolean isPossitionSet) {
+ this.isPossitionSet = isPossitionSet;
+ }
+ public boolean isPossitionSet() {
+ return isPossitionSet;
+ }
+ public int getSpaceFactor() {
+ return spaceFactor;
+ }
+ public void setSpaceFactor(int spaceFactor) {
+ this.spaceFactor = spaceFactor;
+ }
+ public void setStartPosition(int startPosition) {
+ this.startPosition = startPosition;
+ }
+ public int getStartPosition() {
+ return startPosition;
+ }
+ public void setParent(Entity parent) {
+ this.parent = parent;
+ }
+ public Entity getParent() {
+ return parent;
+ }
}