Author: mvw
Date: 2010-09-10 01:47:48-0700
New Revision: 18727
Modified:
trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigObject.java
trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigPackage.java
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/FigClassifierRole.java
Log:
More commits similar to issue 6135 - we ought to find the real cause!
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigObject.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigObject.java?view=diff&pathrev=18727&r1=18726&r2=18727
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigObject.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigObject.java 2010-09-10 01:47:48-0700
@@ -1,13 +1,13 @@
/* $Id$
*****************************************************************************
- * Copyright (c) 2009 Contributors - see below
+ * Copyright (c) 2009-2010 Contributors - see below
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * mvw
+ * Michiel van der Wulp
*****************************************************************************
*
* Some portions of this file was previously release using the BSD License:
@@ -196,6 +196,25 @@
return new Dimension(w, h);
}
+ /**
+ * Override ancestor behaviour by always calling setBounds even if the
+ * size hasn't changed. Without this override the Package bounds draw
+ * incorrectly. This is not the best fix but is a workaround until the
+ * true cause is known. See issue 6135.
+ *
+ * @see org.argouml.uml.diagram.ui.FigNodeModelElement#updateBounds()
+ */
+ protected void updateBounds() {
+ if (!isCheckSize()) {
+ return;
+ }
+ Rectangle bbox = getBounds();
+ Dimension minSize = getMinimumSize();
+ bbox.width = Math.max(bbox.width, minSize.width);
+ bbox.height = Math.max(bbox.height, minSize.height);
+ setBounds(bbox.x, bbox.y, bbox.width, bbox.height);
+ }
+
/*
* Override setBounds to keep shapes looking right.
*
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigPackage.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigPackage.java?view=diff&pathrev=18727&r1=18726&r2=18727
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigPackage.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigPackage.java 2010-09-10 01:47:48-0700
@@ -1,6 +1,6 @@
/* $Id$
*****************************************************************************
- * Copyright (c) 2009 Contributors - see below
+ * Copyright (c) 2009-2010 Contributors - see below
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
*
* Contributors:
* Bob Tarling
+ * Michiel van der Wulp
*****************************************************************************
*
* Some portions of this file was previously release using the BSD License:
@@ -59,14 +60,15 @@
import org.argouml.model.Model;
import org.argouml.model.RemoveAssociationEvent;
import org.argouml.ui.ArgoJMenu;
+import org.argouml.ui.UndoableAction;
import org.argouml.ui.explorer.ExplorerEventAdaptor;
import org.argouml.ui.targetmanager.TargetManager;
import org.argouml.uml.diagram.ArgoDiagram;
import org.argouml.uml.diagram.DiagramFactory;
+import org.argouml.uml.diagram.DiagramFactory.DiagramType;
import org.argouml.uml.diagram.DiagramSettings;
import org.argouml.uml.diagram.StereotypeContainer;
import org.argouml.uml.diagram.VisibilityContainer;
-import org.argouml.uml.diagram.DiagramFactory.DiagramType;
import org.argouml.uml.diagram.ui.ArgoFig;
import org.argouml.uml.diagram.ui.ArgoFigText;
import org.argouml.uml.diagram.ui.FigNodeModelElement;
@@ -78,7 +80,6 @@
import org.tigris.gef.presentation.FigPoly;
import org.tigris.gef.presentation.FigRect;
import org.tigris.gef.presentation.FigText;
-import org.argouml.ui.UndoableAction;
/**
* Class to display graphics for a UML package in a class diagram,
@@ -333,7 +334,7 @@
* Override ancestor behaviour by always calling setBounds even if the
* size hasn't changed. Without this override the Package bounds draw
* incorrectly. This is not the best fix but is a workaround until the
- * true cause is known.
+ * true cause is known. See issue 6135.
*
* @see org.argouml.uml.diagram.ui.FigNodeModelElement#updateBounds()
*/
Modified: trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/FigClassifierRole.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/FigClassifierRole.java?view=diff&pathrev=18727&r1=18726&r2=18727
==============================================================================
--- trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/FigClassifierRole.java (original)
+++ trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/FigClassifierRole.java 2010-09-10 01:47:48-0700
@@ -8,6 +8,7 @@
*
* Contributors:
* bobtarling
+ * Michiel van der Wulp
*****************************************************************************
*
* Some portions of this file was previously release using the BSD License:
@@ -286,6 +287,25 @@
}
}
+ /**
+ * Override ancestor behaviour by always calling setBounds even if the
+ * size hasn't changed. Without this override the Package bounds draw
+ * incorrectly. This is not the best fix but is a workaround until the
+ * true cause is known. See issue 6135.
+ *
+ * @see org.argouml.uml.diagram.ui.FigNodeModelElement#updateBounds()
+ */
+ protected void updateBounds() {
+ if (!isCheckSize()) {
+ return;
+ }
+ Rectangle bbox = getBounds();
+ Dimension minSize = getMinimumSize();
+ bbox.width = Math.max(bbox.width, minSize.width);
+ bbox.height = Math.max(bbox.height, minSize.height);
+ setBounds(bbox.x, bbox.y, bbox.width, bbox.height);
+ }
+
@Override
public void removeFigEdge(FigEdge edge) {
super.removeFigEdge(edge);
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2657476
To unsubscribe from this discussion, e-mail: [[email protected]].
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.