-
Bug
-
Resolution: Fixed
-
P4
-
8u20, 8u40
-
Windows 7 64 bits, jdk 8u40b12-ea
When a TabPane contains Tabs that can't fits in the window width, a small popup menu appear
where you can select a tab.
This menu used the Tabs text and graphic if it is set.
When the scene is shown, and if you change the graphic of one tab, then the menu does not refresh and the graphic of tab visible is not in sync with the menu containing the old graphic.
here the test case :
public class Main extends Application {
public static void main(final String[] args) {
launch(args);
}
@Override
public final void start(final Stage stage) {
final BorderPane bp = new BorderPane();
TabPane tb = new TabPane();
Tab t = new Tab("New tab 1");
Label l = new Label("graphic");
t.setGraphic(l);
tb.getTabs().add(t);
tb.getTabs().add(new Tab("New tab 2"));
tb.getTabs().add(new Tab("New tab 3"));
tb.setMinWidth(50);
tb.setMinHeight(50);
bp.setCenter(tb);
bp.setMinWidth(60);
bp.setMinHeight(60);
Scene scene = new Scene(bp,100, 100);
stage.setScene(scene);
stage.show();
l.setText("toto");
}
}
This problem was solved for test property of tab,but still here on the graphic.
By the way i note that the menu is not well packed if you use graphic for some tab, and tab text for other tabs.
where you can select a tab.
This menu used the Tabs text and graphic if it is set.
When the scene is shown, and if you change the graphic of one tab, then the menu does not refresh and the graphic of tab visible is not in sync with the menu containing the old graphic.
here the test case :
public class Main extends Application {
public static void main(final String[] args) {
launch(args);
}
@Override
public final void start(final Stage stage) {
final BorderPane bp = new BorderPane();
TabPane tb = new TabPane();
Tab t = new Tab("New tab 1");
Label l = new Label("graphic");
t.setGraphic(l);
tb.getTabs().add(t);
tb.getTabs().add(new Tab("New tab 2"));
tb.getTabs().add(new Tab("New tab 3"));
tb.setMinWidth(50);
tb.setMinHeight(50);
bp.setCenter(tb);
bp.setMinWidth(60);
bp.setMinHeight(60);
Scene scene = new Scene(bp,100, 100);
stage.setScene(scene);
stage.show();
l.setText("toto");
}
}
This problem was solved for test property of tab,but still here on the graphic.
By the way i note that the menu is not well packed if you use graphic for some tab, and tab text for other tabs.