svn commit: r16355 - branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeLabelDrag.java

Dave Thompson <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: dthompson
Date: 2008-12-14 01:01:00-0800
New Revision: 16355

Modified:
   branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeLabelDrag.java

Log:
Tidied up javadoc, removed some debug prints.  No functional change.

Modified: branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeLabelDrag.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeLabelDrag.java?view=diff&pathrev=16355&r1=16354&r2=16355
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeLabelDrag.java	(original)
+++ branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeLabelDrag.java	2008-12-14 01:01:00-0800
@@ -35,8 +35,8 @@
 import org.tigris.gef.presentation.FigEdge;
 
 /**
- * Mode for dragging (i.e. user repositioning) of Text labels
- * connected to FigEdges.
+ * Mode for dragging (i.e. user repositioning) of Text labels connected to 
+ * FigEdges.
  * @author Dave Thompson
  */
 public class ModeLabelDrag extends FigModifyingModeImpl {
@@ -62,7 +62,7 @@
      * point.  When a new mouse drag event occurs, the difference between
      * the current point and dragBasePoint is the delta in position.
      */
-    private Point dragBasePoint = new Point(0,0);
+    private Point dragBasePoint = new Point(0, 0);
    
     /**
      * X-offset for storing the location of the mouse click on a label
@@ -79,6 +79,7 @@
      * still behave sensibly.  X component.
      */
     private int deltay = 0;
+    
     /**
      * Constructor for creating the ModeLabelDrag instance.
      * @param editor The editor which will own this mode.
@@ -110,9 +111,6 @@
      * @see org.tigris.gef.base.ModeImpl#mousePressed(java.awt.event.MouseEvent)
      */
     public void mousePressed(MouseEvent me) {
-        // Translate the mouse event to the drawing scale coordinates.
-        //me = editor.translateMouseEvent(me);
-
         Point clickPoint = me.getPoint(); 
         Fig underMouse = editor.hit(clickPoint);
         if (underMouse instanceof FigEdge) {
@@ -130,16 +128,24 @@
                 }
             }
         }
-        System.out.println("dragFig=" + dragFig);
     }
     
+    /**
+     * Handle mouseReleased events.
+     * @param me The mouse event to process.
+     * @see org.tigris.gef.base.ModeImpl#mouseReleased(java.awt.event.MouseEvent)
+     */
     public void mouseReleased(MouseEvent me) {
-        //me = editor.retranslateMouseEvent(me);
         if (dragFig != null) {
             dragFig = null;
         }
     }
     
+    /**
+     * Handle mouseDragged events.
+     * @param me The mouse event to process.
+     * @see org.tigris.gef.base.ModeImpl#mouseDragged(java.awt.event.MouseEvent)
+     */
     public void mouseDragged(MouseEvent me) {
         if (dragFig != null) {
             me = editor.translateMouseEvent(me);
@@ -157,10 +163,6 @@
             dragFig.translate(dx, dy);
             me.consume();
         }
-        //dragBasePoint.setLocation(me.getX(), me.getY());
-        
-        System.out.println("ModeLabelDrag.mouseDragged()");
-        
         editor.damageAll(); /// TODO: reckless use of damageAll.
     }

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

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.