summaryrefslogtreecommitdiffstats
path: root/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/ComponentEntity.java
diff options
context:
space:
mode:
Diffstat (limited to 'collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/ComponentEntity.java')
-rwxr-xr-xcollaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/ComponentEntity.java40
1 files changed, 22 insertions, 18 deletions
diff --git a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/ComponentEntity.java b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/ComponentEntity.java
index 7507b4ab57..9059187c6d 100755
--- a/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/ComponentEntity.java
+++ b/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/ComponentEntity.java
@@ -23,10 +23,11 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
-import org.apache.tuscany.sca.impl.artifacts.Component;
-import org.apache.tuscany.sca.impl.artifacts.Property;
-import org.apache.tuscany.sca.impl.artifacts.Reference;
-import org.apache.tuscany.sca.impl.artifacts.Service;
+import org.apache.tuscany.sca.impl.artifacts.ComponentArtifact;
+import org.apache.tuscany.sca.impl.artifacts.Constant;
+import org.apache.tuscany.sca.impl.artifacts.PropertyArtifact;
+import org.apache.tuscany.sca.impl.artifacts.ReferenceArtifact;
+import org.apache.tuscany.sca.impl.artifacts.ServiceArtifact;
/**
* Represents an unit (a component including its references, services, properties
@@ -49,45 +50,48 @@ public class ComponentEntity extends Entity{
public ComponentEntity(){
setStartPosition(200);
- setHeight(Component.DEFAULT_HEIGHT);
- setWidth(Component.DEFAULT_WIDTH);
+ setHeight(Constant.COMPONENT_DEFAULT_HEIGHT);
+ setWidth(Constant.COMPONENT_DEFAULT_HEIGHT);
setDefaultNoOfSers(
- Component.DEFAULT_HEIGHT /
- (Service.DEFAULT_MAXIMUM_HEIGHT_FOR_COMPONENT+Service.SPACING_FOR_COMPONENT));
+ Constant.COMPONENT_DEFAULT_HEIGHT /
+ (Constant.DEFAULT_MAXIMUM_HEIGHT_FOR_COMPONENT_OF_SERVICE +
+ Constant.SPACING_FOR_COMPONENT_OF_SERVICE));
setDefaultNoOfRefs(
- Component.DEFAULT_HEIGHT /
- (Reference.DEFAULT_MAXIMUM_HEIGHT_FOR_COMPONENT+Reference.SPACING_FOR_COMPONENT));
+ Constant.COMPONENT_DEFAULT_HEIGHT /
+ (Constant.DEFAULT_MAXIMUM_HEIGHT_FOR_COMPONENT_OF_REFERENCE +
+ Constant.SPACING_FOR_COMPONENT_OF_REFERENCE));
setDefaultNoOfProps(
- Component.DEFAULT_WIDTH /
- (Property.DEFAULT_MAXIMUM_HEIGHT_FOR_COMPONENT+Property.SPACING_FOR_COMPONENT));
+ Constant.COMPONENT_DEFAULT_WIDTH /
+ (Constant.DEFAULT_MAXIMUM_HEIGHT_FOR_COMPONENT_OF_PROPERTY +
+ Constant.SPACING_FOR_COMPONENT_OF_PROPERTY));
}
public void referenceHeight(){
if(getDefaultNoOfRefs() < getNoOfRefs()){
- setRefHeight((Component.DEFAULT_HEIGHT / getNoOfRefs()) - Reference.SPACING_FOR_COMPONENT);
+ setRefHeight((Constant.COMPONENT_DEFAULT_HEIGHT / getNoOfRefs()) - Constant.SPACING_FOR_COMPONENT_OF_REFERENCE);
}
else
- setRefHeight(Reference.DEFAULT_MAXIMUM_HEIGHT_FOR_COMPONENT);
+ setRefHeight(Constant.DEFAULT_MAXIMUM_HEIGHT_FOR_COMPONENT_OF_REFERENCE);
}
public void serviceHeight(){
if(getDefaultNoOfSers() < getNoOfSers()){
- setSerHeight((Component.DEFAULT_HEIGHT / getNoOfSers()) - Service.SPACING_FOR_COMPONENT);
+ setSerHeight((Constant.COMPONENT_DEFAULT_HEIGHT / getNoOfSers()) - Constant.SPACING_FOR_COMPONENT_OF_SERVICE);
}
else
- setSerHeight(Service.DEFAULT_MAXIMUM_HEIGHT_FOR_COMPONENT);
+ setSerHeight(Constant.DEFAULT_MAXIMUM_HEIGHT_FOR_COMPONENT_OF_SERVICE);
}
public void propertyLength(){
if(getDefaultNoOfProps() < getNoOfProps()){
- setPropLength((Component.DEFAULT_WIDTH / getNoOfProps()) - Property.SPACING_FOR_COMPONENT);
+ setPropLength((Constant.COMPONENT_DEFAULT_WIDTH / getNoOfProps()) - Constant.SPACING_FOR_COMPONENT_OF_PROPERTY);
}
else
- setPropLength(Property.DEFAULT_MAXIMUM_HEIGHT_FOR_COMPONENT);
+ setPropLength(Constant.DEFAULT_MAXIMUM_HEIGHT_FOR_COMPONENT_OF_PROPERTY);
}
/**