svn commit: r13619 - trunk/src_new/org/argouml/uml/diagram: ui use_case/ui

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2007-09-27 01:48:23-0700
New Revision: 13619

Modified:
   trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java
   trunk/src_new/org/argouml/uml/diagram/ui/FigProfileIcon.java
   trunk/src_new/org/argouml/uml/diagram/ui/FigStereotypesCompartment.java
   trunk/src_new/org/argouml/uml/diagram/use_case/ui/FigActor.java
   trunk/src_new/org/argouml/uml/diagram/use_case/ui/FigUseCase.java

Log:
Minor style & Javadoc cleanup

Modified: trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java?view=diff&rev=13619&p1=trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java&p2=trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java&r1=13618&r2=13619
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java	(original)
+++ trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java	2007-09-27 01:48:23-0700
@@ -2112,19 +2112,19 @@
      * Do not override this method, override 
      * {@link #setStandardBounds(int, int, int, int)} instead.
      * 
-     * @see org.tigris.gef.presentation.Fig#setBoundsImpl(int, int, int, int)
+     * {@inheritDoc}
      */
     protected void setBoundsImpl(final int x, final int y, final int w,
-	    final int h) {
+            final int h) {
 
-	if (getPracticalView() == STEREOTYPE_VIEW_BIG_ICON) {
-	    if (stereotypeFigProfileIcon != null) {
-		    stereotypeFigProfileIcon.setBounds(stereotypeFigProfileIcon
-			.getX(), stereotypeFigProfileIcon.getY(), w, h);
-		    // FigClass calls setBoundsImpl before we set 
-		    // the stereotypeFigProfileIcon
-	    }
-	} else {
+        if (getPracticalView() == STEREOTYPE_VIEW_BIG_ICON) {
+            if (stereotypeFigProfileIcon != null) {
+                stereotypeFigProfileIcon.setBounds(stereotypeFigProfileIcon
+                        .getX(), stereotypeFigProfileIcon.getY(), w, h);
+                // FigClass calls setBoundsImpl before we set
+                // the stereotypeFigProfileIcon
+            }
+        } else {
 	    setStandardBounds(x, y, w, h);
 	    if (getStereotypeView() == STEREOTYPE_VIEW_SMALL_ICON) {
 	        updateSmallIcons(w);

Modified: trunk/src_new/org/argouml/uml/diagram/ui/FigProfileIcon.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/ui/FigProfileIcon.java?view=diff&rev=13619&p1=trunk/src_new/org/argouml/uml/diagram/ui/FigProfileIcon.java&p2=trunk/src_new/org/argouml/uml/diagram/ui/FigProfileIcon.java&r1=13618&r2=13619
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/ui/FigProfileIcon.java	(original)
+++ trunk/src_new/org/argouml/uml/diagram/ui/FigProfileIcon.java	2007-09-27 01:48:23-0700
@@ -25,7 +25,6 @@
 package org.argouml.uml.diagram.ui;

 

 import java.awt.Image;

-import java.beans.PropertyChangeEvent;

 

 import org.tigris.gef.presentation.FigImage;

 import org.tigris.gef.presentation.FigNode;

@@ -64,13 +63,8 @@
 	image.setLocked(true);

     }

     

-    /**

-     * @param x

-     * @param y

-     * @param w

-     * @param h

-     * @see org.tigris.gef.presentation.FigNode#setBoundsImpl(int, int, int, int)

-     */

+

+    @Override

     protected void setBoundsImpl(int x, int y, int w, int h) {

 	int width = Math.max(image.getWidth(), label.getWidth());

 


Modified: trunk/src_new/org/argouml/uml/diagram/ui/FigStereotypesCompartment.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/ui/FigStereotypesCompartment.java?view=diff&rev=13619&p1=trunk/src_new/org/argouml/uml/diagram/ui/FigStereotypesCompartment.java&p2=trunk/src_new/org/argouml/uml/diagram/ui/FigStereotypesCompartment.java&r1=13618&r2=13619
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/ui/FigStereotypesCompartment.java	(original)
+++ trunk/src_new/org/argouml/uml/diagram/ui/FigStereotypesCompartment.java	2007-09-27 01:48:23-0700
@@ -313,6 +313,7 @@
     /*
      * @see org.tigris.gef.presentation.Fig#setBoundsImpl(int, int, int, int)
      */
+    @Override
     protected void setBoundsImpl(int x, int y, int w, int h) {
         Fig fig;
         int yy = y;

Modified: trunk/src_new/org/argouml/uml/diagram/use_case/ui/FigActor.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/use_case/ui/FigActor.java?view=diff&rev=13619&p1=trunk/src_new/org/argouml/uml/diagram/use_case/ui/FigActor.java&p2=trunk/src_new/org/argouml/uml/diagram/use_case/ui/FigActor.java&r1=13618&r2=13619
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/use_case/ui/FigActor.java	(original)
+++ trunk/src_new/org/argouml/uml/diagram/use_case/ui/FigActor.java	2007-09-27 01:48:23-0700
@@ -35,9 +35,6 @@
 import java.util.List;
 import java.util.Vector;
 
-import org.argouml.application.events.ArgoDiagramAppearanceEvent;
-import org.argouml.model.Model;
-import org.argouml.uml.diagram.ui.FigNodeModelElement;
 import org.tigris.gef.base.Selection;
 import org.tigris.gef.graph.GraphModel;
 import org.tigris.gef.presentation.Fig;
@@ -45,6 +42,9 @@
 import org.tigris.gef.presentation.FigLine;
 import org.tigris.gef.presentation.FigRect;
 
+import org.argouml.model.Model;
+import org.argouml.uml.diagram.ui.FigNodeModelElement;
+
 /**
  * Class to display graphics for an Actor in a diagram.
  */
@@ -151,6 +151,7 @@
     /*
      * @see org.tigris.gef.presentation.Fig#makeSelection()
      */
+    @Override
     public Selection makeSelection() {
         return new SelectionActor(this);
     }
@@ -159,6 +160,7 @@
      * @see org.tigris.gef.ui.PopupGenerator#getPopUpActions(
      *         java.awt.event.MouseEvent)
      */
+    @Override
     public Vector getPopUpActions(MouseEvent me) {
         Vector popUpActions = super.getPopUpActions(me);
         // Modifiers ...
@@ -171,6 +173,7 @@
     /*
      * @see org.tigris.gef.presentation.Fig#isResizable()
      */
+    @Override
     public boolean isResizable() {
         return false;
     }
@@ -178,6 +181,7 @@
     /*
      * @see org.tigris.gef.presentation.Fig#getMinimumSize()
      */
+    @Override
     public Dimension getMinimumSize() {
         Dimension nameDim = getNameFig().getMinimumSize();
         int w = Math.max(nameDim.width, 40);
@@ -193,6 +197,7 @@
     /*
      * @see org.tigris.gef.presentation.Fig#setBoundsImpl(int, int, int, int)
      */
+    @Override
     protected void setBoundsImpl(final int x, final int y, 
             final int w, final int h) {
         int middle = x + w / 2;
@@ -246,6 +251,7 @@
     /*
      * @see org.tigris.gef.presentation.FigNode#deepHitPort(int, int)
      */
+    @Override
     public Object deepHitPort(int x, int y) {
         Object o = super.deepHitPort(x, y);
         if (o != null) {
@@ -261,6 +267,7 @@
      * Makes sure that the edges stick to the outline of the fig.
      * @see org.tigris.gef.presentation.Fig#getGravityPoints()
      */
+    @Override
     public List getGravityPoints() {
         final int maxPoints = 20;
         List ret = new ArrayList();
@@ -290,6 +297,7 @@
     /*
      * @see org.argouml.uml.diagram.ui.FigNodeModelElement#modelChanged(java.beans.PropertyChangeEvent)
      */
+    @Override
     protected void modelChanged(PropertyChangeEvent mee) {
         //      name updating
         super.modelChanged(mee);
@@ -312,6 +320,7 @@
         }
     }
 
+    @Override
     protected int getNameFigFontStyle() {
         Object cls = getOwner();
         return Model.getFacade().isAbstract(cls) ? Font.ITALIC : Font.PLAIN;
@@ -347,14 +356,15 @@
          * Makes sure that the edges stick to the outline of the fig.
          * @see org.tigris.gef.presentation.Fig#getGravityPoints()
          */
+        @Override
         public List getGravityPoints() {
             return parent.getGravityPoints();
         }
 
         /**
-         * The serial version - Eclise generated for Rev. 1.40
+         * The serial version - Eclipse generated for Rev. 1.40
          */
         private static final long serialVersionUID = 5973857118854162659L;
     }
 
-} /* end class FigActor */
+}

Modified: trunk/src_new/org/argouml/uml/diagram/use_case/ui/FigUseCase.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/use_case/ui/FigUseCase.java?view=diff&rev=13619&p1=trunk/src_new/org/argouml/uml/diagram/use_case/ui/FigUseCase.java&p2=trunk/src_new/org/argouml/uml/diagram/use_case/ui/FigUseCase.java&r1=13618&r2=13619
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/use_case/ui/FigUseCase.java	(original)
+++ trunk/src_new/org/argouml/uml/diagram/use_case/ui/FigUseCase.java	2007-09-27 01:48:23-0700
@@ -336,6 +336,7 @@
      *
      * @return  The desired text of the default name.
      */
+    @Override
     public String placeString() {
         return "new Use Case";
     }
@@ -349,6 +350,7 @@
      *
      * @return  A new copy of the the current fig.
      */
+    @Override
     public Object clone() {
         FigUseCase figClone = (FigUseCase) super.clone();
         Iterator it = figClone.getFigs().iterator();
@@ -379,6 +381,7 @@
      *
      * @return    A collection of menu items
      */
+    @Override
     public Vector getPopUpActions(MouseEvent me) {
         /* Check if multiple items are selected: */
         boolean ms = TargetManager.getInstance().getTargets().size() > 1;
@@ -427,17 +430,13 @@
      * @return the class name and bounds together with compartment
      * visibility.
      */
+    @Override
     public String classNameAndBounds() {
         return super.classNameAndBounds()
                 + "extensionPointVisible=" + isExtensionPointVisible();
     }
 
-    /**
-     * Returns whether the extension points are currently displayed.<p>
-     *
-     * @return  <code>true</code> if the extensionpoints are visible,
-     *          <code>false</code> otherwise.
-     *
+    /*
      * @see org.argouml.uml.diagram.ExtensionsCompartmentContainer#isExtensionPointVisible()
      */
     public boolean isExtensionPointVisible() {
@@ -497,6 +496,7 @@
      *
      * @return  The new selection object (a GEF entity).
      */
+    @Override
     public Selection makeSelection() {
         return new SelectionUseCase(this);
     }
@@ -510,6 +510,7 @@
      * @return  The dimensions of the smallest size bounding box of the use
      *          case.
      */
+    @Override
     public Dimension getMinimumSize() {
 
         Dimension textSize = getTextSize();
@@ -610,6 +611,7 @@
      *
      * @param h  height of bounding box
      */
+    @Override
     protected void setBoundsImpl(int x, int y, int w, int h) {
 
         // Remember where we are at present, so we can tell GEF later. Then
@@ -751,6 +753,7 @@
      *
      * @param col The colour desired.
      */
+    @Override
     public void setLineColor(Color col) {
         cover.setLineColor(col);
     }
@@ -762,6 +765,7 @@
      *
      * @return  The colour in use.
      */
+    @Override
     public Color getLineColor() {
         return cover.getLineColor();
     }
@@ -773,6 +777,7 @@
      *
      * @param col  The colour desired.
      */
+    @Override
     public void setFillColor(Color col) {
         cover.setFillColor(col);
     }
@@ -784,6 +789,7 @@
      *
      * @return  The colour in use.
      */
+    @Override
     public Color getFillColor() {
         return cover.getFillColor();
     }
@@ -796,6 +802,7 @@
      * @param f  <code>true</code> if the oval is to be filled,
      *           <code>false</code> if not.
      */
+    @Override
     public void setFilled(boolean f) {
         cover.setFilled(f);
     }
@@ -808,6 +815,7 @@
      * @return  <code>true</code> if the oval is to be filled,
      *          <code>false</code> if not.
      */
+    @Override
     public boolean getFilled() {
         return cover.getFilled();
     }
@@ -819,6 +827,7 @@
      *
      * @param w  The line width desired.
      */
+    @Override
     public void setLineWidth(int w) {
         cover.setLineWidth(w);
     }
@@ -830,6 +839,7 @@
      *
      * @return  The line width set.
      */
+    @Override
     public int getLineWidth() {
         return cover.getLineWidth();
     }
@@ -871,6 +881,7 @@
          * @return           The connection point on the boundary of the
          *                   elipse.
          */
+        @Override
         public Point connectionPoint(Point anotherPt) {
             double rx = _w / 2;
             double ry = _h / 2;
@@ -903,6 +914,7 @@
      *
      * @param me  The mouse action that caused us to be invoked.
      */
+    @Override
     public void mousePressed(MouseEvent me) {
 
         // Deal with anything from the parent first
@@ -952,6 +964,7 @@
      *
      * @param me  The mouse action that caused us to be invoked.
      */
+    @Override
     public void mouseClicked(MouseEvent me) {
 	super.mouseClicked(me);
 
@@ -973,6 +986,7 @@
      *
      * @param me  The mouse action that caused us to be invoked.
      */
+    @Override
     public void mouseExited(MouseEvent me) {
         super.mouseExited(me);
         unhighlight();
@@ -994,6 +1008,7 @@
      *
      * {@inheritDoc}
      */
+    @Override
     protected void textEdited(FigText ft) throws PropertyVetoException {
         // Let the parent do anything it wants first (in casu: the usecase name)
         super.textEdited(ft);
@@ -1019,6 +1034,7 @@
      * @see org.argouml.uml.diagram.ui.FigNodeModelElement#textEditStarted(
      *      org.tigris.gef.presentation.FigText)
      */
+    @Override
     protected void textEditStarted(FigText ft) {
         super.textEditStarted(ft);
         if (epVec.getFigs().contains(ft)) {
@@ -1089,6 +1105,7 @@
     /*
      * @see org.argouml.uml.diagram.ui.FigNodeModelElement#modelChanged(java.beans.PropertyChangeEvent)
      */
+    @Override
     protected void modelChanged(PropertyChangeEvent mee) {
 
         // Let our superclass sort itself out first
@@ -1103,6 +1120,7 @@
     /*
      * @see org.argouml.uml.diagram.ui.FigNodeModelElement#updateListeners(java.lang.Object, java.lang.Object)
      */
+    @Override
     protected void updateListeners(Object oldOwner, Object newOwner) {
         if (oldOwner != null) {
             removeAllElementListeners();
@@ -1135,6 +1153,7 @@
     /*
      * @see org.argouml.uml.diagram.ui.FigNodeModelElement#renderingChanged()
      */
+    @Override
     public void renderingChanged() {
         if (getOwner() != null) {
             updateExtensionPoint();
@@ -1243,6 +1262,7 @@
     /*
      * @see org.argouml.uml.diagram.ui.FigNodeModelElement#updateNameText()
      */
+    @Override
     protected void updateNameText() {
         Object useCase = getOwner();
         if (useCase == null) {
@@ -1267,6 +1287,7 @@
      *
      * @see org.tigris.gef.presentation.Fig#getGravityPoints()
      */
+    @Override
     public List getGravityPoints() {
         final int maxPoints = 30;
         List ret = new ArrayList(maxPoints);
@@ -1291,6 +1312,7 @@
     /*
      * @see org.argouml.uml.diagram.ui.FigNodeModelElement#updateStereotypeText()
      */
+    @Override
     protected void updateStereotypeText() {
         super.updateStereotypeText();
         if (getOwner() == null) {
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.