Author: mvw Date: 2008-11-13 23:20:55-0800 New Revision: 16047 Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigAttribute.java trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBox.java trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigOperation.java trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigOperationsCompartment.java
Log: Comments and style only. Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigAttribute.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigAttribute.java?view=diff&rev=16047&p1=trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigAttribute.java&p2=trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigAttribute.java&r1=16046&r2=16047 ============================================================================== --- trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigAttribute.java (original) +++ trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigAttribute.java 2008-11-13 23:20:55-0800 @@ -1,5 +1,5 @@ // $Id$ -// Copyright (c) 2007 The Regents of the University of California. All +// Copyright (c) 2007-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 @@ -39,6 +39,18 @@ */ public class FigAttribute extends FigFeature { + /** + * Constructor for FigAttribute. + * Build a new compartment figText of the given dimensions, within the + * compartment described by <code>aFig</code>. + * + * @param x x + * @param y x + * @param w w + * @param h h + * @param aFig the figure describing the whole compartment + * @param np the notation provider for the text + */ public FigAttribute(int x, int y, int w, int h, Fig aFig, NotationProvider np) { super(x, y, w, h, aFig, np); Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBox.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBox.java?view=diff&rev=16047&p1=trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBox.java&p2=trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBox.java&r1=16046&r2=16047 ============================================================================== --- trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBox.java (original) +++ trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBox.java 2008-11-13 23:20:55-0800 @@ -121,11 +121,13 @@ * Updates the operations box. Called from updateLayout if there is * a model event effecting the attributes and from renderingChanged in all * cases. - * TODO: The above statement means that the entire contents of - * FigOperationsCompartment is being rebuilt whenever a add/remove - * operation reception or reception is detected. It would be better to + * TODO: The above statement means that the entire contents of the + * FigOperationsCompartment is being rebuilt whenever an add/remove + * of an operation or a reception is detected. It would be better to * have FigOperationsCompartment itself listen for add and remove events - * and make minimum change rather than entirely rebuild. + * and make minimum change rather than entirely rebuild. + * Remark MVW: This is a bit exaggerated, since the populate() + * method is already heavily optimised. */ protected void updateOperations() { if (!isOperationsVisible()) { @@ -133,10 +135,7 @@ } operationsFig.populate(); - Rectangle rect = getBounds(); - // ouch ugly but that's for a next refactoring - // TODO: make setBounds, calcBounds and updateBounds consistent - setBounds(rect.x, rect.y, rect.width, rect.height); + setBounds(getBounds()); damage(); } Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigOperation.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigOperation.java?view=diff&rev=16047&p1=trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigOperation.java&p2=trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigOperation.java&r1=16046&r2=16047 ============================================================================== --- trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigOperation.java (original) +++ trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigOperation.java 2008-11-13 23:20:55-0800 @@ -1,5 +1,5 @@ // $Id$ -// Copyright (c) 2006-2007 The Regents of the University of California. All +// Copyright (c) 2006-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 @@ -32,8 +32,8 @@ import org.tigris.gef.presentation.Fig; /** - * Fig with specific knowledge of Operation display. - * Makes the text italic in case the Operation is abstract. + * Fig with specific knowledge of Operation and Reception display. + * Makes the text italic in case the Operation or Reception is abstract. * * @since 0.23.5 * @author Bob Tarling @@ -90,7 +90,8 @@ } /* - * If the Operation is abstract, then the text will be set to italics. + * If the Operation/Reception is abstract, + * then the text will be set to italics. */ @Override protected int getFigFontStyle() { Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigOperationsCompartment.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigOperationsCompartment.java?view=diff&rev=16047&p1=trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigOperationsCompartment.java&p2=trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigOperationsCompartment.java&r1=16046&r2=16047 ============================================================================== --- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigOperationsCompartment.java (original) +++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigOperationsCompartment.java 2008-11-13 23:20:55-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 @@ -37,6 +37,8 @@ import org.tigris.gef.presentation.Fig; /** + * The compartment that contains Operations and/or Receptions. + * * @author Bob Tarling */ public class FigOperationsCompartment extends FigEditableCompartment { @@ -78,7 +80,8 @@ } /* - * @see org.argouml.uml.diagram.ui.FigEditableCompartment#createFeature() + * By default, when double-clicking on the compartment, + * we create an Operation (not a Reception). */ protected void createModelElement() { Object classifier = getGroup().getOwner(); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
