File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JavaFX and the fly likes how to detect WHILE a pane is being resized Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JavaFX
Bookmark "how to detect WHILE a pane is being resized" Watch "how to detect WHILE a pane is being resized" New topic
Author

how to detect WHILE a pane is being resized

Carl Bernardi
Greenhorn

Joined: Jan 15, 2013
Posts: 23
I was wondering if anyone has ideas on how to detect WHILE a pane is being resized. Basically I have multiple threads drawing on the pane and would like the threads to stop while the pane is being resized. When I scroll the inside of the pane I am able to stop all threads by using a combination of setOnMouseDragged, setOnMousePressed and setOnMouseReleased and setting a boolean to true or false. Works great! Appreciated any examples.

Thanks.
Carl Bernardi
Greenhorn

Joined: Jan 15, 2013
Posts: 23
Solved! Whenever there is a change in the width or height property it turns a boolean to true. The threads attempting to draw pause while the boolean is true and then turn the boolean back to false after about 100ms allowing them to continue drawing.
 
 
subject: how to detect WHILE a pane is being resized
 
Similar Threads
While mouse button is pressed
how to set a minimum pane size - javafx
stopping a runnable in ThreadPoolExecutor
Panel on Splitpane: Fully occupy the Pane
Control the minimum size of a JFrame