svn commit: r13743 - trunk/src_new/org/argouml/uml/diagram/deployment/ui/FigMNode.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2007-11-09 16:19:48-0800
New Revision: 13743

Modified:
   trunk/src_new/org/argouml/uml/diagram/deployment/ui/FigMNode.java

Log:
Fix minimum size calculation.  Remove placeString implementation which returns same result as super implementation.

Modified: trunk/src_new/org/argouml/uml/diagram/deployment/ui/FigMNode.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/deployment/ui/FigMNode.java?view=diff&rev=13743&p1=trunk/src_new/org/argouml/uml/diagram/deployment/ui/FigMNode.java&p2=trunk/src_new/org/argouml/uml/diagram/deployment/ui/FigMNode.java&r1=13742&r2=13743
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/deployment/ui/FigMNode.java	(original)
+++ trunk/src_new/org/argouml/uml/diagram/deployment/ui/FigMNode.java	2007-11-09 16:19:48-0800
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Copyright (c) 1996-2007 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -93,7 +93,7 @@
     }
 
     /**
-     * Constructor which hooks the new Fig into an existing UML element.
+     * Construct a FigMNode based on an existing UML Node element.
      *
      * @param gm ignored
      * @param node the UML element
@@ -107,14 +107,6 @@
 	}
     }
 
-    /*
-     * @see org.argouml.uml.diagram.ui.FigNodeModelElement#placeString()
-     */
-    @Override
-    public String placeString() {
-        // TODO: I18N
-        return "new Node";
-    }
 
     /*
      * @see java.lang.Object#clone()
@@ -131,12 +123,7 @@
     }
 
 
-    /**
-     * Build a collection of menu items relevant for a right-click popup menu.
-     *
-     * @param     me     a mouse event
-     * @return           a collection of menu items
-     *
+    /*
      * @see org.tigris.gef.ui.PopupGenerator#getPopUpActions(java.awt.event.MouseEvent)
      */
     @Override
@@ -202,8 +189,9 @@
 	Dimension stereoDim = getStereotypeFig().getMinimumSize();
 	Dimension nameDim = getNameFig().getMinimumSize();
 
-	int w = Math.max(stereoDim.width, nameDim.width + 1);
-	int h = stereoDim.height + nameDim.height - 4;
+	int w = Math.max(stereoDim.width, nameDim.width + 1) + DEPTH;
+	int h = stereoDim.height + nameDim.height + DEPTH;
+	
         w = Math.max(3 * DEPTH, w); // so it still looks like a cube
         h = Math.max(3 * DEPTH, h);
 	return new Dimension(w, h);
@@ -366,7 +354,7 @@
         Point p = Geometry.ptClosestTo(xs, ys, 7, anotherPt);
         return p;
     }
-
+    
     /**
      * The UID.
      */
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.