Package pamViewFX.fxNodes.internalNode
Class DragResizer
java.lang.Object
pamViewFX.fxNodes.internalNode.DragResizer
DragResizer
can be used to add mouse listeners to a Region
and make it resizable by the user by clicking and dragging the border in the
same way as a window.
Only height resizing is currently implemented. Usage:
DragResizer.makeResizable(myAnchorPane);
- Author:
- atill - (https://gist.github.com/andytill/4369729 10/03/2015)
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
isInDraggableZone
(javafx.scene.input.MouseEvent event) static void
makeResizable
(javafx.scene.layout.Region region) protected void
mouseDragged
(javafx.scene.input.MouseEvent event) protected void
mouseOver
(javafx.scene.input.MouseEvent event) protected void
mousePressed
(javafx.scene.input.MouseEvent event) protected void
mouseReleased
(javafx.scene.input.MouseEvent event)
-
Method Details
-
makeResizable
public static void makeResizable(javafx.scene.layout.Region region) -
mouseReleased
protected void mouseReleased(javafx.scene.input.MouseEvent event) -
mouseOver
protected void mouseOver(javafx.scene.input.MouseEvent event) -
isInDraggableZone
protected boolean isInDraggableZone(javafx.scene.input.MouseEvent event) -
mouseDragged
protected void mouseDragged(javafx.scene.input.MouseEvent event) -
mousePressed
protected void mousePressed(javafx.scene.input.MouseEvent event)
-