Login | Register
My pages Projects Community openCollabNet

Discussions > Commits > svn commit: r18 - trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram

argouml-spl
Discussion topic

Back to topic list

svn commit: r18 - trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram

Author marcusvnac
Full name Marcus Vinícius de Ávila Couto
Date 2010-04-02 17:18:37 PDT
Message Author: marcusvnac
Date: 2010-04-02 17:18:36-0700
New Revision: 18

Added:
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/Acti​onAddClassifierRole.​java (contents, props changed)
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/Acti​onSetAddMessageMode.​java (contents, props changed)
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/Acti​onSetOperation.java (contents, props changed)
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/FigC​lassifierRole.java (contents, props changed)
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/FigD​estroy.java (contents, props changed)
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/FigH​ead.java (contents, props changed)
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/FigL​ifeLine.java (contents, props changed)
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/FigM​essage.java (contents, props changed)
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/FigM​essageComparator.jav​a (contents, props changed)
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/FigM​essageSpline.java (contents, props changed)
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/Mode​BroomMessages.java (contents, props changed)
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/Mode​CreateMessage.java (contents, props changed)
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/Mode​PlaceClassifierRole.​java (contents, props changed)
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/Sele​ctionClassifierRole.​java (contents, props changed)
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/Sele​ctionMessage.java (contents, props changed)
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/Sequ​enceDiagramFactory.j​ava (contents, props changed)
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/Sequ​enceDiagramGraphMode​l.java (contents, props changed)
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/Sequ​enceDiagramRenderer.​java (contents, props changed)
   trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/UMLS​equenceDiagram.java (contents, props changed)

Log:
Initial version of ArgoUML-SPL.

Generated from ArgoUML release version v0.28.1

Added: trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/Acti​onAddClassifierRole.​java
Url: http://argouml-spl.t​igris.org/source/bro​wse/argouml-spl/trun​k/src/argouml-core-d​iagrams-sequence2/sr​c/org/argouml/sequen​ce2/diagram/ActionAd​dClassifierRole.java​?view=markup&pat​hrev=18
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/Acti​onAddClassifierRole.​java 2010-04-02 17:18:36-0700
@@ -0,0 +1,81 @@
+// $Id$
+// Copyright (c) 2007 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
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.sequence2.diagram;
+
+import org.argouml.model.Model;
+import org.argouml.ui.CmdCreateNode;
+import org.tigris.gef.base.Editor;
+import org.tigris.gef.base.Globals;
+import org.tigris.gef.base.Mode;
+import org.tigris.gef.graph​.GraphModel;
+
+/**
+ * Action to add an object to a sequence diagram.
+ *
+ * @author penyaskito
+ */
+public class ActionAddClassifierRole extends CmdCreateNode {
+
+ private static final long serialVersionUID = 1824497910678123381L;
+
+ /**
+ * The constructor.
+ */
+ public ActionAddClassifierRole() {
+ super(Model.getMetaT​ypes().getClassifier​Role(),
+ "button.new-classifierrole");
+ }
+
+ @Override
+ protected Mode createMode(String instructions) {
+ return new ModePlaceClassifierRole(this, instructions);
+ }
+
+ /*
+ * @see org.tigris.gef.graph​.GraphFactory#makeNo​de()
+ */
+ public Object makeNode() {
+ Object node = null;
+ Editor ce = Globals.curEditor();
+ GraphModel gm = ce.getGraphModel();
+ if (gm instanceof SequenceDiagramGraphModel) {
+ Object collaboration =
+ ((SequenceDiagramGraphModel) gm).getCollaboration();
+ node =
+ Model.getCollaborati​onsFactory().buildCl​assifierRole(
+ collaboration);
+ /*
+ Model.getCoreHelper(​).setNamespace(
+ node,
+ Model.getFacade().getNamespace( collaboration));
+ */
+ } else {
+ throw new IllegalStateExceptio​n("Graphmodel is not a "
+ + "sequence diagram graph model");
+ }
+ return node;
+ }
+
+}

Added: trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/Acti​onSetAddMessageMode.​java
Url: http://argouml-spl.t​igris.org/source/bro​wse/argouml-spl/trun​k/src/argouml-core-d​iagrams-sequence2/sr​c/org/argouml/sequen​ce2/diagram/ActionSe​tAddMessageMode.java​?view=markup&pat​hrev=18
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/Acti​onSetAddMessageMode.​java 2010-04-02 17:18:36-0700
@@ -0,0 +1,49 @@
+// $Id$
+// Copyright (c) 2007 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
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.sequence2.diagram;
+
+import org.argouml.model.Model;
+import org.argouml.uml.diag​ram.ui.ActionSetMode​;
+
+/**
+ * An extension of ActionSetMode to set the parameters for an association.
+ *
+ * @author Bob Tarling
+ */
+class ActionSetAddMessageMode extends ActionSetMode {
+
+ /**
+ * Construct a new ActionSetAddMessageM​ode<p>
+ *
+ * @param action the UML meta type of the UML action to associate
+ * to the new message
+ * @param name the i18n code for the action name
+ */
+ public ActionSetAddMessageMode(Object action, String name) {
+ super(ModeCreateMessage.class, "edgeClass",
+ Model.getMetaTypes()​.getMessage(), name);
+ modeArgs.put("action", action);
+ }
+}

Added: trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/Acti​onSetOperation.java
Url: http://argouml-spl.t​igris.org/source/bro​wse/argouml-spl/trun​k/src/argouml-core-d​iagrams-sequence2/sr​c/org/argouml/sequen​ce2/diagram/ActionSe​tOperation.java?view​=markup&pathrev=​18
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/Acti​onSetOperation.java 2010-04-02 17:18:36-0700
@@ -0,0 +1,67 @@
+// $Id$
+// Copyright (c) 1996-2009 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
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.sequence2.diagram;
+
+import java.awt.event.ActionEvent;
+
+import org.argouml.model.Model;
+import org.tigris.gef.undo.​UndoableAction;
+
+/**
+ * Action to set the operation of an action.
+ *
+ * @author Thomas Neustupny (thn at tigris dot org)
+ */
+public class ActionSetOperation extends UndoableAction {
+
+ private Object action;
+ private Object operation;
+
+ /**
+ * The constructor.
+ *
+ * @param ac The action
+ * @param op The operation
+ * @param label The menu item label for the operation
+ */
+ public ActionSetOperation(Object ac, Object op, String label) {
+ super(label, null);
+ //super(Model.getFac​ade().getName(op), null);
+ action = ac;
+ operation = op;
+ }
+
+ /*
+ * @see java.awt.event.Actio​nListener#actionPerf​ormed(java.awt.event​.ActionEvent)
+ */
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ //TODO: What can we do with other kind of actions?
+ if (Model.getFacade().i​sACallAction(action)​) {
+ Model.getCommonBehav​iorHelper().setOpera​tion(action, operation);
+ }
+ super.actionPerformed(e);
+ }
+}

Added: trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/FigC​lassifierRole.java
Url: http://argouml-spl.t​igris.org/source/bro​wse/argouml-spl/trun​k/src/argouml-core-d​iagrams-sequence2/sr​c/org/argouml/sequen​ce2/diagram/FigClass​ifierRole.java?view=​markup&pathrev=1​8
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/FigC​lassifierRole.java 2010-04-02 17:18:36-0700
@@ -0,0 +1,442 @@
+// $Id$
+// 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
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.sequence2.diagram;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+//#if defined(LOGGING)
+//@#$LPS-LOGGING:G​ranularityType:Impor​t
+import org.apache.log4j.Logger;
+//#endif
+import org.argouml.model.Model;
+import org.argouml.notation​.NotationProviderFac​tory2;
+import org.argouml.uml.diag​ram.DiagramSettings;​
+import org.argouml.uml.diag​ram.ui.FigEmptyRect;​
+import org.argouml.uml.diag​ram.ui.FigNodeModelE​lement;
+import org.tigris.gef.base.Geometry;
+import org.tigris.gef.base.Selection;
+import org.tigris.gef.prese​ntation.Fig;
+import org.tigris.gef.prese​ntation.FigEdge;
+import org.tigris.gef.prese​ntation.FigRect;
+
+/**
+ * The Fig that represents a Classifier Role
+ * @author penyaskito
+ */
+public class FigClassifierRole extends FigNodeModelElement {
+ //#if defined(LOGGING)
+ //@#$LPS-LOGGING:Gr​anularityType:Field
+ private static final Logger LOG = Logger.getLogger(Fig​ClassifierRole.class​);
+ //#endif
+ /**
+ * This is an empty rectangle placed above HeadFig. It creates a space
+ * between where the classifierRole would normally start and where it
+ * starts as the result of a create message.
+ */
+ private FigEmptyRect emptyFig;
+ /**
+ * This is the box head of the classifierRole containing the notation
+ * and stereotypes.
+ */
+ private FigHead headFig;
+ /**
+ * This is the dashed lifeline under FigHead that contain the activation
+ * blocks.
+ */
+ private FigLifeLine lifeLineFig;
+
+ // TODO: Do we need this? Is this the same as emptyFig.getHeight()?
+ private int offset = 0;
+
+ /**
+ * The minimum height of the classifier role.
+ */
+ private int minimumHeight;
+
+ /**
+ * Constructor
+ * @deprecated for 0.28.alpha3 by penyaskito. Use
+ * {@link #FigClassifierRole(Object, Rectangle, DiagramSettings)}.
+ */
+ public FigClassifierRole() {
+ super();
+ initialize();
+ }
+
+ /**
+ * Constructor.
+ * @param node The model element
+ * @deprecated for 0.28.alpha3 by penyaskito. Use
+ * {@link #FigClassifierRole(Object, Rectangle, DiagramSettings)}.
+
+ */
+ public FigClassifierRole(Object node) {
+ this();
+ setOwner(node);
+ }
+
+ /**
+ * Construct a use case figure with the given owner, bounds, and rendering
+ * settings. This constructor is used by the PGML parser.
+ *
+ * @param owner owning model element
+ * @param bounds position and size
+ * @param settings rendering settings
+ */
+ public FigClassifierRole(Object owner, Rectangle bounds,
+ DiagramSettings settings) {
+ super(owner, bounds, settings);
+ initialize();
+ if (bounds != null) {
+ setLocation(bounds.x, bounds.y);
+ }
+ }
+
+ /**
+ * Initialization which is common to multiple constructors.
+ */
+ private void initialize() {
+ setBigPort(new FigClassifierRolePort());
+
+ emptyFig = new FigEmptyRect(getX(), getY(), getWidth(), offset);
+ emptyFig.setLineWidth(0);
+
+ headFig = new FigHead(getOwner(), getSettings(), getStereotypeFig(),
+ getNameFig());
+ headFig.setBounds(getX(), getY() + offset,
+ getWidth(), headFig.getHeight());
+
+ lifeLineFig = new FigLifeLine(getOwner(), new Rectangle(headFig.getX(),
+ getY() + offset + headFig.getHeight() - getLineWidth(), 0, 0),
+ getSettings());
+
+ addFig(getBigPort());
+ getBigPort().setVisible(false);
+
+ // TODO: Move magic number 10 to descriptive constant
+ minimumHeight = headFig.getMinimumHeight() + 10;
+
+ addFig(emptyFig);
+ addFig(lifeLineFig);
+ addFig(headFig);
+
+ createActivations();
+ }
+
+ /**
+ * The NotationProvider for the ClassifierRole. <p>
+ *
+ * The syntax is for UML is:
+ * <pre>
+ * baselist := [base] [, base]*
+ * classifierRole := [name] [/ role] [: baselist]
+ * </pre></p>
+ *
+ * The <code>name</code> is the Instance name, not used currently.
+ * See ClassifierRoleNotationUml for details.<p>
+ *
+ * This syntax is compatible with the UML 1.4 specification.
+ * @return TYPE_CLASSIFIERROLE
+ */
+ @Override
+ protected int getNotationProviderType() {
+ return NotationProviderFact​ory2.TYPE_CLASSIFIER​ROLE;
+ }
+
+ @Override
+ protected void setBoundsImpl(
+ final int x, final int y,
+ final int w, final int h) {
+
+ final Rectangle oldBounds = getBounds();
+ final int ww = Math.max(w, headFig.getMinimumSi​ze().width);
+
+ emptyFig.setBounds(x, y, ww, offset);
+ headFig.setBounds(x, y + offset, ww, headFig.getMinimumHeight());
+ lifeLineFig.setBounds(x,
+ y + offset + headFig.getHeight() - lifeLineFig.getLineWidth(),
+ ww, h - offset - headFig.getHeight());
+ getBigPort().setBounds(x, y, ww, h);
+
+ _x = x;
+ _y = y;
+ _w = w;
+ _h = h;
+
+ //TODO: I suspect this isn't needed call isn't needed but don't remove
+ // till out of alpha/beta stage
+ updateEdges();
+ //
+
+ firePropChange("bounds", oldBounds, getBounds());
+ }
+
+ /*
+ * This method is overridden in order to ignore change of the y coordinate
+ * during dragging.
+ *
+ * @see org.tigris.gef.prese​ntation.FigNode#supe​rTranslate(int, int)
+ */
+ public void superTranslate(int dx, int dy) {
+ super.superTranslate(dx, 0);
+ }
+
+ /**
+ * Updates the head offset, looking for the create messages.
+ */
+ private void updateHeadOffset() {
+ FigMessage createMessage = getFirstCreateFigMessage();
+ if (createMessage != null) {
+ int y = createMessage.getFir​stPoint().y;
+ if (y > 0) {
+ offset = y - (getY() + headFig.getHeight() / 2);
+ }
+ } else {
+ offset = 0;
+ }
+ }
+
+ /**
+ * Gets the first create message received by the classifier role
+ * @return a figmessage.
+ */
+ private FigMessage getFirstCreateFigMessage() {
+ List<FigMessage> messages = getFigMessages();
+ FigMessage createMessage = null;
+ for (FigMessage message : messages) {
+ if (message.getDestFigN​ode().equals(this)
+ && Model.getFacade().is​ACreateAction(messag​e.getAction())) {
+
+ createMessage = message;
+ break;
+ }
+ }
+ return createMessage;
+ }
+
+ /**
+ * Gets the minimum size of the Fig.<p>
+ *
+ * The width is restricted by the notation making sure that the full
+ * classifier role description is displayed.<p>
+ *
+ * The minimum height is restricted so that the all attached message will
+ * remain in the same position relative to the Fig. If no messages are
+ * attached then the minimum height will ensure box is shown plus at least
+ * 10 pixels of the lifeline.
+ *
+ * @return dimensions of the minimum size
+ */
+ public Dimension getMinimumSize() {
+ /**
+ * TODO: minimum height should not be calculated every time, but only
+ * when an FigMessage has been added or removed.
+ * Currently doing that doesn't work because of an unknown problem.
+ * How to test: create only two CRs and a create message between them.
+ * Then move the create message to the bottom!
+ * Until that is fixed the workaround is to call updateMinimumHeight()
+ * every time the minimum size is needed
+ */
+ updateMinimumHeight();
+
+ return new Dimension(headFig.ge​tMinimumWidth(), minimumHeight);
+ }
+
+ /**
+ * Updates the minimum height of the classifier role when a FigMessage
+ * is added or removed.
+ */
+ private void updateMinimumHeight() {
+ int yMax = getY();
+ List<FigEdge> figsEdges = getEdges();
+ FigMessage createMessage = getFirstCreateFigMessage();
+
+ // TODO: Is this next line safe? What happens if there is just one
+ // comment edge or a comment edge and a single message?
+ if (figsEdges.size() == 1 && createMessage != null) {
+ // TODO: Move magic number 10 to descriptive constant
+ minimumHeight = headFig.getMinimumSize().height + offset + 10;
+ } else {
+ for (Fig fig : figsEdges) {
+ if ( fig instanceof FigMessage
+ // we need the edge to be complete
+ && ((FigMessage) fig).getDestFigNode() != null
+ && ((FigMessage) fig).getSourceFigNode() != null
+ && ((FigMessage) fig).getY() > yMax) {
+ yMax = ((FigMessage) fig).getY();
+ }
+ }
+ // TODO: Move magic number 10 to descriptive constant
+ minimumHeight = yMax - getY() + 10;
+ }
+ }
+
+ @Override
+ public void removeFigEdge(FigEdge edge) {
+ super.removeFigEdge(edge);
+
+ if (edge instanceof FigMessage) {
+ final FigMessage figMessage = (FigMessage) edge;
+ positionHead(figMessage);
+ createActivations();
+ }
+ }
+
+ @Override
+ public void addFigEdge(FigEdge edge) {
+ super.addFigEdge(edge);
+
+ if (edge instanceof FigMessage) {
+ FigMessage mess = (FigMessage) edge;
+ if (mess.isSelfMessage()) {
+ mess.convertToArc();
+ }
+ positionHead(mess);
+ }
+ }
+
+ /**
+ * Position the head at the top of the lifeline so that it is at the top
+ * of the FigClassifierRole or where the create message enters the
+ * FigClassifierRole
+ */
+ void positionHead(final FigMessage message) {
+ // if the added edge is a Create Message it will affect the position
+ // of the ClassifierRole so it should be repositioned
+ if (message.isCreateAction()
+ && equals(message.getDe​stFigNode())
+ && !equals(message.getS​ourceFigNode())) {
+ updateHeadOffset();
+ setBounds(getX(), getY(), getWidth(), getHeight());
+ }
+ }
+
+ /**
+ * Return an ordered list of message edges that are complete (ie the user
+ * has finished drawing). Messages are ordered from top to bottom.
+ * @return A list with all the messages that are complete
+ */
+ public List<FigMessage> getFigMessages() {
+ final List<FigMessage> completeMessages = new ArrayList<FigMess​age>(10);
+ for (Object o : getFigEdges()) {
+ if (o instanceof FigMessage) {
+ final FigMessage fm = (FigMessage) o;
+ if (fm.getPoints().length > 1
+ && fm.getDestFigNode() != null
+ && fm.getSourceFigNode() != null) {
+ completeMessages.add(fm);
+ }
+ }
+ }
+ Collections.sort(com​pleteMessages, new FigMessageComparator());
+ return completeMessages;
+ }
+
+ void createActivations() {
+ lifeLineFig.createAc​tivations(getFigMess​ages());
+ forceRepaintShadow();
+ }
+
+ @Override
+ public void setFillColor(Color color) {
+ headFig.setFillColor(color);
+ lifeLineFig.setFillC​olor(color);
+ }
+
+ @Override
+ public Color getFillColor() {
+ return headFig.getFillColor();
+ }
+
+ @Override
+ public void setFilled(boolean filled) {
+ headFig.setFilled(filled);
+ }
+
+ @Override
+ public void setLineWidth(int w) {
+ headFig.setLineWidth(w);
+ getBigPort().setLineWidth(0);
+ }
+
+ /**
+ * This class represents the port of the FigClassifierRole.
+ * It has the logic for locating the messages.
+ *
+ * @author penyaskito
+ */
+ class FigClassifierRolePort extends FigRect {
+
+ /**
+ *
+ */
+ FigClassifierRolePort() {
+ super(0, 0, 0, 0, null, null);
+ setLineWidth(0);
+ }
+
+ @Override
+ public Point getClosestPoint(Point anotherPt) {
+ int width = FigActivation.DEFAULT_WIDTH;
+ int y = anotherPt.y;
+
+ // the initial x is the left side of the activation
+ int x = getX() + getWidth() / 2 - width / 2;
+ // put the x at the right side of the activation if needed
+ if (anotherPt.x > x + width) {
+ x = x + width;
+ }
+ // if the y coordinate is before the classifier role y,
+ // we place the start in the corner of the fighead.
+ if (y < getY()) {
+ y = getY();
+ x = Geometry.ptClosestTo​(headFig.getBounds()​, anotherPt).x;
+ }
+ // if the y coordinate is inside the head,
+ // the x must be in the border of the headFig.
+ else if (y < lifeLineFig.getY()) {
+ x = Geometry.ptClosestTo​(headFig.getBounds()​, anotherPt).x;
+ }
+ // else if the y coordinate is outside of the classifier role,
+ // we fix the y in the max y of the classifier role.
+ // FIXME: We should increase the height of the classifier role,
+ // don't???
+ else if (y > getY() + getHeight()) {
+ y = headFig.getY() + FigClassifierRole.th​is.getHeight();
+ }
+ return new Point(x, y);
+ }
+ }
+
+ public Selection makeSelection() {
+ return new SelectionClassifierRole(this);
+ }
+}

Added: trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/FigD​estroy.java
Url: http://argouml-spl.t​igris.org/source/bro​wse/argouml-spl/trun​k/src/argouml-core-d​iagrams-sequence2/sr​c/org/argouml/sequen​ce2/diagram/FigDestr​oy.java?view=markup​&pathrev=18
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/FigD​estroy.java 2010-04-02 17:18:36-0700
@@ -0,0 +1,72 @@
+// $Id$
+// Copyright (c) 2007-2009 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
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.sequence2.diagram;
+
+import java.awt.Rectangle;
+
+import org.argouml.uml.diag​ram.DiagramSettings;​
+import org.argouml.uml.diag​ram.ui.ArgoFigGroup;​
+import org.tigris.gef.prese​ntation.FigLine;
+
+/**
+ * Fig containing an large X to mark the destruction of a lifeline.
+ *
+ * @author penyaskito
+ */
+class FigDestroy extends ArgoFigGroup {
+
+ /**
+ * @param x
+ * @param y
+ * @deprecated for 0.28 by tfmorris
+ */
+ FigDestroy(int x, int y) {
+ createCross(new Rectangle(x, y, 10, 10));
+ }
+
+ private void createCross(Rectangle bounds) {
+ addFig(new FigLine(bounds.x,
+ bounds.y,
+ bounds.x + bounds.width,
+ bounds.y + bounds.height));
+ addFig(
+ new FigLine(bounds.x,
+ bounds.y + bounds.height,
+ bounds.x + bounds.width,
+ bounds.y));
+ }
+
+ /**
+ * Create an X to mark the destruction of a lifeline
+ * @param owner owning UML element
+ * @param bounds position and size (X will be drawn from corner to corner)
+ * @param settings render settings
+ */
+ FigDestroy(Object owner, Rectangle bounds, DiagramSettings settings) {
+ super(owner, settings);
+ createCross(bounds);
+ setLineWidth(LINE_WIDTH);
+ }
+}

Added: trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/FigH​ead.java
Url: http://argouml-spl.t​igris.org/source/bro​wse/argouml-spl/trun​k/src/argouml-core-d​iagrams-sequence2/sr​c/org/argouml/sequen​ce2/diagram/FigHead.​java?view=markup​&pathrev=18
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/FigH​ead.java 2010-04-02 17:18:36-0700
@@ -0,0 +1,161 @@
+// $Id$
+// Copyright (c) 2007-2009 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
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.sequence2.diagram;
+
+import java.awt.Color;
+import java.awt.Dimension;
+
+import org.argouml.uml.diag​ram.DiagramSettings;​
+import org.argouml.uml.diag​ram.ui.ArgoFigGroup;​
+import org.tigris.gef.prese​ntation.Fig;
+import org.tigris.gef.prese​ntation.FigRect;
+import org.tigris.gef.prese​ntation.FigText;
+
+// TODO: We really want this class to have package scope however the reflection
+// used to process PGML.tee forces this to be public. I don't understand why.
+// Is there a way around this?
+public class FigHead extends ArgoFigGroup {
+
+ private FigText nameFig;
+ private Fig stereotypeFig;
+ private FigRect rectFig;
+
+ static final int DEFAULT_WIDTH = 150;
+ static final int DEFAULT_HEIGHT = 50;
+
+ /**
+ * Constructor.
+ *
+ * @param stereotypeFigure the stereotype fig
+ * @param nameFigure the name fig
+ * @deprecated for 0.28 by tfmorris. Use
+ * {@link #FigHead(Object, DiagramSettings, Fig, FigText)}.
+ */
+ @Deprecated
+ FigHead(Fig stereotypeFigure, FigText nameFigure) {
+ initialize(stereotypeFigure, nameFigure);
+ }
+
+ private void initialize(Fig stereotypeFigure, FigText nameFigure) {
+ this.stereotypeFig = stereotypeFigure;
+ this.nameFig = nameFigure;
+
+ nameFig.setFilled(false);
+ nameFig.setLineWidth(0);
+
+ rectFig =
+ new FigRect(0, 0,
+ DEFAULT_WIDTH,
+ DEFAULT_HEIGHT,
+ LINE_COLOR, FILL_COLOR);
+ rectFig.setLineWidth​(LINE_WIDTH);
+ addFig(rectFig);
+ addFig(nameFig);
+ addFig(stereotypeFig);
+ }
+
+ FigHead(Object owner, DiagramSettings settings, Fig stereotypeFigure,
+ FigText nameFigure) {
+ super(owner, settings);
+ initialize(stereotypeFigure, nameFigure);
+ }
+
+
+
+ /**
+ * @param x The x coordinate.
+ * @param y The y coordinate.
+ * @param w The width
+ * @param h The height
+ * @see org.tigris.gef.prese​ntation.FigGroup#set​BoundsImpl(int, int, int, int)
+ */
+ @Override
+ protected void setBoundsImpl(int x, int y, int w, int h) {
+ rectFig.setBounds(x, y, w, h);
+ int yy = y;
+ if (stereotypeFig.isVisible()) {
+ stereotypeFig.setBounds(x, yy, w,
+ stereotypeFig.getMin​imumSize().height);
+ yy += stereotypeFig.getMin​imumSize().height;
+ }
+
+ nameFig.setBounds(x, yy, w, nameFig.getHeight());
+ _x = x;
+ _y = y;
+ _w = w;
+ _h = h;
+ }
+
+ @Override
+ public Dimension getMinimumSize() {
+ return new Dimension(getMinimumWidth(), getMinimumHeight());
+ }
+
+ int getMinimumHeight() {
+ int h = stereotypeFig.getMin​imumSize().height
+ // TODO: Move the magic number 4 to a descriptive constant
+ + nameFig.getMinimumHeight() + 4;
+ if (h < DEFAULT_HEIGHT) {
+ h = DEFAULT_HEIGHT;
+ }
+ return h;
+ }
+
+ int getMinimumWidth() {
+ int minWidth = 50;
+ if (minWidth < stereotypeFig.getMin​imumSize().width) {
+ minWidth = stereotypeFig.getMin​imumSize().width;
+ }
+ if (minWidth < nameFig.getMinimumSize().width) {
+ minWidth = nameFig.getMinimumSize().width;
+ }
+ return minWidth;
+ }
+
+ @Override
+ public void setFilled (boolean filled) {
+ rectFig.setFilled(filled);
+ }
+
+ @Override
+ public void setLineWidth(int w) {
+ rectFig.setLineWidth(w);
+ }
+
+ @Override
+ public void setFillColor(Color c) {
+ rectFig.setFillColor(c);
+ }
+
+ @Override
+ public Color getFillColor() {
+ return rectFig.getFillColor();
+ }
+
+ @Override
+ public void setLineColor(Color c) {
+ rectFig.setLineColor(c);
+ }
+}

Added: trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/FigL​ifeLine.java
Url: http://argouml-spl.t​igris.org/source/bro​wse/argouml-spl/trun​k/src/argouml-core-d​iagrams-sequence2/sr​c/org/argouml/sequen​ce2/diagram/FigLifeL​ine.java?view=markup​&pathrev=18
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/argouml-co​re-diagrams-sequence​2/src/org/argouml/se​quence2/diagram/FigL​ifeLine.java 2010-04-02 17:18:36-0700
@@ -0,0 +1,364 @@
+// $Id$
+// Copyright (c) 2007-2009 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
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.sequence2.diagram;
+
+import java.awt.Rectangle;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.argouml.uml.diag​ram.DiagramSettings;​
+import org.argouml.uml.diag​ram.ui.ArgoFigGroup;​
+import org.tigris.gef.prese​ntation.Fig;
+import org.tigris.gef.prese​ntation.FigLine;
+import org.tigris.gef.prese​ntation.FigRect;
+
+
+/**
+ * This fig is the LifeLine of a ClassifierRole.
+ * @author penyaskito
+ */
+class FigLifeLine extends ArgoFigGroup {
+
+ private static final long serialVersionUID = 466925040550356L;
+
+ private FigLine lineFig;
+ private FigRect rectFig;
+
+ private List<FigActivation> activations;
+ private List<FigActivation> stackedActivations;
+
+ static final int WIDTH = 150;
+ static final int HEIGHT = 500;
+
+ /**
+ * Creates a FigLifeLine that starts in (x,y)
+ * @param x The x coordinate of the FigLifeLine
+ * @param y The y coordinate of the FigLifeLine
+ * @deprecated for 0.28 by tfmorris. Use
+ * {@link #FigLifeLine(Object, Rectangle, DiagramSettings)}.
+ */
+ @Deprecated
+ FigLifeLine(int x, int y) {
+ super();
+
+ initialize(x, y);
+ }
+
+ private void initialize(int x, int y) {
+ activations = new LinkedList<FigAct​ivation>();
+ stackedActivations = new LinkedList<FigAct​ivation>();
+
+ rectFig = new FigRect(x, y, WIDTH, HEIGHT);
+ rectFig.setFilled(false);
+ rectFig.setLineWidth(0);
+ lineFig = new FigLine(x + WIDTH / 2, y,
+ x + WIDTH / 2, y + HEIGHT, LINE_COLOR);
+ lineFig.setDashed(true);
+ lineFig.setLineWidth​(LINE_WIDTH);
+
+ addFig(rectFig);
+ addFig(lineFig);
+ }
+
+ FigLifeLine(Object owner, Rectangle bounds, DiagramSettings settings) {
+ super(owner, settings);
+ initialize(bounds.x, bounds.y);
+ }
+
+ // TODO: Does this still need to be synchronized? If so then explain why.
+ synchronized void createActivations(final List<FigMessage> messages) {
+ clearActivations();
+ Collections.sort(messages, new FigMessageComparator());
+
+ activations = createStandardActiva​tions(messages);
+ stackedActivations = createStackedActivat​ions(messages);
+
+ addActivations(activations);
+ addActivations(stack​edActivations);
+
+ // TODO: Do we need this?
+ calcBounds();
+ }
+
+ /**
+ * Add the given list of activation Figs to the lifeline. The fill colour
+ * is forced to the lifeline colour in the process.
+ * @param activationFigs
+ */
+ private void addActivations(
+ final List<FigActivation> activationFigs) {
+ for (final FigActivation figAct : activationFigs) {
+ figAct.setFillColor(​getFillColor());
+ addFig(figAct);
+ }
+ }
+
+ private List<FigActivation> createStandardActivations(
+ final List<FigMessage> figMessages) {
+
+ final List<FigActivation> newActivations =
+ new LinkedList<FigAct​ivation>();
+
+ // Check here if there are no incoming call actions
+ // if not then create an activation at the top of the lifeline
+ FigActivation currentActivation = null;
+ if (!hasIncomingCallAct​ionFirst(figMessages​)) {
+ currentActivation = createActivationFig(
+ getOwner(),
+ lineFig.getX(),
+ lineFig.getY(),
+ lineFig.getWidth(),
+ lineFig.getHeight(),
+ getSettings(),
+ null);
+ }
+
+ // This counts the number of repeated call/returns that take place
+ // after the first activation. This shouldn't be required once
+ // we handle stacked activations better and once issue 5692 and 5693
+ // are sorted.
+ int activationsCount = 0;
+ //
+
+ for (FigMessage figMessage : figMessages) {
+ int ySender = 0;
+
+ if (!figMessage.isSelfMessage()) {
+ if (isIncoming(figMessage)) {
+ if (currentActivation == null) {
+ if (figMessage.isCallAction()) {
+ // if we are the dest and is a call action, create the
+ // activation, but don't add it until the height is set.
+ ySender = figMessage.getFinalY();
+ currentActivation = createActivationFig(
+ getOwner(),
+ lineFig.getX(),
+ ySender,
+ 0,
+ 0,
+ getSettings(),
+ figMessage);
+ activationsCount++;
+ } else if (figMessage.isCreateAction()) {
+ // if we are the destination of a create action,
+ // create the entire activation
+ currentActivation = createActivationFig(
+ getOwner(),
+ lineFig.getX(),
+ lineFig.getY(),
+ 0,
+ 0,
+ getSettings(),
+ figMessage);
+ activationsCount++;
+ }
+ } else {
+ if (figMessage.isCallAction()
+ && isSameClassifierRoles(
+ currentActivation.ge​tActivatingMessage()​,
+ figMessage)) {
+ activationsCount++;
+ } else if (figMessage.isDestroyAction()) {
+ // if we are the target of a destroy action
+ // the figlifeline ends here and we add the activation
+ ySender = figMessage.getFinalY();
+ currentActivation.setHeight(
+ ySender - currentActivation.getY());
+ currentActivation.se​tDestroy(true);
+ lineFig.setHeight(ySender - getY());
+ newActivations.add(c​urrentActivation);
+ currentActivation = null;
+ }
+ }
+ }
+
+ if (isOutgoing(figMessage) && currentActivation != null
+ && currentActivation.is​ActivatorEnd(figMess​age)
+ && --activationsCount == 0) {
+ // if we are the source of a return action
+ // the activation ends here.
+ ySender = figMessage.getStartY();
+ currentActivation.setHeight(
+ ySender - currentActivation.getY());
+ newActivations.add(c​urrentActivation);
+ currentActivation = null;
+ }
+ }
+ }
+
+ // If we have a currentAct object that means have reached the end
+ // of the lifeline with a call or a create not returned.
+ // Add the activation to the list after setting its height to end
+ // at the end of the lifeline.
+ if (currentActivation != null) {
+ currentActivation.setHeight(
+ getHeight() - (currentActivation.getY() - getY()));
+ newActivations.add(c​urrentActivation);
+ }
+
+ return newActivations;
+ }
+
+ private boolean isSameClassifierRoles(
+ final FigMessage mess1,
+ final FigMessage mess2) {
+ return mess1 != null
+

View complete message

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r18 - trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram marcusvnac Marcus Vinícius de Ávila Couto 2010-04-02 17:18:37 PDT
Messages per page: