svn commit: r16477 - trunk/src/argouml-app/src/org/argouml/uml/diagram: deployment/ui static_structure/ui ui

Tom Morris <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2008-12-30 15:37:50-0800
New Revision: 16477

Modified:
   trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigComponent.java
   trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigNode.java
   trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigComponent.java
   trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigComponentInstance.java
   trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigMNode.java
   trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigNodeInstance.java
   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/FigEnumeration.java
   trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java
   trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigMessage.java
   trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeAssociation.java

Log:
Issue 5500: Update rest of figs for Class Diagram

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigComponent.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigComponent.java?view=diff&pathrev=16477&r1=16476&r2=16477
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigComponent.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigComponent.java	2008-12-30 15:37:50-0800
@@ -34,6 +34,7 @@
 import org.argouml.model.AssociationChangeEvent;
 import org.argouml.model.AttributeChangeEvent;
 import org.argouml.model.Model;
+import org.argouml.uml.diagram.DiagramSettings;
 import org.argouml.uml.diagram.ui.FigNodeModelElement;
 import org.tigris.gef.graph.GraphModel;
 import org.tigris.gef.presentation.FigRect;
@@ -66,9 +67,18 @@
 
     /**
      * The constructor.
+     * 
+     * @deprecated by for 0.27.4 by tfmorris. Use
+     *        {@link #AbstractFigComponent(Object, Rectangle, DiagramSettings)}.
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public AbstractFigComponent() {
         super();
+        initFigs();
+    }
+
+    private void initFigs() {
         cover = new FigRect(BX, 10, DEFAULT_WIDTH, DEFAULT_HEIGHT, Color.black,
                 Color.white);
         upperRect = new FigRect(0, 2 * FINGER_HEIGHT, 
@@ -91,12 +101,31 @@
     }
     
     /**
+     * Construct a new AbstractFigComponent.
+     * 
+     * @param owner owning UML element
+     * @param bounds position and size
+     * @param settings render settings
+     */
+    public AbstractFigComponent(Object owner, Rectangle bounds,
+            DiagramSettings settings) {
+        super(owner, bounds, settings);
+        initFigs();
+    }
+    
+    /**
      * The constructor that hooks the Fig into an existing UML element.
      *
      * @param gm ignored
      * @param node the UML element
+     * 
+     * @deprecated by for 0.27.4 by tfmorris. Use
+     *        {@link #AbstractFigComponent(Object, Rectangle, DiagramSettings)}.
      */
-    public AbstractFigComponent(GraphModel gm, Object node) {
+    @SuppressWarnings("deprecation")
+    @Deprecated
+    public AbstractFigComponent(@SuppressWarnings("unused") GraphModel gm,
+            Object node) {
         this();
         setOwner(node);
     }

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigNode.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigNode.java?view=diff&pathrev=16477&r1=16476&r2=16477
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigNode.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigNode.java	2008-12-30 15:37:50-0800
@@ -39,6 +39,8 @@
 import org.argouml.model.AssociationChangeEvent;
 import org.argouml.model.AttributeChangeEvent;
 import org.argouml.model.Model;
+import org.argouml.uml.diagram.DiagramSettings;
+import org.argouml.uml.diagram.ui.ArgoFig;
 import org.argouml.uml.diagram.ui.FigEdgeModelElement;
 import org.argouml.uml.diagram.ui.FigNodeModelElement;
 import org.tigris.gef.base.Geometry;
@@ -73,16 +75,24 @@
 
     /**
      * Constructor.
+     * @deprecated by for 0.27.4 by tfmorris. Use
+     *             {@link #AbstractFigNode(Object, Rectangle, DiagramSettings)}.
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public AbstractFigNode() {
         super();
+        initFigs();
+    }
+
+    private void initFigs() {
         setBigPort(new CubePortFigRect(DEFAULT_X, DEFAULT_Y - DEPTH, 
                 DEFAULT_WIDTH + DEPTH, 
                 DEFAULT_HEIGHT + DEPTH, DEPTH));
         getBigPort().setFilled(false);
         getBigPort().setLineWidth(0);
-        cover = new FigCube(DEFAULT_X, DEFAULT_Y, 
-                DEFAULT_WIDTH, DEFAULT_HEIGHT, Color.black, Color.white);
+        cover = new FigCube(DEFAULT_X, DEFAULT_Y, DEFAULT_WIDTH,
+                DEFAULT_HEIGHT, ArgoFig.LINE_COLOR, ArgoFig.FILL_COLOR);
 
         getNameFig().setLineWidth(0);
         getNameFig().setFilled(false);
@@ -99,8 +109,13 @@
      * 
      * @param gm the graphmodel
      * @param node the UML element
+     * @deprecated by for 0.27.4 by tfmorris. Use
+     *             {@link #AbstractFigNode(Object, Rectangle, DiagramSettings)}.
      */
-    public AbstractFigNode(GraphModel gm, Object node) {
+    @SuppressWarnings("deprecation")
+    @Deprecated
+    public AbstractFigNode(@SuppressWarnings("unused") GraphModel gm, 
+            Object node) {
         this();
         setOwner(node);
         if (Model.getFacade().isAClassifier(node)
@@ -118,11 +133,28 @@
      * @param element ModelElement associated with figure
      * @param x horizontal location
      * @param y vertical location
+     * @deprecated by for 0.27.4 by tfmorris. Use
+     *             {@link #AbstractFigNode(Object, Rectangle, DiagramSettings)}.
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public AbstractFigNode(Object element, int x, int y) {
         super(element, x, y);
     }
 
+    /**
+     * Construct a new AbstractFigNode.
+     * 
+     * @param owner owning UML element
+     * @param bounds position and size
+     * @param settings render settings
+     */
+    public AbstractFigNode(Object owner, Rectangle bounds,
+            DiagramSettings settings) {
+        super(owner, bounds, settings);
+        initFigs();
+    }
+    
     @Override
     public Object clone() {
         AbstractFigNode figClone = (AbstractFigNode) super.clone();
@@ -205,7 +237,7 @@
     @Override
     public void mouseClicked(MouseEvent me) {
         super.mouseClicked(me);
-        setLineColor(Color.black);
+        setLineColor(ArgoFig.LINE_COLOR);
     }
 
     @Override

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigComponent.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigComponent.java?view=diff&pathrev=16477&r1=16476&r2=16477
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigComponent.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigComponent.java	2008-12-30 15:37:50-0800
@@ -24,6 +24,7 @@
 
 package org.argouml.uml.diagram.deployment.ui;
 
+import java.awt.Rectangle;
 import java.awt.event.MouseEvent;
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -31,6 +32,7 @@
 import java.util.Vector;
 
 import org.argouml.model.Model;
+import org.argouml.uml.diagram.DiagramSettings;
 import org.argouml.uml.diagram.ui.FigEdgeModelElement;
 import org.tigris.gef.base.Selection;
 import org.tigris.gef.graph.GraphModel;
@@ -43,23 +45,45 @@
  * @author 5eichler
  */
 public class FigComponent extends AbstractFigComponent {
+    
     /**
      * Constructor.
+     * 
+     * @deprecated by for 0.27.4 by tfmorris. Use
+     *             {@link #FigComponent(Object, Rectangle, DiagramSettings)}.
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public FigComponent() {
         super();
     }
 
     /**
      * The constructor that hooks the Fig into an existing UML element.
-     *
+     * 
      * @param gm ignored
      * @param node the UML element
+     * @deprecated by for 0.27.4 by tfmorris. Use
+     *             {@link #FigComponent(Object, Rectangle, DiagramSettings)}.
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public FigComponent(GraphModel gm, Object node) {
         super(gm, node);
     }
 
+    /**
+     * Construct a new FigComponent.
+     * 
+     * @param owner owning UML element
+     * @param bounds position and size
+     * @param settings render settings
+     */
+    public FigComponent(Object owner, Rectangle bounds,
+            DiagramSettings settings) {
+        super(owner, bounds, settings);
+    }
+    
     @Override
     protected void textEditStarted(FigText ft) {
         if (ft == getNameFig()) {

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigComponentInstance.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigComponentInstance.java?view=diff&pathrev=16477&r1=16476&r2=16477
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigComponentInstance.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigComponentInstance.java	2008-12-30 15:37:50-0800
@@ -24,7 +24,7 @@
 
 package org.argouml.uml.diagram.deployment.ui;
 
-import java.awt.Color;
+import java.awt.Rectangle;
 import java.awt.event.MouseEvent;
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -32,6 +32,8 @@
 
 import org.argouml.model.Model;
 import org.argouml.notation.NotationProviderFactory2;
+import org.argouml.uml.diagram.DiagramSettings;
+import org.argouml.uml.diagram.ui.ArgoFig;
 import org.argouml.uml.diagram.ui.FigEdgeModelElement;
 import org.tigris.gef.base.Editor;
 import org.tigris.gef.base.Globals;
@@ -48,7 +50,11 @@
 
     /**
      * Construct a default ComponentInstance figure.
+     * @deprecated by for 0.27.4 by tfmorris.  Use 
+     *       {@link #FigComponentInstance(Object, Rectangle, DiagramSettings)}.
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public FigComponentInstance() {
         super();
         getNameFig().setUnderline(true);
@@ -59,11 +65,29 @@
      *
      * @param gm ignored
      * @param node the UML element
+     * @deprecated by for 0.27.4 by tfmorris.  Use 
+     *       {@link #FigComponentInstance(Object, Rectangle, DiagramSettings)}.
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public FigComponentInstance(GraphModel gm, Object node) {
         super(gm, node);
         getNameFig().setUnderline(true);
     }
+    
+    
+    /**
+     * Construct a new FigComponentInstance.
+     * 
+     * @param owner owning UML element
+     * @param bounds position and size
+     * @param settings render settings
+     */
+    public FigComponentInstance(Object owner, Rectangle bounds,
+            DiagramSettings settings) {
+        super(owner, bounds, settings);
+        getNameFig().setUnderline(true);
+    }
 
     @Override
     protected int getNotationProviderType() {
@@ -109,7 +133,7 @@
     public void mouseClicked(MouseEvent me) {
         super.mouseClicked(me);
         // TODO: What is this needed for? - tfm
-        setLineColor(Color.black);
+        setLineColor(ArgoFig.LINE_COLOR);
     }
 
     /*

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigMNode.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigMNode.java?view=diff&pathrev=16477&r1=16476&r2=16477
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigMNode.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigMNode.java	2008-12-30 15:37:50-0800
@@ -24,9 +24,11 @@
 
 package org.argouml.uml.diagram.deployment.ui;
 
+import java.awt.Rectangle;
 import java.awt.event.MouseEvent;
 import java.util.Vector;
 
+import org.argouml.uml.diagram.DiagramSettings;
 import org.tigris.gef.graph.GraphModel;
 import org.tigris.gef.presentation.FigText;
 
@@ -39,21 +41,42 @@
 
     /**
      * Main constructor - only directly used for file loading.
+     * @deprecated by for 0.27.4 by tfmorris. Use
+     *             {@link #FigMNode(Object, Rectangle, DiagramSettings)}.
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public FigMNode() {
         super();
     }
 
     /**
      * Construct a FigMNode based on an existing UML Node element.
-     *
+     * 
      * @param gm ignored
      * @param node the UML element
+     * @deprecated by for 0.27.4 by tfmorris. Use
+     *             {@link #FigMNode(Object, Rectangle, DiagramSettings)}.
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public FigMNode(GraphModel gm, Object node) {
         super(gm, node);
     }
 
+    
+    /**
+     * Construct a new FigMNode.
+     * 
+     * @param owner owning UML element
+     * @param bounds position and size
+     * @param settings render settings
+     */
+    public FigMNode(Object owner, Rectangle bounds,
+            DiagramSettings settings) {
+        super(owner, bounds, settings);
+    }
+    
     @Override
     protected void textEditStarted(FigText ft) {
         if (ft == getNameFig()) {

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigNodeInstance.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigNodeInstance.java?view=diff&pathrev=16477&r1=16476&r2=16477
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigNodeInstance.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/FigNodeInstance.java	2008-12-30 15:37:50-0800
@@ -24,11 +24,13 @@
 
 package org.argouml.uml.diagram.deployment.ui;
 
+import java.awt.Rectangle;
 import java.util.ArrayList;
 import java.util.Collection;
 
 import org.argouml.model.Model;
 import org.argouml.notation.NotationProviderFactory2;
+import org.argouml.uml.diagram.DiagramSettings;
 import org.argouml.uml.diagram.ui.FigEdgeModelElement;
 import org.tigris.gef.base.Selection;
 import org.tigris.gef.graph.GraphModel;
@@ -42,8 +44,12 @@
 public class FigNodeInstance extends AbstractFigNode {
 
     /**
-     * Main constructor - used for file loading.
+     * Constructor
+     * @deprecated by for 0.27.4 by tfmorris. Use
+     *             {@link #FigNodeInstance(Object, Rectangle, DiagramSettings)}.
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public FigNodeInstance() {
         super();
         getNameFig().setUnderline(true);
@@ -51,15 +57,33 @@
 
     /**
      * Constructor which hooks the new Fig into an existing UML element.
-     *
+     * 
      * @param gm ignored
      * @param node the UML element
+     * @deprecated by for 0.27.4 by tfmorris. Use
+     *             {@link #FigNodeInstance(Object, Rectangle, DiagramSettings)}.
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public FigNodeInstance(GraphModel gm, Object node) {
         super(gm, node);
         getNameFig().setUnderline(true);
     }
 
+    
+    /**
+     * Construct a new FigNodeInstance.
+     * 
+     * @param owner owning UML element
+     * @param bounds position and size
+     * @param settings render settings
+     */
+    public FigNodeInstance(Object owner, Rectangle bounds,
+            DiagramSettings settings) {
+        super(owner, bounds, settings);
+        getNameFig().setUnderline(true);
+    }
+    
     @Override
     protected int getNotationProviderType() {
         return NotationProviderFactory2.TYPE_NODEINSTANCE;

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=16477&r1=16476&r2=16477
==============================================================================
--- 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	2008-12-30 15:37:50-0800
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 1996-2007 The Regents of the University of California. All
+// Copyright (c) 1996-2008 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
@@ -31,6 +31,7 @@
 
 import org.argouml.model.Model;
 import org.argouml.notation.NotationProviderFactory2;
+import org.argouml.uml.diagram.DiagramSettings;
 import org.argouml.uml.diagram.ui.FigNodeModelElement;
 import org.tigris.gef.base.Selection;
 import org.tigris.gef.graph.GraphModel;
@@ -49,8 +50,17 @@
 
     /**
      * Main constructor.
+     * @deprecated by for 0.27.4 by tfmorris. Use
+     *             {@link #FigObject(Object, Rectangle, DiagramSettings)}.
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public FigObject() {
+        super();
+        initFigs();
+    }
+
+    private void initFigs() {
         setBigPort(new FigRect(X0, Y0, 90, 50, Color.cyan, Color.cyan));
         cover = new FigRect(X0, Y0, 90, 50, Color.black, Color.white);
         getNameFig().setLineWidth(0);
@@ -70,15 +80,32 @@
 
     /**
      * Constructor that hooks the Fig to an existing UML element.
-     *
+     * 
      * @param gm ignored
      * @param node the UML element
+     * @deprecated by for 0.27.4 by tfmorris. Use
+     *             {@link #FigObject(Object, Rectangle, DiagramSettings)}.
      */
-    public FigObject(GraphModel gm, Object node) {
+    @SuppressWarnings("deprecation")
+    @Deprecated
+    public FigObject(@SuppressWarnings("unused") GraphModel gm, Object node) {
         this();
         setOwner(node);
     }
 
+    
+    /**
+     * Construct a new FigObject.
+     * 
+     * @param owner owning UML element
+     * @param bounds position and size
+     * @param settings render settings
+     */
+    public FigObject(Object owner, Rectangle bounds, DiagramSettings settings) {
+        super(owner, bounds, settings);
+        initFigs();
+    }
+    
     /*
      * @see org.argouml.uml.diagram.ui.FigNodeModelElement#getNotationProviderType()
      */

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEnumeration.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEnumeration.java?view=diff&pathrev=16477&r1=16476&r2=16477
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEnumeration.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEnumeration.java	2008-12-30 15:37:50-0800
@@ -36,6 +36,7 @@
 import org.argouml.model.AttributeChangeEvent;
 import org.argouml.model.Model;
 import org.argouml.ui.ArgoJMenu;
+import org.argouml.uml.diagram.DiagramSettings;
 import org.argouml.uml.diagram.ui.EnumLiteralsCompartmentContainer;
 import org.argouml.uml.diagram.ui.FigEnumLiteralsCompartment;
 import org.argouml.uml.diagram.ui.FigStereotypesGroup;
@@ -63,7 +64,11 @@
 
     /**
      * Main constructor for a {@link FigEnumeration}.
+     * @deprecated by for 0.27.4 by tfmorris. Use
+     *             {@link #FigEnumeration(Object, Rectangle, DiagramSettings)}.
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public FigEnumeration() {
         super();
         FigStereotypesGroup fsc = getStereotypeFig();
@@ -76,15 +81,20 @@
         setBounds(getBounds());
     }
 
+
     /**
-     * Constructor for use if this figure is created for an
-     * existing interface node in the metamodel.
-     *
-     * @param gm   Not actually used in the current implementation
-     *
+     * Constructor for use if this figure is created for an existing interface
+     * node in the metamodel.
+     * 
+     * @param gm Not actually used in the current implementation
      * @param node The UML object being placed.
+     * @deprecated by for 0.27.4 by tfmorris. Use
+     *             {@link #FigEnumeration(Object, Rectangle, DiagramSettings)}.
      */
-    public FigEnumeration(GraphModel gm, Object node) {
+    @SuppressWarnings("deprecation")
+    @Deprecated
+    public FigEnumeration(@SuppressWarnings("unused") GraphModel gm, 
+            Object node) {
         this();
         enableSizeChecking(true);
         setEnumLiteralsVisible(true);
@@ -93,6 +103,29 @@
         setBounds(getBounds());
     }
 
+
+    /**
+     * Construct a new AbstractFigComponent.
+     * 
+     * @param owner owning UML element
+     * @param bounds position and size
+     * @param settings render settings
+     */
+    public FigEnumeration(Object owner, Rectangle bounds,
+            DiagramSettings settings) {
+        super(owner, bounds, settings);
+        getStereotypeFig().setKeyword("enumeration");
+
+        enableSizeChecking(true);
+        setSuppressCalcBounds(false);
+
+        addFig(getLiteralsCompartment()); // This creates the compartment.
+        setEnumLiteralsVisible(true);
+        literalsCompartment.populate();
+
+        setBounds(getBounds());
+    }
+    
     /*
      * @see org.argouml.uml.diagram.static_structure.ui.FigDataType#makeSelection()
      */
@@ -141,7 +174,7 @@
     @Override
     public void renderingChanged() {
         super.renderingChanged();
-               if (getOwner() != null) {
+        if (getOwner() != null) {
             updateEnumLiterals();
         }
     }

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java?view=diff&pathrev=16477&r1=16476&r2=16477
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java	2008-12-30 15:37:50-0800
@@ -666,7 +666,7 @@
         DiagramSettings settings = getDiagramSettings();
         
         if (Model.getFacade().isAAssociation(droppedObject)) {
-            figNode = new FigNodeAssociation(gm, droppedObject);
+            figNode = new FigNodeAssociation(droppedObject, bounds, settings);
         } else if (Model.getFacade().isAClass(droppedObject)) {
             figNode = new FigClass(droppedObject, bounds, settings);
         } else if (Model.getFacade().isAInterface(droppedObject)) {
@@ -680,7 +680,7 @@
         } else if (Model.getFacade().isAComment(droppedObject)) {
             figNode = new FigComment(droppedObject, bounds, settings);
         } else if (Model.getFacade().isAEnumeration(droppedObject)) {
-            figNode = new FigEnumeration(gm, droppedObject);
+            figNode = new FigEnumeration(droppedObject, bounds, settings);
         } else if (Model.getFacade().isADataType(droppedObject)) {
             figNode = new FigDataType(droppedObject, bounds, settings);
         } else if (Model.getFacade().isAStereotype(droppedObject)) {
@@ -695,15 +695,15 @@
         } else if (Model.getFacade().isAUseCase(droppedObject)) {
             figNode = new FigUseCase(droppedObject, bounds, settings);
         } else if (Model.getFacade().isAObject(droppedObject)) {
-            figNode = new FigObject(gm, droppedObject);
+            figNode = new FigObject(droppedObject, bounds, settings);
         } else if (Model.getFacade().isANodeInstance(droppedObject)) {
-            figNode = new FigNodeInstance(gm, droppedObject);
+            figNode = new FigNodeInstance(droppedObject, bounds, settings);
         } else if (Model.getFacade().isAComponentInstance(droppedObject)) {
-            figNode = new FigComponentInstance(gm, droppedObject);
+            figNode = new FigComponentInstance(droppedObject, bounds, settings);
         } else if (Model.getFacade().isANode(droppedObject)) {
-            figNode = new FigMNode(gm, droppedObject);
+            figNode = new FigMNode(droppedObject, bounds, settings);
         } else if (Model.getFacade().isAComponent(droppedObject)) {
-            figNode = new FigComponent(gm, droppedObject);
+            figNode = new FigComponent(droppedObject, bounds, settings);
         }
         
         if (figNode != null) {

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigMessage.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigMessage.java?view=diff&pathrev=16477&r1=16476&r2=16477
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigMessage.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigMessage.java	2008-12-30 15:37:50-0800
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 1996-2007 The Regents of the University of California. All
+// Copyright (c) 1996-2008 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
@@ -34,6 +34,7 @@
 
 import org.argouml.model.Model;
 import org.argouml.notation.NotationProviderFactory2;
+import org.argouml.uml.diagram.DiagramSettings;
 import org.argouml.uml.diagram.collaboration.ui.FigAssociationRole;
 import org.tigris.gef.base.Layer;
 import org.tigris.gef.graph.GraphModel;
@@ -65,8 +66,21 @@
 
     /**
      * The main constructor.
+     * @deprecated for 0.27.4 by tfmorris.
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public FigMessage() {
+        super();
+        
+        initFigs();
+        initArrows();
+
+	Rectangle r = getBounds();
+	setBounds(r.x, r.y, r.width, r.height);
+    }
+
+    private void initFigs() {
         setShadowSize(0); // Issue 2714.
 	getNameFig().setLineWidth(0);
 	getNameFig().setReturnAction(FigText.END_EDITING);
@@ -82,33 +96,52 @@
 	figPoly.setPolygon(polygon);
 	figPoly.setBounds(100, 10, 5, 18);
 
-	arrowDirections = new Vector<String>(4);
-        arrowDirections.add(SOUTH, "South");
-        arrowDirections.add(EAST, "East");
-        arrowDirections.add(WEST, "West");
-        arrowDirections.add(NORTH, "North");
-
         getBigPort().setFilled(false);
         getBigPort().setLineWidth(0);
 	// add Figs to the FigNode in back-to-front order
         addFig(getBigPort());
 	addFig(getNameFig());
 	addFig(figPoly);
+    }
 
-	Rectangle r = getBounds();
-	setBounds(r.x, r.y, r.width, r.height);
+    private void initArrows() {
+        arrowDirections = new Vector<String>(4);
+        arrowDirections.add(SOUTH, "South");
+        arrowDirections.add(EAST, "East");
+        arrowDirections.add(WEST, "West");
+        arrowDirections.add(NORTH, "North");
     }
 
     /**
+     * Construct a FigMessage.
+     * 
+     * @param owner owning UML element
+     * @param bounds position and size
+     * @param settings render settings
+     */
+    public FigMessage(Object owner, Rectangle bounds, 
+            DiagramSettings settings) {
+        super(owner, bounds, settings);
+        initArrows();
+        initFigs();
+        // TODO: Do we need the setBounds(getBounds()) hack here?
+    }
+    
+    /**
      * The constructor that hooks the Fig into an existing UML element
      * @param gm ignored
      * @param lay the layer
      * @param node the UML element
+     * @deprecated for 0.27.4 by tfmorris.  Use 
+     * {@link #FigMessage(Object, Rectangle, DiagramSettings)}.
      */
-    public FigMessage(GraphModel gm, Layer lay, Object node) {
-	this();
-	setLayer(lay);
-	setOwner(node);
+    @SuppressWarnings("deprecation")
+    @Deprecated
+    public FigMessage(@SuppressWarnings("unused") GraphModel gm, Layer lay,
+            Object node) {
+        this();
+        setLayer(lay);
+        setOwner(node);
     }
 
     /*
@@ -289,9 +322,10 @@
 
         int ht = 0;
 
-        if (nameMin.height > figPoly.getHeight())
+        if (nameMin.height > figPoly.getHeight()) {
             ht = (nameMin.height - figPoly.getHeight()) / 2;
-
+        }
+        
         getNameFig().setBounds(x, y, w - figPoly.getWidth(), nameMin.height);
         getBigPort().setBounds(x, y, w - figPoly.getWidth(), nameMin.height);
         figPoly.setBounds(x + getNameFig().getWidth(), y + ht,
@@ -455,8 +489,9 @@
                 }
                 if (Model.getFacade().isASendAction(act)) {
                     Object sig = Model.getFacade().getSignal(act);
-                    if (sig != null)
+                    if (sig != null) {
                         Model.getPump().removeModelEventListener(this, sig);
+                    }
                     Model.getPump().addModelEventListener(this, sig);
                 }
             }
@@ -470,12 +505,16 @@
      */
     protected void updateArrow() {
   	Object mes = getOwner(); // Message
-	if (mes == null || getLayer() == null) return;
+	if (mes == null || getLayer() == null) {
+	    return;
+	}
 	Object sender = Model.getFacade().getSender(mes); // ClassifierRole
 	Object receiver = Model.getFacade().getReceiver(mes); // ClassifierRole
 	Fig senderPort = getLayer().presentationFor(sender);
 	Fig receiverPort = getLayer().presentationFor(receiver);
-	if (senderPort == null || receiverPort == null) return;
+	if (senderPort == null || receiverPort == null) {
+	    return;
+	}
 	int sx = senderPort.getX();
 	int sy = senderPort.getY();
 	int rx = receiverPort.getX();

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeAssociation.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeAssociation.java?view=diff&pathrev=16477&r1=16476&r2=16477
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeAssociation.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeAssociation.java	2008-12-30 15:37:50-0800
@@ -34,6 +34,7 @@
 import org.argouml.model.Model;
 import org.argouml.model.RemoveAssociationEvent;
 import org.argouml.model.UmlChangeEvent;
+import org.argouml.uml.diagram.DiagramSettings;
 import org.tigris.gef.base.LayerPerspective;
 import org.tigris.gef.graph.GraphEdgeRenderer;
 import org.tigris.gef.graph.GraphModel;
@@ -60,8 +61,17 @@
 
     /**
      * The constructor.
+     * @deprecated by for 0.27.4 by tfmorris. Use
+     *          {@link #FigNodeAssociation(Object, Rectangle, DiagramSettings)}
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public FigNodeAssociation() {
+        super();
+        initFigs();
+    }
+
+    private void initFigs() {
         setEditable(false);
         setBigPort(new FigDiamond(0, 0, 70, 70, Color.cyan, Color.cyan));
         head = new FigDiamond(0, 0, 70, 70, Color.black, Color.white);
@@ -81,7 +91,7 @@
         addFig(getNameFig());
         addFig(getStereotypeFig());
 
-        setBlinkPorts(false); //make port invisble unless mouse enters
+        setBlinkPorts(false); //make port invisible unless mouse enters
         Rectangle r = getBounds();
         setBounds(r);
         setResizable(true);
@@ -89,18 +99,38 @@
 
     /**
      * The constructor.
-     *
+     * 
      * @param gm the graphmodel
      * @param node the owner (UML association)
+     * @deprecated by for 0.27.4 by tfmorris. Use
+     *          {@link #FigNodeAssociation(Object, Rectangle, DiagramSettings)}
      */
-    public FigNodeAssociation(GraphModel gm, Object node) {
+    @SuppressWarnings("deprecation")
+    @Deprecated
+    public FigNodeAssociation(@SuppressWarnings("unused") GraphModel gm, 
+            Object node) {
         this();
         setOwner(node);
     }
+    
+    
+    /**
+     * Construct a new FigNodeAssociation.
+     * 
+     * @param owner owning UML element
+     * @param bounds position and size
+     * @param settings render settings
+     */
+    public FigNodeAssociation(Object owner, Rectangle bounds,
+            DiagramSettings settings) {
+        super(owner, bounds, settings);
+        initFigs();
+    }
 
     /*
      * @see java.lang.Object#clone()
      */
+    @Override
     public Object clone() {
         FigNodeAssociation figClone = (FigNodeAssociation) super.clone();
         Iterator it = figClone.getFigs().iterator();
@@ -117,6 +147,7 @@
      *
      * @param mee the event
      */
+    @Override
     protected void updateLayout(UmlChangeEvent mee) {
         super.updateLayout(mee);
         if (mee.getSource() == getOwner()
@@ -186,6 +217,7 @@
      * Makes sure that the edges stick to the outline of the fig.
      * @see org.tigris.gef.presentation.Fig#getGravityPoints()
      */
+    @Override
     public List getGravityPoints() {
         return getBigPort().getGravityPoints();
     }
@@ -193,6 +225,7 @@
     /*
      * @see org.tigris.gef.presentation.Fig#setLineColor(java.awt.Color)
      */
+    @Override
     public void setLineColor(Color col) {
         head.setLineColor(col);
     }
@@ -200,6 +233,7 @@
     /*
      * @see org.tigris.gef.presentation.Fig#getLineColor()
      */
+    @Override
     public Color getLineColor() {
         return head.getLineColor();
     }
@@ -207,6 +241,7 @@
     /*
      * @see org.tigris.gef.presentation.Fig#setFillColor(java.awt.Color)
      */
+    @Override
     public void setFillColor(Color col) {
         head.setFillColor(col);
     }
@@ -214,6 +249,7 @@
     /*
      * @see org.tigris.gef.presentation.Fig#getFillColor()
      */
+    @Override
     public Color getFillColor() {
         return head.getFillColor();
     }
@@ -221,9 +257,11 @@
     /*
      * @see org.tigris.gef.presentation.Fig#setFilled(boolean)
      */
+    @Override
     public void setFilled(boolean f) {
     }
 
+    @Override
     public boolean isFilled() {
         return true;
     }
@@ -231,6 +269,7 @@
     /*
      * @see org.tigris.gef.presentation.Fig#setLineWidth(int)
      */
+    @Override
     public void setLineWidth(int w) {
         head.setLineWidth(w);
     }
@@ -238,10 +277,12 @@
     /*
      * @see org.tigris.gef.presentation.Fig#getLineWidth()
      */
+    @Override
     public int getLineWidth() {
         return head.getLineWidth();
     }
 
+    @Override
     protected void setStandardBounds(int x, int y, int w, int h) {
         Rectangle oldBounds = getBounds();
 
@@ -320,8 +361,5 @@
         super.removeFromDiagramImpl();
     }
 
-    
-
-} /* end class FigNodeAssociation */
-
+}

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

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.