This commit was manufactured by cvs2svn to create tag
'R1_0_RC2_N20060920-1805'.
diff --git a/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/commands/ChangeHeightCommand.java b/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/commands/ChangeHeightCommand.java
deleted file mode 100755
index 38d4957..0000000
--- a/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/commands/ChangeHeightCommand.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package org.eclipse.epf.authoring.gef.commands;
-
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.epf.diagram.model.Node;
-import org.eclipse.gef.commands.Command;
-
-/**
- * @author Shashidhar Kannoori
- * Command to handle Node's height changes.
- * ChangeBoundsCommand handles Node's width changes.
- */
-public class ChangeHeightCommand extends Command {
-
- private Node node;
-
- private Point newLocation, oldLocation;
-
- private int newHeight, oldHeight;
-
- private static final String LABEL = "Change Height Command"; //$NON-NLS-1$
-
- public ChangeHeightCommand(Node node, Point newLocation, int newHeight) {
- super(ChangeHeightCommand.LABEL);
- setNode(node);
- setNewLocation(newLocation.getCopy());
- this.newHeight = newHeight;
- }
-
- public boolean canExecute() {
- return node != null
- && newLocation != null
- && (newHeight != oldHeight || !(node.getLocation()
- .equals(newLocation)));
- }
-
- public void execute() {
- oldLocation = node.getLocation();
- oldHeight = node.getHeight();
- redo();
- }
-
- public void redo() {
- node.setLocation(newLocation);
- node.setHeight(newHeight);
- }
-
- public void setNode(Node node) {
- this.node = node;
- }
-
- public void setNewLocation(Point loc) {
- newLocation = loc;
- }
-
- public void undo() {
- node.setHeight(oldHeight);
- node.setLocation(oldLocation);
- }
-}
diff --git a/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/NodeEditPart.java b/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/NodeEditPart.java
index 04e1bb3..c0eeb30 100755
--- a/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/NodeEditPart.java
+++ b/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/NodeEditPart.java
@@ -193,7 +193,6 @@
switch (msg.getFeatureID(Node.class)) {
case ModelPackage.NODE__LOCATION:
case ModelPackage.NODE__WIDTH:
- case ModelPackage.NODE__HEIGHT:
refreshVisuals();
break;
case ModelPackage.NODE__READ_ONLY:
diff --git a/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/policies/DiagramLayoutEditPolicy.java b/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/policies/DiagramLayoutEditPolicy.java
index fb9955f..ae7e001 100755
--- a/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/policies/DiagramLayoutEditPolicy.java
+++ b/plugins/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/gef/edit/policies/DiagramLayoutEditPolicy.java
@@ -18,14 +18,11 @@
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.epf.authoring.gef.commands.ChangeBoundsCommand;
-import org.eclipse.epf.authoring.gef.commands.ChangeHeightCommand;
import org.eclipse.epf.authoring.gef.commands.CreateNodeCommand;
import org.eclipse.epf.authoring.gef.commands.MoveBendpointCommand;
import org.eclipse.epf.authoring.gef.edit.ActivityDetailDiagramEditPart;
import org.eclipse.epf.authoring.gef.edit.DiagramEditPart;
import org.eclipse.epf.authoring.gef.edit.LinkEditPart;
-import org.eclipse.epf.authoring.gef.edit.RoleTaskCompositeEditPart;
-import org.eclipse.epf.authoring.gef.edit.WorkProductCompositeEditPart;
import org.eclipse.epf.diagram.model.Diagram;
import org.eclipse.epf.diagram.model.Link;
import org.eclipse.epf.diagram.model.Node;
@@ -69,44 +66,21 @@
}
Node node = (Node) child.getModel();
- int directions = request.getResizeDirection();
-
- if ((directions & PositionConstants.NORTH_SOUTH)
- == PositionConstants.SOUTH){
- Point newLocation = node.getLocation().getTranslated(
- request.getMoveDelta());
- int newHeight = request.getSizeDelta().height;
- if (newHeight != 0) {
- newHeight += ((GraphicalEditPart) child).getFigure().getBounds().height;
- if (newHeight < 10)
- return UnexecutableCommand.INSTANCE;
- } else
- newHeight = ((GraphicalEditPart) child).getFigure().getBounds().height;
- return new ChangeHeightCommand(node, newLocation, newHeight);
- }
- else{
- // Other directions are EAST WEST.
- Point newLocation = node.getLocation().getTranslated(
- request.getMoveDelta());
- int newWidth = request.getSizeDelta().width;
- if (newWidth != 0) {
- newWidth += ((GraphicalEditPart) child).getFigure().getBounds().width;
- if (newWidth < 10)
- return UnexecutableCommand.INSTANCE;
- } else
- newWidth = ((GraphicalEditPart) child).getFigure().getBounds().width;
- return new ChangeBoundsCommand(node, newLocation, newWidth);
- }
+ Point newLocation = node.getLocation().getTranslated(
+ request.getMoveDelta());
+ int newWidth = request.getSizeDelta().width;
+ if (newWidth != 0) {
+ newWidth += ((GraphicalEditPart) child).getFigure().getBounds().width;
+ if (newWidth < 10)
+ return UnexecutableCommand.INSTANCE;
+ } else
+ newWidth = ((GraphicalEditPart) child).getFigure().getBounds().width;
+ return new ChangeBoundsCommand(node, newLocation, newWidth);
}
protected EditPolicy createChildEditPolicy(EditPart child) {
ResizableEditPolicy childPolicy = new ResizableEditPolicy();
- if(child instanceof RoleTaskCompositeEditPart ||
- child instanceof WorkProductCompositeEditPart){
- childPolicy.setResizeDirections(PositionConstants.NSEW);
- }else{
- childPolicy.setResizeDirections(PositionConstants.EAST_WEST);
- }
+ childPolicy.setResizeDirections(PositionConstants.EAST_WEST);
return childPolicy;
}