Class DragAndDropUtil
- java.lang.Object
-
- net.sourceforge.pmd.util.fxdesigner.util.controls.DragAndDropUtil
-
public final class DragAndDropUtil extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NODE_DRAG_OVER
Style class for node drag over.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.reactfx.Subscription
registerAsNodeDragSource(javafx.scene.Node source, net.sourceforge.pmd.lang.ast.Node data, DesignerRoot root)
Registers the given [source] javafx Node as a source for a drag and drop even withNODE_RANGE_DATA_FORMAT
content.static void
registerAsNodeDragTarget(javafx.scene.Node target, java.util.function.Consumer<PmdCoordinatesSystem.TextRange> nodeRangeConsumer, DesignerRoot root)
Registers aNode
as the target of a drag and drop initiated byregisterAsNodeDragSource(javafx.scene.Node, Node, DesignerRoot)
.
-
-
-
Field Detail
-
NODE_DRAG_OVER
public static final java.lang.String NODE_DRAG_OVER
Style class for node drag over.- See Also:
- Constant Field Values
-
-
Method Detail
-
registerAsNodeDragSource
public static org.reactfx.Subscription registerAsNodeDragSource(javafx.scene.Node source, net.sourceforge.pmd.lang.ast.Node data, DesignerRoot root)
Registers the given [source] javafx Node as a source for a drag and drop even withNODE_RANGE_DATA_FORMAT
content.
-
registerAsNodeDragTarget
public static void registerAsNodeDragTarget(javafx.scene.Node target, java.util.function.Consumer<PmdCoordinatesSystem.TextRange> nodeRangeConsumer, DesignerRoot root)
Registers aNode
as the target of a drag and drop initiated byregisterAsNodeDragSource(javafx.scene.Node, Node, DesignerRoot)
.While the mouse is over the target, the target will have the CSS class
NODE_DRAG_OVER
.- Parameters:
target
- Target UI componentnodeRangeConsumer
- Action to run with theDragboard
contents on successroot
-
-
-