Author: bobtarling
Date: 2007-05-24 13:20:04-0700
New Revision: 12657
Modified:
trunk/src_new/org/argouml/persistence/PGMLStackParser.java
trunk/src_new/org/argouml/uml/diagram/activity/ui/FigPartition.java
trunk/src_new/org/argouml/uml/diagram/activity/ui/FigPool.java
Log:
Set bounds with constructor when relevant during load
Modified: trunk/src_new/org/argouml/persistence/PGMLStackParser.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/persistence/PGMLStackParser.java?view=diff&rev=12657&p1=trunk/src_new/org/argouml/persistence/PGMLStackParser.java&p2=trunk/src_new/org/argouml/persistence/PGMLStackParser.java&r1=12656&r2=12657
==============================================================================
--- trunk/src_new/org/argouml/persistence/PGMLStackParser.java (original)
+++ trunk/src_new/org/argouml/persistence/PGMLStackParser.java 2007-05-24 13:20:04-0700
@@ -459,17 +459,11 @@
Fig f = null;
if (className.equals(FigPool.class.getName())) {
- f = new FigPool();
+ f = new FigPool(bounds);
} else {
f = super.constructFig(className, href, bounds);
}
- if (bounds != null) {
- f.setBounds(bounds);
- }
return f;
}
-
-
-
}
Modified: trunk/src_new/org/argouml/uml/diagram/activity/ui/FigPartition.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/activity/ui/FigPartition.java?view=diff&rev=12657&p1=trunk/src_new/org/argouml/uml/diagram/activity/ui/FigPartition.java&p2=trunk/src_new/org/argouml/uml/diagram/activity/ui/FigPartition.java&r1=12656&r2=12657
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/activity/ui/FigPartition.java (original)
+++ trunk/src_new/org/argouml/uml/diagram/activity/ui/FigPartition.java 2007-05-24 13:20:04-0700
@@ -249,9 +249,8 @@
getOwner(), machine);
if (partitions.size() == 1) {
- FigPool fp = new FigPool();
+ FigPool fp = new FigPool(getBounds());
getLayer().add(fp);
- fp.setBounds(getBounds());
getLayer().bringToFront(this);
} else if (partitions.size() > 1) {
FigPool fp = getFigPool();
Modified: trunk/src_new/org/argouml/uml/diagram/activity/ui/FigPool.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/activity/ui/FigPool.java?view=diff&rev=12657&p1=trunk/src_new/org/argouml/uml/diagram/activity/ui/FigPool.java&p2=trunk/src_new/org/argouml/uml/diagram/activity/ui/FigPool.java&r1=12656&r2=12657
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/activity/ui/FigPool.java (original)
+++ trunk/src_new/org/argouml/uml/diagram/activity/ui/FigPool.java 2007-05-24 13:20:04-0700
@@ -45,16 +45,16 @@
/**
* Constructor.
+ * @param r the bounds for the pool
*/
- public FigPool() {
- setBigPort(new FigEmptyRect(10, 10, 160, 200));
+ public FigPool(Rectangle r) {
+ setBigPort(new FigEmptyRect(r.x, r.y, r.width, r.height));
getBigPort().setFilled(false);
getBigPort().setLineWidth(0);
addFig(getBigPort());
- Rectangle r = getBounds();
- setBounds(r.x, r.y, r.width, r.height);
+ setBounds(r);
}
/**
@@ -63,10 +63,10 @@
* @param gm ignored
* @param node the UML element
*/
- public FigPool(GraphModel gm, Object node) {
- this();
- setOwner(node);
- }
+// public FigPool(GraphModel gm, Object node) {
+// this(new Rectangle(10, 10, 160, 200));
+// setOwner(node);
+// }
/*
* @see java.lang.Object#clone()
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.