-
Bug
-
Resolution: Not an Issue
-
P4
-
7u6, 8
-
controls scrum jfx8.0 at august 17, or 2.2.0b21
Run code:
@Override
public void start(Stage stage) throws Exception {
final TitledPane pane1 = new TitledPane();
pane1.setGraphic(new Label("title 1\nLong text long text"));
pane1.setContent(new Rectangle(100, 40, Color.SKYBLUE));
Accordion acc = new Accordion();
acc.getPanes().addAll(pane1);
final IntegerProperty counter = new SimpleIntegerProperty(0);
Button button = new Button("Change alignment");
button.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent t) {
switch (counter.getValue() % 4) {
case 0:
System.out.println("left");
pane1.setTextAlignment(TextAlignment.LEFT);
break;
case 1:
System.out.println("center");
pane1.setTextAlignment(TextAlignment.CENTER);
break;
case 2:
System.out.println("right");
pane1.setTextAlignment(TextAlignment.RIGHT);
break;
case 3:
System.out.println("justify");
pane1.setTextAlignment(TextAlignment.JUSTIFY);
break;
}
counter.setValue(counter.getValue() + 1);
}
});
VBox pane = new VBox();
pane.getChildren().addAll(acc, button);
Scene scene = new Scene(pane, 300, 700);
stage.setScene(scene);
stage.show();
}
option changing has no effect on visual appearance of control.
@Override
public void start(Stage stage) throws Exception {
final TitledPane pane1 = new TitledPane();
pane1.setGraphic(new Label("title 1\nLong text long text"));
pane1.setContent(new Rectangle(100, 40, Color.SKYBLUE));
Accordion acc = new Accordion();
acc.getPanes().addAll(pane1);
final IntegerProperty counter = new SimpleIntegerProperty(0);
Button button = new Button("Change alignment");
button.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent t) {
switch (counter.getValue() % 4) {
case 0:
System.out.println("left");
pane1.setTextAlignment(TextAlignment.LEFT);
break;
case 1:
System.out.println("center");
pane1.setTextAlignment(TextAlignment.CENTER);
break;
case 2:
System.out.println("right");
pane1.setTextAlignment(TextAlignment.RIGHT);
break;
case 3:
System.out.println("justify");
pane1.setTextAlignment(TextAlignment.JUSTIFY);
break;
}
counter.setValue(counter.getValue() + 1);
}
});
VBox pane = new VBox();
pane.getChildren().addAll(acc, button);
Scene scene = new Scene(pane, 300, 700);
stage.setScene(scene);
stage.show();
}
option changing has no effect on visual appearance of control.