- 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.CreateAdaptedParentOnDragHandler<R,O,M>
-
- 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 CreateAdaptedParentOnDragHandler<R extends Model,O,M extends Model> extends org.eclipse.gef.mvc.fx.handlers.AbstractHandler implements org.eclipse.gef.mvc.fx.handlers.IOnDragHandler
-
-
Constructor Summary
Constructors Constructor Description CreateAdaptedParentOnDragHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abortDrag()
protected void
completeDrag(boolean isCreateAdaptedParent, javafx.scene.input.MouseEvent event)
Completes the drag.void
drag(javafx.scene.input.MouseEvent event, org.eclipse.gef.geometry.planar.Dimension delta)
void
endDrag(javafx.scene.input.MouseEvent event, org.eclipse.gef.geometry.planar.Dimension delta)
protected org.eclipse.gef.mvc.fx.viewer.IViewer
getContentViewer()
Obtains the contentIViewer
.AdaptedParentPart<M>
getHost()
protected javafx.geometry.Point2D
getLocation(javafx.scene.input.MouseEvent event)
Obtains the location of theMouseEvent
.void
hideIndicationCursor()
boolean
showIndicationCursor(javafx.scene.input.KeyEvent event)
boolean
showIndicationCursor(javafx.scene.input.MouseEvent event)
void
startDrag(javafx.scene.input.MouseEvent event)
-
Methods inherited from class org.eclipse.gef.mvc.fx.handlers.AbstractHandler
commit, execute, init, isRegistered, isRegisteredForHost, restoreRefreshVisuals, rollback, storeAndDisableRefreshVisuals
-
Methods inherited from class org.eclipse.gef.common.adapt.IAdaptable.Bound.Impl
adaptableProperty, getAdaptable, setAdaptable
-
-
-
-
Method Detail
-
getContentViewer
protected org.eclipse.gef.mvc.fx.viewer.IViewer getContentViewer()
Obtains the contentIViewer
.- Returns:
- Content
IViewer
.
-
getLocation
protected javafx.geometry.Point2D getLocation(javafx.scene.input.MouseEvent event)
Obtains the location of theMouseEvent
.- Parameters:
event
-MouseEvent
.- Returns:
- Location of the
MouseEvent
.
-
completeDrag
protected void completeDrag(boolean isCreateAdaptedParent, javafx.scene.input.MouseEvent event)
Completes the drag.- Parameters:
isCreateAdaptedParent
- Indicates whether to create theAdaptedParentPart
.event
-MouseEvent
at completion of drag.
-
getHost
public AdaptedParentPart<M> getHost()
- Specified by:
getHost
in interfaceorg.eclipse.gef.mvc.fx.handlers.IHandler
- Overrides:
getHost
in classorg.eclipse.gef.mvc.fx.handlers.AbstractHandler
-
startDrag
public void startDrag(javafx.scene.input.MouseEvent event)
- Specified by:
startDrag
in 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:
drag
in interfaceorg.eclipse.gef.mvc.fx.handlers.IOnDragHandler
-
abortDrag
public void abortDrag()
- Specified by:
abortDrag
in interfaceorg.eclipse.gef.mvc.fx.handlers.IOnDragHandler
-
endDrag
public void endDrag(javafx.scene.input.MouseEvent event, org.eclipse.gef.geometry.planar.Dimension delta)
- Specified by:
endDrag
in interfaceorg.eclipse.gef.mvc.fx.handlers.IOnDragHandler
-
hideIndicationCursor
public void hideIndicationCursor()
- Specified by:
hideIndicationCursor
in interfaceorg.eclipse.gef.mvc.fx.handlers.IOnDragHandler
-
showIndicationCursor
public boolean showIndicationCursor(javafx.scene.input.KeyEvent event)
- Specified by:
showIndicationCursor
in interfaceorg.eclipse.gef.mvc.fx.handlers.IOnDragHandler
-
showIndicationCursor
public boolean showIndicationCursor(javafx.scene.input.MouseEvent event)
- Specified by:
showIndicationCursor
in interfaceorg.eclipse.gef.mvc.fx.handlers.IOnDragHandler
-
-