Cursor feedback is used for drag areas on content nodes.

Signed-off-by: Florian Hoelzl <hoelzl@fortiss.org>
diff --git a/example/org.eclipse.systemfocus.examples.function.architecture/src/org/eclipse/systemfocus/examples/function/architecture/playground/controllers/.ratings b/example/org.eclipse.systemfocus.examples.function.architecture/src/org/eclipse/systemfocus/examples/function/architecture/playground/controllers/.ratings
index 0a642ee..2fa50e7 100644
--- a/example/org.eclipse.systemfocus.examples.function.architecture/src/org/eclipse/systemfocus/examples/function/architecture/playground/controllers/.ratings
+++ b/example/org.eclipse.systemfocus.examples.function.architecture/src/org/eclipse/systemfocus/examples/function/architecture/playground/controllers/.ratings
@@ -2,6 +2,6 @@
 IngredientDiagramAnchorageController.java 5c3a5e27a20d12b6620a9ec338db2169379af02f RED
 IngredientFlowLinkController.java bf916dff1a77220da349cef03977cd01ea9b2d34 YELLOW
 MergeRecipeContentController.java 44e129102025c867242d5dbb765e4612eb6bf2f6 YELLOW
-SortRecipeContentController.java c27bd88be7b019f9f912620596da28ecdb784df7 YELLOW
+SortRecipeContentController.java 27b5e3724f1b84e8e4cf2485f2c933f85f2dc460 RED
 WasteDiagramAnchorageController.java a682f9009df2c5b00baf8fc4ae708957362402c6 YELLOW
 WasteFlowLinkController.java 6a12b7c21d802e79c14c0e3c86eb8351fbf4ffda YELLOW
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/.ratings b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/.ratings
index ec18e79..8933bc2 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/.ratings
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/.ratings
@@ -1,6 +1,7 @@
 DiagramLayers.java 05d07f0405541b5c4a976bff5f61d7a44426b873 YELLOW
 DiagramViewer.java ddbb88398fd1230862ca91b527d1b15cd44138bd YELLOW
 DiagramViewerDefaultTags.java dd93a45a79cf386696762b12460080d8310001b4 YELLOW
+EDragGesture.java 222f421d3dc99dbed1dc28c6428a60ce8e6df615 YELLOW
 FeedbackChange.java 529ff9430cdac3a906bee9dd72de53bc04a2d071 YELLOW
-GridCanvasVisual.java 5a61c93306ce8ed2db28ef0b485de0033258198d YELLOW
-MouseState.java ea9b4c000f77685ea89bd881cf02e78ebc7a58f1 YELLOW
+GridCanvasVisual.java 3345a95fd584eb1ec35ecde7d441801dd828b591 YELLOW
+MouseState.java 46e5f2e7c86a0c23f5aa00fa2e267e4136add77a YELLOW
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/EDragGesture.java b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/EDragGesture.java
new file mode 100644
index 0000000..222f421
--- /dev/null
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/EDragGesture.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2018 fortiss GmbH. 
+ * 
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v2.0 which is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * 
+ * SPDX-License-Identifier: EPL-2.0
+ * 
+ * Contributors:
+ *     Florian Hoelzl (fortiss GmbH) - initial implementation
+ *
+ *******************************************************************************/
+package org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef;
+
+/**
+ * Enumeration of gestures provided when the mouse is dragged at certain locations of visuals.
+ */
+public enum EDragGesture {
+	/** No dragging initiated. */
+	NONE,
+	/** Move gesture for diagram content and anchorage visuals. */
+	MOVE,
+	/** Resize vertically gesture. */
+	RESIZE_V,
+	/** Resize horizontally gesture. */
+	RESIZE_H,
+	/** Resize vertical and horizontal gesture. */
+	RESIZE_VH,
+	/** Create a link gesture. */
+	NEW_LINK,
+	/** Create a bend point gesture. */
+	NEW_BENDPOINT,
+	/** Move drag gesture for an existing bend point. */
+	MOVE_BENDPOINT;
+}
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/GridCanvasVisual.java b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/GridCanvasVisual.java
index 5a61c93..3345a95 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/GridCanvasVisual.java
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/GridCanvasVisual.java
@@ -21,6 +21,7 @@
 import javafx.geometry.Bounds;
 import javafx.geometry.Point2D;
 import javafx.geometry.Rectangle2D;
+import javafx.scene.Node;
 import javafx.scene.canvas.Canvas;
 import javafx.scene.canvas.GraphicsContext;
 
@@ -167,4 +168,10 @@
 		double is = gridConfig.getIndicatorSize() * zf;
 		gc.fillRect(x - is, y - is, 2 * is, 2 * is);
 	}
+
+	/** {@inheritDoc} */
+	@Override
+	public EDragGesture getDragGesture(Node node, Point2D locationOnNode) {
+		return EDragGesture.NONE;
+	}
 }
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/MouseState.java b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/MouseState.java
index ea9b4c0..46e5f2e 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/MouseState.java
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/MouseState.java
@@ -21,13 +21,16 @@
 import java.util.Map;
 
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.IClickController;
+import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.IController;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.IDragController;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.IKeyPressController;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.ILinkController;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IMVCBundle;
 
 import javafx.event.EventHandler;
+import javafx.geometry.Bounds;
 import javafx.geometry.Point2D;
+import javafx.scene.Cursor;
 import javafx.scene.Node;
 import javafx.scene.input.KeyEvent;
 import javafx.scene.input.MouseButton;
@@ -65,7 +68,7 @@
 			// wild cast works, since source is in nodesMap
 			Node source = (Node)event.getSource();
 			IMVCBundle bundle = nodesToBundleMap.get(source);
-			Point2D locationOnNode = new Point2D(event.getX(), event.getY());
+			Point2D locationOnNode = getLocationOnNode(source, event.getX(), event.getY());
 			IClickController cc = bundle.getController().getClickController(source, locationOnNode);
 			if(cc != null) {
 				if(event.getButton() == MouseButton.SECONDARY) {
@@ -105,7 +108,7 @@
 			Node source = (Node)event.getSource();
 			IMVCBundle bundle = nodesToBundleMap.get(source);
 			startPointInScene = new Point2D(event.getSceneX(), event.getSceneY());
-			Point2D locationOnNode = source.sceneToLocal(startPointInScene);
+			Point2D locationOnNode = getLocationOnNode(source, event.getX(), event.getY());
 			dragInProgress = true;
 			if(event.isControlDown()) {
 				// start a link gesture
@@ -143,8 +146,9 @@
 			// wild cast works, since source is in nodesMap
 			Node source = (Node)event.getSource();
 			IMVCBundle bundle = nodesToBundleMap.get(source);
-			Point2D endLocationOnNode = new Point2D(event.getX(), event.getY());
+			Point2D endLocationOnNode = getLocationOnNode(source, event.getX(), event.getY());
 
+			// FIXME
 			Point2D startLocationOnNode = startNode.sceneToLocal(startPointInScene);
 			ILinkController lcStart =
 					startBundle.getController().getLinkController(startNode, startLocationOnNode);
@@ -175,7 +179,7 @@
 			Node source = (Node)event.getSource();
 			IMVCBundle bundle = nodesToBundleMap.get(source);
 
-			Point2D locationOnNode = new Point2D(event.getX(), event.getY());
+			Point2D locationOnNode = getLocationOnNode(source, event.getX(), event.getY());
 			if(startBundle != null) {
 				// handle link gesture
 				ILinkController lc =
@@ -206,7 +210,7 @@
 			// wild cast works, since source is in nodesMap
 			Node source = (Node)event.getSource();
 			IMVCBundle bundle = nodesToBundleMap.get(source);
-			Point2D locationOnNode = new Point2D(event.getX(), event.getY());
+			Point2D locationOnNode = getLocationOnNode(source, event.getX(), event.getY());
 			if(dragInProgress) {
 				if(startBundle == null) {
 					IDragController dc =
@@ -230,6 +234,7 @@
 			}
 			// wild cast works, since source is in nodesMap
 			Node source = (Node)event.getSource();
+			Point2D locationOnNode = getLocationOnNode(source, event.getX(), event.getY());
 			IMVCBundle bundle = nodesToBundleMap.get(source);
 			if(event.getEventType() == MOUSE_ENTERED) {
 				bundle.addTag(HOVER_TAG);
@@ -238,6 +243,28 @@
 				bundle.removeTag(HOVER_TAG);
 				bundle.getVisual().updateNodes(viewer.getLayers());
 			}
+			IController ctrl = bundle.getController();
+			Cursor cursor = ctrl.getCurrentCursor(source, locationOnNode);
+			source.setCursor(cursor);
+			event.consume();
+		}
+	};
+
+	/** The mouse motion handler used for updating the cursor. */
+	private EventHandler<MouseEvent> mouseMotionHandler = new EventHandler<MouseEvent>() {
+		@Override
+		public void handle(MouseEvent event) {
+			if(!nodesToBundleMap.containsKey(event.getSource())) {
+				return;
+			}
+			// wild cast works, since source is in nodesMap
+			Node source = (Node)event.getSource();
+			Point2D locationOnNode = getLocationOnNode(source, event.getX(), event.getY());
+			IMVCBundle bundle = nodesToBundleMap.get(source);
+			IController ctrl = bundle.getController();
+			Cursor cursor = ctrl.getCurrentCursor(source, locationOnNode);
+			source.setCursor(cursor);
+			event.consume();
 		}
 	};
 
@@ -278,6 +305,7 @@
 		node.setOnMouseDragOver(mouseDraggedHandler);
 		node.setOnMouseReleased(mouseReleasedHandler);
 		node.setOnMouseDragReleased(mouseLinkCompletedHandler);
+		node.setOnMouseMoved(mouseMotionHandler);
 		node.setOnKeyReleased(keyEventHandler);
 		nodesToBundleMap.put(node, mvcb);
 	}
@@ -285,6 +313,7 @@
 	/** Unregisters the mouse motion tracker recursively from all elements of the given node. */
 	/* package */ void unregisterMouseListeners(Node node) {
 		node.setOnKeyReleased(null);
+		node.setOnMouseMoved(null);
 		node.setOnMouseDragReleased(null);
 		node.setOnMouseReleased(null);
 		node.setOnMouseDragOver(null);
@@ -296,4 +325,10 @@
 		node.setOnMousePressed(null);
 		nodesToBundleMap.remove(node);
 	}
+
+	/** Returns the location of the given coordinates relative to the given node. */
+	private Point2D getLocationOnNode(Node source, double x, double y) {
+		Bounds boundsInParent = source.getBoundsInParent();
+		return new Point2D(x - boundsInParent.getMinX(), y - boundsInParent.getMinY());
+	}
 }
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/controller/.ratings b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/controller/.ratings
index a2f7295..008a122 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/controller/.ratings
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/controller/.ratings
@@ -1,5 +1,5 @@
 IClickController.java 0795b8470dd66770e21f0ad2d7e434c01e5aa999 YELLOW
-IController.java 5d25d0cf58c79dda8fe4a5a014e21aea22144a72 YELLOW
+IController.java 70bbdab4cbb5d1033834f61c9ff95639c0b5324b YELLOW
 IControllerFactory.java f17c4cfc659cae1205f314b6b227dc3c712f21b0 YELLOW
 IDragController.java 631b3a465a3b6b766aafdc10352498348856ab6b YELLOW
 IKeyPressController.java d96fae087071cf2ae2ba03306410af18563f4f17 YELLOW
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/controller/IController.java b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/controller/IController.java
index 5d25d0c..70bbdab 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/controller/IController.java
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/controller/IController.java
@@ -20,6 +20,7 @@
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.MVCBundleTag;
 
 import javafx.geometry.Point2D;
+import javafx.scene.Cursor;
 import javafx.scene.Node;
 import javafx.scene.control.MenuItem;
 
@@ -60,4 +61,10 @@
 
 	/** Returns the link target effect tag for link gesture starting at the given bundle. */
 	MVCBundleTag getLinkTargetEffectForLinkFrom(IMVCBundle linkStartBundle);
+
+	/**
+	 * Returns the mouse cursor to be used when the pointer is over the given node at the given
+	 * location.
+	 */
+	Cursor getCurrentCursor(Node node, Point2D locationOnNode);
 }
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/controller/base/.ratings b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/controller/base/.ratings
index f0a5f99..d429d2c 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/controller/base/.ratings
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/controller/base/.ratings
@@ -1,5 +1,5 @@
 ClickControllerBase.java 31af12f85c374de0fe81e16f1879c9a81e11e8bc YELLOW
-ControllerBase.java 853b439724b829f785a837d3e67015e813179825 YELLOW
+ControllerBase.java 9233b149cd1dc85cff1d17b2780f5eecb2a92dff YELLOW
 DefaultContentAnchorageControllerBase.java 2e3189972cf34f5cc868bd458c84cb3d2f0eddf1 YELLOW
 DefaultDiagramAnchorageControllerBase.java 0df0e7868a61043611eb3db15ad8108c5cbb7f76 YELLOW
 DefaultDiagramController.java df1c05168a9aba18d807a83232ec44e48029b67e YELLOW
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/controller/base/ControllerBase.java b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/controller/base/ControllerBase.java
index 853b439..9233b14 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/controller/base/ControllerBase.java
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/controller/base/ControllerBase.java
@@ -18,6 +18,7 @@
 
 import java.util.List;
 
+import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.EDragGesture;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.FeedbackChange;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.configuration.GridConfiguration;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.IClickController;
@@ -33,6 +34,7 @@
 
 import javafx.geometry.Point2D;
 import javafx.geometry.Rectangle2D;
+import javafx.scene.Cursor;
 import javafx.scene.Node;
 import javafx.scene.control.MenuItem;
 import javafx.scene.input.KeyCode;
@@ -104,7 +106,7 @@
 	public IDragController getDragController(Node node, Point2D locationOnNode) {
 		if(getVisual() instanceof VisualBase) {
 			VisualBase vb = (VisualBase)getVisual();
-			if(allowMove() && vb.isMoveHandle(node)) {
+			if(allowMove() && vb.getDragGesture(node, locationOnNode) == EDragGesture.MOVE) {
 				return getMoveController();
 			}
 		}
@@ -272,4 +274,26 @@
 	public IKeyPressController getKeyPressController(Node node) {
 		return defaultKeyPressController;
 	}
+
+	/** {@inheritDoc} */
+	@Override
+	public Cursor getCurrentCursor(Node node, Point2D locationOnNode) {
+		EDragGesture edg = getVisual().getDragGesture(node, locationOnNode);
+		switch(edg) {
+			case MOVE:
+			case MOVE_BENDPOINT:
+				return Cursor.MOVE;
+			case RESIZE_H:
+				return Cursor.H_RESIZE;
+			case RESIZE_V:
+				return Cursor.V_RESIZE;
+			case RESIZE_VH:
+				return Cursor.SE_RESIZE;
+			case NEW_LINK:
+			case NEW_BENDPOINT:
+				return Cursor.CROSSHAIR;
+			default:
+				return Cursor.DEFAULT;
+		}
+	}
 }
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/.ratings b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/.ratings
index 1b72f62..62936eb 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/.ratings
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/.ratings
@@ -1,10 +1,7 @@
-EFocusSelectionEffect.java 0e145b6787aa8c90e020d6e0261674aef51a7b6e YELLOW
-EHoverEffect.java 348c85b11f0d643dcfa61842c5335e8da804b4ac YELLOW
-ELinkTargetEffect.java 1c5dd021d6a82d3edfffc55201df35c5dfa3ce33 YELLOW
 IAnchorageVisual.java 8e52d431e591bb84b2300a7d08f597e873047392 YELLOW
 IContentAnchorageVisual.java 5e46945d8270584bd4cae5a44052540a6a7f0857 YELLOW
 IContentVisual.java 9c174d17b0e4cbb96f8cc4e6ad2b0924cd2beaf5 YELLOW
 IDiagramAnchorageVisual.java 080a9e85a4ea68c9f49a30579f6c8dea9e1a489e YELLOW
 ILinkVisual.java 21af7b41510103de023efc4d3013c4a6cb02351f YELLOW
-IVisual.java 326c98e8661b484a81e7475c55a4de5a8ef55d6f YELLOW
+IVisual.java a64324dc4081045da22b8d0314f16cd8bb56df40 YELLOW
 IVisualFactory.java 3257ec98c26ce1b79229a5293b1b769dc461d30f YELLOW
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/IVisual.java b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/IVisual.java
index 326c98e..a64324d 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/IVisual.java
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/IVisual.java
@@ -14,6 +14,7 @@
 package org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual;
 
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.DiagramLayers;
+import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.EDragGesture;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IMVCBundlePart;
 
 import javafx.geometry.Point2D;
@@ -54,4 +55,15 @@
 
 	/** Requests the focus on a specific node determined by this visual. */
 	void requestFocus();
+
+	/**
+	 * Returns the {@link EDragGesture} for the given node the location on it.
+	 * 
+	 * @param node
+	 *            the node to be checked
+	 * @param locationOnNode
+	 *            the location on the given node
+	 * @return if the node is handle that can be moved
+	 */
+	public EDragGesture getDragGesture(Node node, Point2D locationOnNode);
 }
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/base/.ratings b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/base/.ratings
index f79cccf..72d502d 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/base/.ratings
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/base/.ratings
@@ -4,4 +4,4 @@
 LinkVisualBase.java 8459ace47660234116acbdcf7038bede96828c46 YELLOW
 MVCBundlePartWithEffectsBase.java 971c7cdb403598aa0e8f9f871401caa884b7bf60 YELLOW
 ResizableContentVisualBase.java 1cabf0f037b984a6798ac83d0bd4dec7a795720d YELLOW
-VisualBase.java f13f5be2e6af60fb195fbc8dc2081a810409bd22 YELLOW
+VisualBase.java 2bea191ca6736c2e89c222473803c0e4890820eb YELLOW
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/base/VisualBase.java b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/base/VisualBase.java
index f13f5be..2bea191 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/base/VisualBase.java
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/base/VisualBase.java
@@ -20,6 +20,7 @@
 import static javafx.scene.shape.StrokeType.INSIDE;
 
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.DiagramLayers;
+import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.EDragGesture;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IMVCBundle;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.IVisual;
 
@@ -81,15 +82,10 @@
 		layers.getVisualFeedbackLayer().remove(hoverText);
 	}
 
-	/**
-	 * Returns whether the given node acts as a move handle for this visual.
-	 * 
-	 * @param node
-	 *            the node to be checked
-	 * @return if the node is handle that can be moved
-	 */
-	public boolean isMoveHandle(Node node) {
-		return false;
+	/** {@inheritDoc} */
+	@Override
+	public EDragGesture getDragGesture(Node node, Point2D locationOnNode) {
+		return EDragGesture.NONE;
 	}
 
 	/** Returns the opacity of the content visual. */
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/.ratings b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/.ratings
index 3f3afcd..f5f40e5 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/.ratings
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/.ratings
@@ -1,6 +1,6 @@
-CircularContentAnchorageVisualBase.java 0032dde191a4b9ff119a31e0384b6909b8339993 YELLOW
-CircularDiagramAnchorageVisualBase.java baa0b57a21cd40f3454df5ed24241fe60947f146 YELLOW
-CurveLinkVisualBase.java 084b91f2387c0263d862f8fac21f223afff63e30 YELLOW
+CircularContentAnchorageVisualBase.java 82eef95197b3fab073e7c7d3e0e4fc7e7949d61d YELLOW
+CircularDiagramAnchorageVisualBase.java f2729ec109d8930e9d5204ad4a326dfa5e943bbd YELLOW
+CurveLinkVisualBase.java 1c31b6d7f250df2a3869c5b3e97dc336edf8273d YELLOW
 CurveSegment.java 615b9ffa05d94733a2eff2ceac695def23fd43d3 YELLOW
 EllipticBorderLocation.java e2d393fc3543b905af9845a07c031f95fb8f1118 YELLOW
-EllipticContentVisualBase.java 37ea36bcbd08565e2dbaa680e94f63bfa64b23fe YELLOW
+EllipticContentVisualBase.java fb4b3716aa3dd16b40eb59e171bcb5b82b6448bf YELLOW
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/CircularContentAnchorageVisualBase.java b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/CircularContentAnchorageVisualBase.java
index 0032dde..82eef95 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/CircularContentAnchorageVisualBase.java
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/CircularContentAnchorageVisualBase.java
@@ -17,10 +17,12 @@
 import static org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.DiagramViewerDefaultTags.HIGHLIGHT_OUTGOING_LINK_TAG;
 
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.DiagramLayers;
+import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.EDragGesture;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IContentAnchorageMVCBundle;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.IContentAnchorageVisual;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.base.ContentAnchorageVisualBase;
 
+import javafx.geometry.Point2D;
 import javafx.geometry.Rectangle2D;
 import javafx.scene.Node;
 import javafx.scene.shape.Circle;
@@ -86,8 +88,11 @@
 
 	/** {@inheritDoc} */
 	@Override
-	public boolean isMoveHandle(Node n) {
-		return n == circle;
+	public EDragGesture getDragGesture(Node n, Point2D locationOnNode) {
+		if(n == circle) {
+			return EDragGesture.MOVE;
+		}
+		return EDragGesture.NONE;
 	}
 
 	/** {@inheritDoc} */
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/CircularDiagramAnchorageVisualBase.java b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/CircularDiagramAnchorageVisualBase.java
index baa0b57..f2729ec 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/CircularDiagramAnchorageVisualBase.java
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/CircularDiagramAnchorageVisualBase.java
@@ -17,9 +17,11 @@
 import static org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.DiagramViewerDefaultTags.HIGHLIGHT_OUTGOING_LINK_TAG;
 
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.DiagramLayers;
+import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.EDragGesture;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IDiagramAnchorageMVCBundle;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.base.DiagramAnchorageVisualBase;
 
+import javafx.geometry.Point2D;
 import javafx.geometry.Rectangle2D;
 import javafx.scene.Node;
 import javafx.scene.shape.Circle;
@@ -87,8 +89,11 @@
 
 	/** {@inheritDoc} */
 	@Override
-	public boolean isMoveHandle(Node n) {
-		return n == circle;
+	public EDragGesture getDragGesture(Node n, Point2D locationOnNode) {
+		if(n == circle) {
+			return EDragGesture.MOVE;
+		}
+		return EDragGesture.NONE;
 	}
 
 	/** {@inheritDoc} */
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/CurveLinkVisualBase.java b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/CurveLinkVisualBase.java
index 084b91f..1c31b6d 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/CurveLinkVisualBase.java
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/CurveLinkVisualBase.java
@@ -22,6 +22,7 @@
 import java.util.List;
 
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.DiagramLayers;
+import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.EDragGesture;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.FeedbackChange;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IAnchorageMVCBundle;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.ILinkMVCBundle;
@@ -342,4 +343,11 @@
 	protected double getArrowLength() {
 		return 10;
 	}
+
+	/** {@inheritDoc} */
+	@Override
+	public EDragGesture getDragGesture(Node node, Point2D locationOnNode) {
+		// FIXME: bend point create gesture
+		return EDragGesture.NONE;
+	}
 }
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/EllipticContentVisualBase.java b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/EllipticContentVisualBase.java
index 37ea36b..fb4b371 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/EllipticContentVisualBase.java
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/elliptic/EllipticContentVisualBase.java
@@ -19,6 +19,7 @@
 import static org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.elliptic.EllipticBorderLocation.getClosestLocationOnBounds;
 
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.DiagramLayers;
+import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.EDragGesture;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IContentMVCBundle;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.IContentAnchorageVisual;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.base.ResizableContentVisualBase;
@@ -180,8 +181,11 @@
 
 	/** {@inheritDoc} */
 	@Override
-	public boolean isMoveHandle(Node n) {
-		return n == ellipse || n == text;
+	public EDragGesture getDragGesture(Node n, Point2D locationOnNode) {
+		if(n == ellipse || n == text) {
+			return EDragGesture.MOVE;
+		}
+		return EDragGesture.NONE;
 	}
 
 	/** {@inheritDoc} */
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/.ratings b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/.ratings
index 8197786..376d7c5 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/.ratings
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/.ratings
@@ -1,6 +1,6 @@
-LineLinkVisualBase.java ec96b91a2554bc3d4477483e3f0aa03e89e57801 YELLOW
+LineLinkVisualBase.java ea315aa54996a80672affd45699bf4881add80c2 YELLOW
 LineSegment.java f5da73d032d9b7a27325bcc9b46147db085de250 YELLOW
 RectangularBorderLocation.java c6c8641012c31e0bb939e6bdf0dfa1f020cc3c51 YELLOW
-RectangularContentAnchorageVisualBase.java b01234e8b3d087f946ba1663f7115ba9e0e00e2e YELLOW
-RectangularContentVisualBase.java 0ef23d60fd1e3675943e87832d48c4f062e5dc84 YELLOW
-RectangularDiagramAnchorageVisualBase.java 61969770e0bc180b2ac254f08c4006bb8d8e72d3 YELLOW
+RectangularContentAnchorageVisualBase.java cf2040293cc468cf8e97cd3656bc66580a08eea6 YELLOW
+RectangularContentVisualBase.java 8a8d0437d0b9c2fc110232ff5ba572b88fcde710 YELLOW
+RectangularDiagramAnchorageVisualBase.java f08633cd9bed8c933af7591a6405de1b56294c61 YELLOW
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/LineLinkVisualBase.java b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/LineLinkVisualBase.java
index ec96b91..ea315aa 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/LineLinkVisualBase.java
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/LineLinkVisualBase.java
@@ -22,6 +22,7 @@
 import java.util.List;
 
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.DiagramLayers;
+import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.EDragGesture;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.FeedbackChange;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IAnchorageMVCBundle;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.ILinkMVCBundle;
@@ -330,4 +331,11 @@
 			segments.get(0).getVisibleLine().requestFocus();
 		}
 	}
+
+	/** {@inheritDoc} */
+	@Override
+	public EDragGesture getDragGesture(Node node, Point2D locationOnNode) {
+		// FIXME: bendpoint create gesture
+		return EDragGesture.NONE;
+	}
 }
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/RectangularContentAnchorageVisualBase.java b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/RectangularContentAnchorageVisualBase.java
index b01234e..cf20402 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/RectangularContentAnchorageVisualBase.java
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/RectangularContentAnchorageVisualBase.java
@@ -17,11 +17,13 @@
 import static org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.DiagramViewerDefaultTags.HIGHLIGHT_OUTGOING_LINK_TAG;
 
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.DiagramLayers;
+import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.EDragGesture;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IContentAnchorageMVCBundle;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.IContentAnchorageVisual;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.base.ContentAnchorageVisualBase;
 
 import javafx.geometry.Insets;
+import javafx.geometry.Point2D;
 import javafx.geometry.Rectangle2D;
 import javafx.scene.Node;
 import javafx.scene.shape.Rectangle;
@@ -91,8 +93,11 @@
 
 	/** {@inheritDoc} */
 	@Override
-	public boolean isMoveHandle(Node n) {
-		return n == rectangle;
+	public EDragGesture getDragGesture(Node n, Point2D locationOnNode) {
+		if(n == rectangle) {
+			return EDragGesture.MOVE;
+		}
+		return EDragGesture.NONE;
 	}
 
 	/** {@inheritDoc} */
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/RectangularContentVisualBase.java b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/RectangularContentVisualBase.java
index 259a995..8a8d043 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/RectangularContentVisualBase.java
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/RectangularContentVisualBase.java
@@ -18,11 +18,13 @@
 import static org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.rectangular.RectangularBorderLocation.getClosestLocationOnBounds;
 
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.DiagramLayers;
+import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.EDragGesture;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IContentMVCBundle;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.IContentAnchorageVisual;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.base.ResizableContentVisualBase;
 
 import javafx.collections.ObservableList;
+import javafx.geometry.Bounds;
 import javafx.geometry.Dimension2D;
 import javafx.geometry.Insets;
 import javafx.geometry.Point2D;
@@ -88,20 +90,19 @@
 			rectangle.setFill(getFillColor());
 			// resize hit area
 			Rectangle ha = (Rectangle)hitArea;
-			Insets i = getHitAreaInsets();
-			ha.setX(leftX - i.getLeft());
-			ha.setY(upperY - i.getTop());
-			ha.setWidth(i.getLeft() + width + i.getRight());
-			ha.setHeight(i.getTop() + height + i.getBottom());
+			double i = getHitAreaStartLinkSize();
+			ha.setX(leftX - i);
+			ha.setY(upperY - i);
+			ha.setWidth(i + width + i);
+			ha.setHeight(i + height + i);
 		} else {
 			Dimension2D bevelDist = getBevelDistance();
 			double dx = bevelDist.getWidth();
 			double dy = bevelDist.getHeight();
-			createBevelPath(leftX, rightX, upperY, lowerY, dx, dy, bevelShape.getElements(),
-					Insets.EMPTY);
+			createBevelPath(leftX, rightX, upperY, lowerY, dx, dy, bevelShape.getElements(), 0);
 			Path ha = (Path)hitArea;
 			createBevelPath(leftX, rightX, upperY, lowerY, dx, dy, ha.getElements(),
-					getHitAreaInsets());
+					getHitAreaStartLinkSize());
 			bevelShape.setOpacity(getOpacity());
 			bevelShape.setStroke(getBorderColor());
 			bevelShape.setStrokeWidth(getBorderWidth());
@@ -120,17 +121,17 @@
 
 	/** Creates the path of the bevel shape. */
 	private void createBevelPath(double leftX, double rightX, double upperY, double lowerY,
-			double dx, double dy, ObservableList<PathElement> path, Insets insets) {
+			double dx, double dy, ObservableList<PathElement> path, double insets) {
 		path.clear();
-		path.add(new MoveTo(leftX - insets.getLeft(), upperY + dy - insets.getTop()));
-		path.add(new LineTo(leftX + dx - insets.getLeft(), upperY - insets.getTop()));
-		path.add(new LineTo(rightX - dx + insets.getRight(), upperY - insets.getTop()));
-		path.add(new LineTo(rightX + insets.getRight(), upperY + dy - insets.getTop()));
-		path.add(new LineTo(rightX + insets.getRight(), lowerY - dy + insets.getBottom()));
-		path.add(new LineTo(rightX - dx + insets.getRight(), lowerY + insets.getBottom()));
-		path.add(new LineTo(leftX + dx - insets.getLeft(), lowerY + insets.getBottom()));
-		path.add(new LineTo(leftX - insets.getLeft(), lowerY - dy + insets.getBottom()));
-		path.add(new LineTo(leftX - insets.getLeft(), upperY + dy - insets.getTop()));
+		path.add(new MoveTo(leftX - insets, upperY + dy - insets));
+		path.add(new LineTo(leftX + dx - insets, upperY - insets));
+		path.add(new LineTo(rightX - dx + insets, upperY - insets));
+		path.add(new LineTo(rightX + insets, upperY + dy - insets));
+		path.add(new LineTo(rightX + insets, lowerY - dy + insets));
+		path.add(new LineTo(rightX - dx + insets, lowerY + insets));
+		path.add(new LineTo(leftX + dx - insets, lowerY + insets));
+		path.add(new LineTo(leftX - insets, lowerY - dy + insets));
+		path.add(new LineTo(leftX - insets, upperY + dy - insets));
 	}
 
 	/** Returns the anchor location relative to the parent bounds. */
@@ -244,15 +245,42 @@
 
 	/** {@inheritDoc} */
 	@Override
-	public boolean isMoveHandle(Node n) {
+	public EDragGesture getDragGesture(Node n, Point2D locationOnNode) {
 		if(n == hitArea) {
 			if(useRoundedRectangle()) {
-
-			} else {
-
+				double x = locationOnNode.getX();
+				double y = locationOnNode.getY();
+				double l = getHitAreaStartLinkSize();
+				double r = getHitAreaResizeSize();
+				Bounds bounds = n.getBoundsInLocal();
+				// check for move area
+				double inset = l + r;
+				Rectangle2D moveArea = new Rectangle2D(l, l, bounds.getWidth() - 2 * - -r,
+						bounds.getHeight() - 2 * l - r);
+				if(moveArea.contains(x, y)) {
+					return EDragGesture.MOVE;
+				}
+				if(x < l || y < l || x > bounds.getWidth() - l || y > bounds.getHeight() - l) {
+					return EDragGesture.NEW_LINK;
+				}
+				if(x > bounds.getWidth() - inset && y >= l && y <= bounds.getHeight() - inset) {
+					return EDragGesture.RESIZE_H;
+				}
+				if(y > bounds.getHeight() - inset && x >= l && x <= bounds.getWidth() - inset) {
+					return EDragGesture.RESIZE_V;
+				}
+				if(x > bounds.getWidth() - inset && y > bounds.getHeight() - inset) {
+					return EDragGesture.RESIZE_VH;
+				}
+				return EDragGesture.NONE;
 			}
+			// TODO:
+			return EDragGesture.NONE;
 		}
-		return n == rectangle || n == text;
+		if(n == rectangle || n == text) {
+			return EDragGesture.MOVE;
+		}
+		return EDragGesture.NONE;
 	}
 
 	/** {@inheritDoc} */
@@ -271,8 +299,17 @@
 		return bevelShape;
 	}
 
-	/** Returns the extension of the hit area in pixel. */
-	protected Insets getHitAreaInsets() {
-		return new Insets(5, 5, 5, 5);
+	/**
+	 * Returns the extension of the hit area in pixel used to trigger link creation. This number
+	 * specifies how many pixels beyond the visible border are used to trigger link creation by a
+	 * mouse drag gesture.
+	 */
+	protected double getHitAreaStartLinkSize() {
+		return 10;
+	}
+
+	/** Returns the size of the hit area in pixel used to resize the content visual. */
+	protected double getHitAreaResizeSize() {
+		return 15;
 	}
 }
diff --git a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/RectangularDiagramAnchorageVisualBase.java b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/RectangularDiagramAnchorageVisualBase.java
index 6196977..f08633c 100644
--- a/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/RectangularDiagramAnchorageVisualBase.java
+++ b/org.eclipse.systemfocus.kernel.common.ui/src/org/eclipse/systemfocus/kernel/common/ui/javafx/lwfxef/visual/rectangular/RectangularDiagramAnchorageVisualBase.java
@@ -17,9 +17,11 @@
 import static org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.DiagramViewerDefaultTags.HIGHLIGHT_OUTGOING_LINK_TAG;
 
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.DiagramLayers;
+import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.EDragGesture;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IDiagramAnchorageMVCBundle;
 import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.base.DiagramAnchorageVisualBase;
 
+import javafx.geometry.Point2D;
 import javafx.geometry.Rectangle2D;
 import javafx.scene.Node;
 import javafx.scene.shape.Rectangle;
@@ -83,8 +85,11 @@
 
 	/** {@inheritDoc} */
 	@Override
-	public boolean isMoveHandle(Node n) {
-		return n == rectangle;
+	public EDragGesture getDragGesture(Node n, Point2D locationOnNode) {
+		if(n == rectangle) {
+			return EDragGesture.MOVE;
+		}
+		return EDragGesture.NONE;
 	}
 
 	/** {@inheritDoc} */