Skip to content
Snippets Groups Projects
Commit c815099c authored by Florian Hölzl's avatar Florian Hölzl
Browse files

Kernel: LWFXEF is accepting DND from model elements view.

parent 34cb1909
No related branches found
No related tags found
1 merge request!923921
ContextMenuUtil.java 405387151d45b09dffb3b6ba44f980313c8edcaf GREEN ContextMenuUtil.java 405387151d45b09dffb3b6ba44f980313c8edcaf GREEN
CurvedLinkLayoutedContentAnchorangeController.java 67c20e31ddb82fe2fd499117193353b0545839a0 GREEN CurvedLinkLayoutedContentAnchorangeController.java 67c20e31ddb82fe2fd499117193353b0545839a0 GREEN
EObjectDiagramController.java 2b253941592ee25ead95223470f983f23ef9776f YELLOW EObjectDiagramController.java 2b253941592ee25ead95223470f983f23ef9776f YELLOW
EObjectEllipticResizableContentControllerBase.java 3494d4f0dcdff5eb35f22f0e21d04df81b32e494 GREEN EObjectEllipticResizableContentControllerBase.java 7c862a03b97d2f2cfdcc2fcee7434de2e1e257d2 YELLOW
EObjectModelChangeProvider.java f4b60cebb088a5c81ca92a41614e1a5d40030502 GREEN EObjectModelChangeProvider.java f4b60cebb088a5c81ca92a41614e1a5d40030502 GREEN
EObjectRectangularResizableContentControllerBase.java f4a967591a60fadb20550ec3eaabccf240c9ec0d GREEN EObjectRectangularResizableContentControllerBase.java 28a17bf87f6a7222d927bc1c6b80967cb14b5f03 YELLOW
KernelServiceBasedModelChangeProviderBase.java 8d1f8ef79ecd383ff74e5a2bbcf24345aabe70af GREEN KernelServiceBasedModelChangeProviderBase.java 8d1f8ef79ecd383ff74e5a2bbcf24345aabe70af GREEN
LayoutModelChangeProvider.java b5449d02eaf39086909720c43e21bd061005fc9e GREEN LayoutModelChangeProvider.java b5449d02eaf39086909720c43e21bd061005fc9e GREEN
LayoutedContentAnchorageController.java 9fc513a7404277514c730f7702d45588f2d81878 GREEN LayoutedContentAnchorageController.java 9fc513a7404277514c730f7702d45588f2d81878 GREEN
......
...@@ -17,6 +17,8 @@ import static java.lang.Math.max; ...@@ -17,6 +17,8 @@ import static java.lang.Math.max;
import static java.util.Objects.requireNonNull; import static java.util.Objects.requireNonNull;
import static org.fortiss.tooling.base.ui.editor.fx.controller.ContextMenuUtil.createElementCompositionContext; import static org.fortiss.tooling.base.ui.editor.fx.controller.ContextMenuUtil.createElementCompositionContext;
import static org.fortiss.tooling.base.ui.editor.fx.controller.ContextMenuUtil.createPrototypeMenu; import static org.fortiss.tooling.base.ui.editor.fx.controller.ContextMenuUtil.createPrototypeMenu;
import static org.fortiss.tooling.base.ui.utils.FXDNDUtils.canCompose;
import static org.fortiss.tooling.base.ui.utils.FXDNDUtils.compose;
import java.util.List; import java.util.List;
...@@ -40,6 +42,7 @@ import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService; ...@@ -40,6 +42,7 @@ import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
import javafx.scene.Node; import javafx.scene.Node;
import javafx.scene.control.MenuItem; import javafx.scene.control.MenuItem;
import javafx.scene.input.Dragboard;
import javafx.scene.input.MouseEvent; import javafx.scene.input.MouseEvent;
/** /**
...@@ -148,4 +151,18 @@ public abstract class EObjectEllipticResizableContentControllerBase<T extends EO ...@@ -148,4 +151,18 @@ public abstract class EObjectEllipticResizableContentControllerBase<T extends EO
public IClickController getClickController(Node node, DiagramCoordinate diagramLocation) { public IClickController getClickController(Node node, DiagramCoordinate diagramLocation) {
return openEditorDoubleClickController; return openEditorDoubleClickController;
} }
/** {@inheritDoc} */
@Override
public boolean handleExternalDNDDragOver(Dragboard db, DiagramCoordinate diagramLocation) {
double zoom = getViewer().getFeatures().getCurrentZoomFactor();
return canCompose(db, diagramLocation, getModelElement(), false, zoom);
}
/** {@inheritDoc} */
@Override
public boolean handleExternalDNDDrop(Dragboard db, DiagramCoordinate diagramLocation) {
double zoom = getViewer().getFeatures().getCurrentZoomFactor();
return compose(db, diagramLocation, getModelElement(), false, zoom);
}
} }
...@@ -19,6 +19,8 @@ import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_SHA ...@@ -19,6 +19,8 @@ import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_SHA
import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_WIDTH; import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_WIDTH;
import static org.fortiss.tooling.base.ui.editor.fx.controller.ContextMenuUtil.createElementCompositionContext; import static org.fortiss.tooling.base.ui.editor.fx.controller.ContextMenuUtil.createElementCompositionContext;
import static org.fortiss.tooling.base.ui.editor.fx.controller.ContextMenuUtil.createPrototypeMenu; import static org.fortiss.tooling.base.ui.editor.fx.controller.ContextMenuUtil.createPrototypeMenu;
import static org.fortiss.tooling.base.ui.utils.FXDNDUtils.canCompose;
import static org.fortiss.tooling.base.ui.utils.FXDNDUtils.compose;
import java.util.List; import java.util.List;
...@@ -46,6 +48,7 @@ import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService; ...@@ -46,6 +48,7 @@ import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
import javafx.geometry.Dimension2D; import javafx.geometry.Dimension2D;
import javafx.scene.Node; import javafx.scene.Node;
import javafx.scene.control.MenuItem; import javafx.scene.control.MenuItem;
import javafx.scene.input.Dragboard;
import javafx.scene.input.MouseEvent; import javafx.scene.input.MouseEvent;
/** /**
...@@ -177,4 +180,18 @@ public abstract class EObjectRectangularResizableContentControllerBase<T extends ...@@ -177,4 +180,18 @@ public abstract class EObjectRectangularResizableContentControllerBase<T extends
public IClickController getClickController(Node node, DiagramCoordinate diagramLocation) { public IClickController getClickController(Node node, DiagramCoordinate diagramLocation) {
return openEditorDoubleClickController; return openEditorDoubleClickController;
} }
/** {@inheritDoc} */
@Override
public boolean handleExternalDNDDragOver(Dragboard db, DiagramCoordinate diagramLocation) {
double zoom = getViewer().getFeatures().getCurrentZoomFactor();
return canCompose(db, diagramLocation, getModelElement(), false, zoom);
}
/** {@inheritDoc} */
@Override
public boolean handleExternalDNDDrop(Dragboard db, DiagramCoordinate diagramLocation) {
double zoom = getViewer().getFeatures().getCurrentZoomFactor();
return compose(db, diagramLocation, getModelElement(), false, zoom);
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment