Class CreateAdaptedConnectionOnDragHandler<R extends Model,O>
- java.lang.Object
-
- org.eclipse.gef.common.adapt.IAdaptable.Bound.Impl<org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node>>
-
- org.eclipse.gef.mvc.fx.handlers.AbstractHandler
-
- net.officefloor.gef.editor.internal.handlers.CreateAdaptedConnectionOnDragHandler<R,O>
-
- All Implemented Interfaces:
org.eclipse.gef.common.adapt.IAdaptable.Bound<org.eclipse.gef.mvc.fx.parts.IVisualPart<? extends javafx.scene.Node>>,org.eclipse.gef.mvc.fx.handlers.IHandler,org.eclipse.gef.mvc.fx.handlers.IOnDragHandler
public class CreateAdaptedConnectionOnDragHandler<R extends Model,O> extends org.eclipse.gef.mvc.fx.handlers.AbstractHandler implements org.eclipse.gef.mvc.fx.handlers.IOnDragHandler
-
-
Constructor Summary
Constructors Constructor Description CreateAdaptedConnectionOnDragHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabortDrag()protected voidcleanupDrag()Cleans up the drag.voiddrag(javafx.scene.input.MouseEvent event, org.eclipse.gef.geometry.planar.Dimension delta)voidendDrag(javafx.scene.input.MouseEvent e, org.eclipse.gef.geometry.planar.Dimension delta)protected org.eclipse.gef.mvc.fx.parts.CircleSegmentHandlePartfindBendTargetPart(AdaptedConnectionPart<R,O,?> connectionPart, javafx.event.EventTarget eventTarget)Finds theCircleSegmentHandlePartfor the targetIBendableContentPart.BendPoint.protected AdaptedConnectablePartgetAdaptedConnectablePart()Obtains theAdaptedConnectablePartfor the start of the drag.protected org.eclipse.gef.mvc.fx.viewer.IViewergetContentViewer()Obtains the contentIViewer.protected org.eclipse.gef.geometry.planar.PointgetLocation(javafx.scene.input.MouseEvent e)Obtains the location of theMouseEvent.voidhideIndicationCursor()booleanshowIndicationCursor(javafx.scene.input.KeyEvent event)booleanshowIndicationCursor(javafx.scene.input.MouseEvent event)voidstartDrag(javafx.scene.input.MouseEvent event)-
Methods inherited from class org.eclipse.gef.mvc.fx.handlers.AbstractHandler
commit, execute, getHost, init, isRegistered, isRegisteredForHost, restoreRefreshVisuals, rollback, storeAndDisableRefreshVisuals
-
Methods inherited from class org.eclipse.gef.common.adapt.IAdaptable.Bound.Impl
adaptableProperty, getAdaptable, setAdaptable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
getAdaptedConnectablePart
protected AdaptedConnectablePart getAdaptedConnectablePart()
Obtains theAdaptedConnectablePartfor the start of the drag.- Returns:
AdaptedConnectablePart.
-
getLocation
protected org.eclipse.gef.geometry.planar.Point getLocation(javafx.scene.input.MouseEvent e)
Obtains the location of theMouseEvent.- Parameters:
e-MouseEvent.- Returns:
Pointlocation of theMouseEvent.
-
findBendTargetPart
protected org.eclipse.gef.mvc.fx.parts.CircleSegmentHandlePart findBendTargetPart(AdaptedConnectionPart<R,O,?> connectionPart, javafx.event.EventTarget eventTarget)
Finds theCircleSegmentHandlePartfor the targetIBendableContentPart.BendPoint.- Parameters:
connectionPart-AdaptedConnectionPart.eventTarget-EventTarget.- Returns:
- Target
CircleSegmentHandlePart.
-
getContentViewer
protected org.eclipse.gef.mvc.fx.viewer.IViewer getContentViewer()
Obtains the contentIViewer.- Returns:
- Content
IViewer.
-
cleanupDrag
protected void cleanupDrag()
Cleans up the drag.
-
startDrag
public void startDrag(javafx.scene.input.MouseEvent event)
- Specified by:
startDragin interfaceorg.eclipse.gef.mvc.fx.handlers.IOnDragHandler
-
drag
public void drag(javafx.scene.input.MouseEvent event, org.eclipse.gef.geometry.planar.Dimension delta)- Specified by:
dragin interfaceorg.eclipse.gef.mvc.fx.handlers.IOnDragHandler
-
abortDrag
public void abortDrag()
- Specified by:
abortDragin interfaceorg.eclipse.gef.mvc.fx.handlers.IOnDragHandler
-
endDrag
public void endDrag(javafx.scene.input.MouseEvent e, org.eclipse.gef.geometry.planar.Dimension delta)- Specified by:
endDragin interfaceorg.eclipse.gef.mvc.fx.handlers.IOnDragHandler
-
hideIndicationCursor
public void hideIndicationCursor()
- Specified by:
hideIndicationCursorin interfaceorg.eclipse.gef.mvc.fx.handlers.IOnDragHandler
-
showIndicationCursor
public boolean showIndicationCursor(javafx.scene.input.KeyEvent event)
- Specified by:
showIndicationCursorin interfaceorg.eclipse.gef.mvc.fx.handlers.IOnDragHandler
-
showIndicationCursor
public boolean showIndicationCursor(javafx.scene.input.MouseEvent event)
- Specified by:
showIndicationCursorin interfaceorg.eclipse.gef.mvc.fx.handlers.IOnDragHandler
-
-