We have 1 Stage which is composed of 1 TabPane,
The TabPane is composed of 1 Tab.
The Tab is composed of 1 SplitPane.
This SplitPane is divided into 3 parts.
splitPane.setDividerPositions(0.40f, 0.02f, 0.51f);
When i resize the Stage (width or height) i wish to keep the same position of dividers.
stage.widthProperty().addListener(new ChangeListener<Number>() {
@Override
public void changed(
ObservableValue<? extends Number> observableValue,
Number number, Number number2) {
Platform.runLater(() -> splitPane.setDividerPositions(0.40f, 0.02f,
0.51f));
}
});
stage.heightProperty().addListener(new ChangeListener<Number>() {
@Override
public void changed(
ObservableValue<? extends Number> observableValue,
Number number, Number number2) {
Platform.runLater(() -> splitPane.setDividerPositions(0.40f, 0.02f,
0.51f));
}
});
After resizing, the applied divisions do not correspond to what is asked !!!
I am obliged to reposition manually dividers.
What is rather annoying for the user who is going to use my application.
The TabPane is composed of 1 Tab.
The Tab is composed of 1 SplitPane.
This SplitPane is divided into 3 parts.
splitPane.setDividerPositions(0.40f, 0.02f, 0.51f);
When i resize the Stage (width or height) i wish to keep the same position of dividers.
stage.widthProperty().addListener(new ChangeListener<Number>() {
@Override
public void changed(
ObservableValue<? extends Number> observableValue,
Number number, Number number2) {
Platform.runLater(() -> splitPane.setDividerPositions(0.40f, 0.02f,
0.51f));
}
});
stage.heightProperty().addListener(new ChangeListener<Number>() {
@Override
public void changed(
ObservableValue<? extends Number> observableValue,
Number number, Number number2) {
Platform.runLater(() -> splitPane.setDividerPositions(0.40f, 0.02f,
0.51f));
}
});
After resizing, the applied divisions do not correspond to what is asked !!!
I am obliged to reposition manually dividers.
What is rather annoying for the user who is going to use my application.