-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a new undocked DockNode #7
Comments
I can call testDock.setFloatable(true); without any error, but the window still does not float. Any suggestions? |
@dyrlund This is a legitimate bug, thank you for reporting this. It was working in the original release, I know what is causing it and will be able to fix it. For now I have the following temporary work around. From the demo application, wrap your setFloatable call in a Runnable and make sure you dock the node first so that it gets a preferred size: // can be created and docked before or after the scene is created
// and the stage is shown
final DockNode treeDock = new DockNode(generateRandomTree(), "Tree Dock", new ImageView(dockImage));
treeDock.setPrefSize(100, 100);
treeDock.dock(dockPane, DockPos.LEFT);
Platform.runLater(new Runnable() {
@Override
public void run() {
treeDock.setFloating(true);
}
}); The cause is the use of a local to screen translation in setFloatable returning a null Point2D because the dock node has not yet received a layout pass. It will be very easy to fix. The intended behavior is exactly as you described, when this is fixed you will not have to dock it first and will be able to simply set it floating. |
Is the bug fixed ?? |
Hi, Thanks & Regards |
there's a fair bit of development happening on fork https://github.com/hkmoon/DockFX/tree/hkmoon, this is the fork I'm using at the moment. |
Thanks @jasons2000 .. |
Hi
Is there a way to create a new DockNode which is floating? I tried the following:
But that returns the following NullPointerException:
I also tried to dock the DockNode first and then undock it but in that case it is not visible (= it seems like nothing is happening). Do I have to set some value to make it show?
The text was updated successfully, but these errors were encountered: