summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-11-01 02:43:11 (EDT)
committerSven Rottstock2012-11-01 02:43:11 (EDT)
commit92f6ef64f9e90a8285f49db3c4715dea7dd63819 (patch)
treed76906766140331ef06c87e846299d9ababd5f36
parent0c1717a4712201ad3a09d7f8ddcbfa6386ddce03 (diff)
downloadorg.eclipse.stardust.ui.web-92f6ef64f9e90a8285f49db3c4715dea7dd63819.zip
org.eclipse.stardust.ui.web-92f6ef64f9e90a8285f49db3c4715dea7dd63819.tar.gz
org.eclipse.stardust.ui.web-92f6ef64f9e90a8285f49db3c4715dea7dd63819.tar.bz2
CRNT-26804
Added code to updateAdjacentLanes co-ordinates in SwimlaneCommandHandler when lane is deleted. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@60466 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java
index 8079887..d33386a 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java
@@ -101,6 +101,8 @@ public class SwimlaneCommandHandler
removeLaneAndItsChildElements(lane);
parentSymbol.getLanes().remove(lane);
parentSymbol.getChildLanes().remove(lane);
+ // Update co-ordinates of adjacent Lanes
+ updateAdjacentLanes(lane, parentSymbol);
}
}
@@ -178,4 +180,25 @@ public class SwimlaneCommandHandler
// connIter.remove();
// }
}
+
+ /**
+ *
+ * @param currentLane
+ * @param poolSymbol
+ */
+ private void updateAdjacentLanes(LaneSymbol currentLane, PoolSymbol poolSymbol)
+ {
+ for (LaneSymbol laneSymbol : poolSymbol.getLanes())
+ {
+ // For all lanes to the right of current lane, adjust 'X'
+ if (laneSymbol.getElementOid() != currentLane.getElementOid()
+ && (laneSymbol.getXPos() > currentLane.getXPos()))
+ {
+ long xOffset = laneSymbol.getXPos() - currentLane.getXPos();
+ laneSymbol.setXPos(laneSymbol.getXPos() - xOffset);
+ // TODO - Implement for horizontal orientation
+ }
+ }
+ }
+
}