svn commit: r17334 - trunk/src/argouml-app/src/org/argouml/uml/diagram/use_case/ui/FigActor.java

Michiel van der Wulp <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: mvw
Date: 2009-09-21 00:13:31-0700
New Revision: 17334

Modified:
   trunk/src/argouml-app/src/org/argouml/uml/diagram/use_case/ui/FigActor.java

Log:
Set the correct drop location in the case where an Actor is dragged from the explorer on e.g. a class diagram.

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/use_case/ui/FigActor.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/use_case/ui/FigActor.java?view=diff&pathrev=17334&r1=17333&r2=17334
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/use_case/ui/FigActor.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/use_case/ui/FigActor.java	2009-09-21 00:13:31-0700
@@ -70,7 +70,7 @@
     private static final int LEFT_LEG_POSN = 5;
     private static final int RIGHT_LEG_POSN = 6;
 
-    private void constructFigs() {
+    private void constructFigs(Rectangle bounds) {
         Color fg = getLineColor();
         Color fill = getFillColor();
         
@@ -107,7 +107,14 @@
         addFig(rightLeg);
         addFig(getStereotypeFig());
         setBigPort(bigPort);
+
+        /* Set the drop location in the case of D&D: */
+        if (bounds != null) {
+            setLocation(bounds.x, bounds.y);
+        }
+
         setSuppressCalcBounds(false);
+        setBounds(getBounds());
     }
     
     /**
@@ -120,10 +127,7 @@
      */
     public FigActor(Object owner, Rectangle bounds, DiagramSettings settings) {
         super(owner, bounds, settings);
-        constructFigs();
-        if (bounds != null) {
-            setLocation(bounds.x, bounds.y);
-        }
+        constructFigs(bounds);
     }
 
     /*

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2397226

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.