Author: bobtarling Date: 2011-04-26 12:59:15-0700 New Revision: 19280 Modified: trunk/src/argouml-core-diagrams-activity2/src/org/argouml/activity2/diagram/FigBasePresentation.java
Log: No longer need a property change event Modified: trunk/src/argouml-core-diagrams-activity2/src/org/argouml/activity2/diagram/FigBasePresentation.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-activity2/src/org/argouml/activity2/diagram/FigBasePresentation.java?view=diff&pathrev=19280&r1=19279&r2=19280 ============================================================================== --- trunk/src/argouml-core-diagrams-activity2/src/org/argouml/activity2/diagram/FigBasePresentation.java (original) +++ trunk/src/argouml-core-diagrams-activity2/src/org/argouml/activity2/diagram/FigBasePresentation.java 2011-04-26 12:59:15-0700 @@ -16,7 +16,6 @@ import java.awt.Color; import java.awt.Dimension; import java.awt.Rectangle; -import java.beans.PropertyChangeEvent; import org.argouml.notation2.NotationType; import org.argouml.uml.diagram.DiagramSettings; @@ -66,36 +65,6 @@ return border; } - public void propertyChange(PropertyChangeEvent pce) { - if (pce.getSource() == getNameDisplay() - && pce.getPropertyName().equals("bounds")) { - // The size of the name has changed. Check if we need to make the - // node bigger so that it contains all its children. - Rectangle textBounds = (Rectangle) pce.getNewValue(); - Rectangle thisBounds = getBounds(); - int notationEndX = - textBounds.x + textBounds.width + getRightMargin(); - int thisEndX = thisBounds.x + thisBounds.width; - if (notationEndX > thisEndX) { - thisBounds.width = - getLeftMargin() + textBounds.width + getRightMargin(); - setBounds(thisBounds); - // TODO: We have noticed that the child fig inside for notation - // has grown beyond our bounds so we change the size of ourself - // to encompass it. We should now inform our own parent that we - // have changed size so that it can fit us. - // Maybe we need a separate event mechanism for this as - // property change with bounds can happen for many reasons and - // may cause problems with cycles (e.g. our parent changes - // size so we change, we tell our parent we changed so it - // redraws and tells us to change, we change and tell our - // parent we changed.....) Events are maybe OTT - we could just - // call our parent directly. - } - } - super.propertyChange(pce); - } - // TODO: Move an empty implementation to FigGroup in GEF protected void positionChildren() { Rectangle myBounds = getBounds(); ------------------------------------------------------ http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2724412 To unsubscribe from this discussion, e-mail: [[email protected]].
