Author: mvw Date: 2008-02-13 10:43:56-0800 New Revision: 14114 Modified: trunk/src/app/src/org/argouml/uml/diagram/state/ui/FigFinalState.java trunk/src/app/src/org/argouml/uml/diagram/state/ui/FigInitialState.java
Log: Fix for issue 4947 as provided by Lukas Degener. This corrects the loading of FigInitialState and FigFinalState. Modified: trunk/src/app/src/org/argouml/uml/diagram/state/ui/FigFinalState.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/uml/diagram/state/ui/FigFinalState.java?view=diff&rev=14114&p1=trunk/src/app/src/org/argouml/uml/diagram/state/ui/FigFinalState.java&p2=trunk/src/app/src/org/argouml/uml/diagram/state/ui/FigFinalState.java&r1=14113&r2=14114 ============================================================================== --- trunk/src/app/src/org/argouml/uml/diagram/state/ui/FigFinalState.java (original) +++ trunk/src/app/src/org/argouml/uml/diagram/state/ui/FigFinalState.java 2008-02-13 10:43:56-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 @@ -25,6 +25,7 @@ package org.argouml.uml.diagram.state.ui; import java.awt.Color; +import java.awt.Rectangle; import java.awt.event.MouseEvent; import java.util.Iterator; import java.util.List; @@ -217,4 +218,23 @@ return getCircleGravityPoints(); } + /** + * Override setBounds to keep shapes looking right. + * [EMAIL PROTECTED] + */ + @Override + protected void setStandardBounds(int x, int y, int w, int h) { + if (getNameFig() == null) { + return; + } + Rectangle oldBounds = getBounds(); + + getBigPort().setBounds(x, y, w, h); + inCircle.setBounds(x + 5, y + 5, w - 10, h - 10); + + calcBounds(); //_x = x; _y = y; _w = w; _h = h; + updateEdges(); + firePropChange("bounds", oldBounds, getBounds()); + } + } Modified: trunk/src/app/src/org/argouml/uml/diagram/state/ui/FigInitialState.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/uml/diagram/state/ui/FigInitialState.java?view=diff&rev=14114&p1=trunk/src/app/src/org/argouml/uml/diagram/state/ui/FigInitialState.java&p2=trunk/src/app/src/org/argouml/uml/diagram/state/ui/FigInitialState.java&r1=14113&r2=14114 ============================================================================== --- trunk/src/app/src/org/argouml/uml/diagram/state/ui/FigInitialState.java (original) +++ trunk/src/app/src/org/argouml/uml/diagram/state/ui/FigInitialState.java 2008-02-13 10:43:56-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 @@ -25,6 +25,7 @@ package org.argouml.uml.diagram.state.ui; import java.awt.Color; +import java.awt.Rectangle; import java.awt.event.MouseEvent; import java.util.Collection; import java.util.Iterator; @@ -214,5 +215,23 @@ public List getGravityPoints() { return getCircleGravityPoints(); } - + + /** + * Override setBounds to keep shapes looking right. + * [EMAIL PROTECTED] + */ + @Override + protected void setStandardBounds(int x, int y, int w, int h) { + if (getNameFig() == null) { + return; + } + Rectangle oldBounds = getBounds(); + + + getBigPort().setBounds(x, y, w, h); + head.setBounds(x, y, w, h); + calcBounds(); //_x = x; _y = y; _w = w; _h = h; + updateEdges(); + firePropChange("bounds", oldBounds, getBounds()); + } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
