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 booleanisInDraggableZone(javafx.scene.input.MouseEvent event) static voidmakeResizable(javafx.scene.layout.Region region) protected voidmouseDragged(javafx.scene.input.MouseEvent event) protected voidmouseOver(javafx.scene.input.MouseEvent event) protected voidmousePressed(javafx.scene.input.MouseEvent event) protected voidmouseReleased(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)
-