Author: mvw
Date: 2010-09-10 01:37:15-0700
New Revision: 18726
Modified:
trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigPartition.java
trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigSubactivityState.java
trunk/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/FigClassifierRole.java
trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigNode.java
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/FigClassifierRole.java
Log:
Get rid of some more uses of deprecated setBigPort() method.
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigPartition.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigPartition.java?view=diff&pathrev=18726&r1=18725&r2=18726
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigPartition.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigPartition.java 2010-09-10 01:37:15-0700
@@ -1,6 +1,6 @@
/* $Id$
*****************************************************************************
- * Copyright (c) 2009 Contributors - see below
+ * Copyright (c) 2009-2010 Contributors - see below
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
*
* Contributors:
* bobtarling
+ * Michiel van der Wulp
*****************************************************************************
*
* Some portions of this file was previously release using the BSD License:
@@ -90,12 +91,17 @@
initFigs();
}
+ @Override
+ protected Fig createBigPortFig() {
+ // TODO: define constants for magic numbers
+ FigRect fr = new FigRect(X0, Y0, 160, 200, DEBUG_COLOR, DEBUG_COLOR);
+ fr.setFilled(false);
+ fr.setLineWidth(0);
+ return fr;
+ }
+
private void initFigs() {
// TODO: define constants for magic numbers
- setBigPort(new FigRect(X0, Y0, 160, 200, DEBUG_COLOR, DEBUG_COLOR));
- getBigPort().setFilled(false);
- getBigPort().setLineWidth(0);
-
leftLine = new FigLine(X0, Y0, 10, 300, LINE_COLOR);
rightLine = new FigLine(150, Y0, 160, 300, LINE_COLOR);
bottomLine = new FigLine(X0, 300, 150, 300, LINE_COLOR);
@@ -401,7 +407,7 @@
/**
* When dragging this partition drag all other partitions with it.
- * @return all the partitions to drag togther.
+ * @return all the partitions to drag together.
*/
@Override
public List getDragDependencies() {
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigSubactivityState.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigSubactivityState.java?view=diff&pathrev=18726&r1=18725&r2=18726
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigSubactivityState.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigSubactivityState.java 2010-09-10 01:37:15-0700
@@ -1,6 +1,6 @@
/* $Id$
*****************************************************************************
- * Copyright (c) 2009 Contributors - see below
+ * Copyright (c) 2009-2010 Contributors - see below
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -51,6 +51,7 @@
import org.argouml.model.Model;
import org.argouml.uml.diagram.DiagramSettings;
import org.argouml.uml.diagram.state.ui.FigStateVertex;
+import org.tigris.gef.presentation.Fig;
import org.tigris.gef.presentation.FigLine;
import org.tigris.gef.presentation.FigRRect;
import org.tigris.gef.presentation.FigText;
@@ -77,7 +78,6 @@
private FigRRect cover;
- //private FigGroup icon;
private FigRRect s1;
private FigRRect s2;
@@ -97,16 +97,18 @@
initFigs();
}
+ @Override
+ protected Fig createBigPortFig() {
+ FigRRect frr = new FigRRect(X, Y, W, H, DEBUG_COLOR, DEBUG_COLOR);
+ frr.setCornerRadius(frr.getHeight() / 2);
+ frr.setLineWidth(0);
+ return frr;
+ }
+
private void initFigs() {
- FigRRect bigPort = new FigRRect(X, Y, W, H, DEBUG_COLOR, DEBUG_COLOR);
- bigPort.setCornerRadius(bigPort.getHeight() / 2);
cover = new FigRRect(X, Y, W, H, LINE_COLOR, FILL_COLOR);
cover.setCornerRadius(getHeight() / 2);
- bigPort.setLineWidth(0);
-
- //icon = makeSubStatesIcon(X + W, Y); // the substate icon in the corner
-
getNameFig().setLineWidth(0);
getNameFig().setBounds(10 + PADDING, 10, 90 - PADDING * 2, 25);
getNameFig().setFilled(false);
@@ -114,14 +116,12 @@
getNameFig().setEditable(false);
// add Figs to the FigNode in back-to-front order
- addFig(bigPort);
+ addFig(getBigPort());
addFig(cover);
addFig(getNameFig());
- //addFig(icon);
makeSubStatesIcon(X + W, Y);
- setBigPort(bigPort);
setBounds(getBounds());
}
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/FigClassifierRole.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/FigClassifierRole.java?view=diff&pathrev=18726&r1=18725&r2=18726
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/FigClassifierRole.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/FigClassifierRole.java 2010-09-10 01:37:15-0700
@@ -1,13 +1,13 @@
/* $Id$
*****************************************************************************
- * Copyright (c) 2009 Contributors - see below
+ * Copyright (c) 2009-2010 Contributors - see below
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * mvw
+ * Michiel van der Wulp
*****************************************************************************
*
* Some portions of this file was previously release using the BSD License:
@@ -50,6 +50,7 @@
import org.argouml.uml.diagram.DiagramSettings;
import org.argouml.uml.diagram.ui.FigNodeModelElement;
import org.tigris.gef.base.Selection;
+import org.tigris.gef.presentation.Fig;
import org.tigris.gef.presentation.FigRect;
import org.tigris.gef.presentation.FigText;
@@ -98,15 +99,19 @@
}
}
+ @Override
+ protected Fig createBigPortFig() {
+ // The big port. Color of the big port is irrelevant
+ return new FigRect(X0, Y0, DEFAULT_WIDTH, DEFAULT_HEIGHT,
+ DEBUG_COLOR, DEBUG_COLOR);
+ }
+
/**
* There should be no size calculations here,
* since not all attributes are set yet.
*/
private void initClassifierRoleFigs() {
- // The big port and cover. Color of the big port is irrelevant
-
- setBigPort(new FigRect(X0, Y0, DEFAULT_WIDTH, DEFAULT_HEIGHT,
- DEBUG_COLOR, DEBUG_COLOR));
+ // The cover.
cover = new FigRect(X0, Y0, DEFAULT_WIDTH, DEFAULT_HEIGHT, LINE_COLOR,
FILL_COLOR);
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=18726&r1=18725&r2=18726
==============================================================================
--- 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 2010-09-10 01:37:15-0700
@@ -1,6 +1,6 @@
/* $Id$
*****************************************************************************
- * Copyright (c) 2009 Contributors - see below
+ * Copyright (c) 2009-2010 Contributors - see below
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
*
* Contributors:
* tfmorris
+ * Michiel van der Wulp
*****************************************************************************
*
* Some portions of this file was previously release using the BSD License:
@@ -85,12 +86,17 @@
private static final int DEFAULT_WIDTH = 200;
private static final int DEFAULT_HEIGHT = 180;
+ @Override
+ protected Fig createBigPortFig() {
+ Fig cpfr = new CubePortFigRect(DEFAULT_X, DEFAULT_Y - DEPTH,
+ DEFAULT_WIDTH + DEPTH,
+ DEFAULT_HEIGHT + DEPTH, DEPTH);
+ cpfr.setFilled(false);
+ cpfr.setLineWidth(0);
+ return cpfr;
+ }
+
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, LINE_COLOR, FILL_COLOR);
Modified: trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/FigClassifierRole.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/FigClassifierRole.java?view=diff&pathrev=18726&r1=18725&r2=18726
==============================================================================
--- trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/FigClassifierRole.java (original)
+++ trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/FigClassifierRole.java 2010-09-10 01:37:15-0700
@@ -1,6 +1,6 @@
/* $Id$
*****************************************************************************
- * Copyright (c) 2009 Contributors - see below
+ * Copyright (c) 2009-2010 Contributors - see below
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -46,7 +46,6 @@
import java.util.Collections;
import java.util.List;
-import org.apache.log4j.Logger;
import org.argouml.notation.NotationProviderFactory2;
import org.argouml.uml.diagram.DiagramSettings;
import org.argouml.uml.diagram.ui.FigEmptyRect;
@@ -105,12 +104,15 @@
}
}
+ @Override
+ protected Fig createBigPortFig() {
+ return new FigClassifierRolePort();
+ }
+
/**
* Initialization which is common to multiple constructors.
*/
private void initialize() {
- setBigPort(new FigClassifierRolePort());
-
emptyFig = new FigEmptyRect(getX(), getY(), getWidth(), offset);
emptyFig.setLineWidth(0);
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2657470
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.