-
Bug
-
Resolution: Fixed
-
P3
-
fx2.1
-
fx 2.1 b12
windows 7
To reproduce run following code
import com.sun.javafx.collections.ObservableListWrapper;
import java.util.Arrays;
import javafx.application.Application;
import javafx.builders.ButtonBuilder;
import javafx.builders.SplitMenuButtonBuilder;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.ChoiceBox;
import javafx.scene.control.Control;
import javafx.scene.control.Hyperlink;
import javafx.scene.control.Label;
import javafx.scene.control.ListView;
import javafx.scene.control.MenuItem;
import javafx.scene.control.ProgressBar;
import javafx.scene.control.ProgressIndicator;
import javafx.scene.control.RadioButton;
import javafx.scene.control.ScrollBar;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.Slider;
import javafx.scene.control.TextBox;
import javafx.scene.control.ToggleButton;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.scene.text.TextAlignment;
import javafx.stage.Stage;
public class PaddingSample extends Application {
public static void main(String[] args) {
Application.launch(args);
}
enum Controls {
progressIndicator(new ProgressIndicator(0.8)),
;
public Control control;
private Controls(Control control) {
this.control = control;
}
}
private Parent getContent() {
Pane pane = new FlowPane();
Label button = new Label("Button\nButton\nButton", new Rectangle(20, 20, Color.RED));
for (Controls ctrl : Controls.values()) {
Control control = ctrl.control;
control.setStyle("-fx-padding: 40 30 20 10;-fx-border-color:green;");
pane.getChildren().add(control);
}
return pane;
}
public void start(Stage stage) {
stage.setX(100);
stage.setY(100);
stage.setWidth(700);
stage.setHeight(400);
Scene scene = new Scene(getContent());
stage.setScene(scene);
stage.setVisible(true);
}
}
import com.sun.javafx.collections.ObservableListWrapper;
import java.util.Arrays;
import javafx.application.Application;
import javafx.builders.ButtonBuilder;
import javafx.builders.SplitMenuButtonBuilder;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.ChoiceBox;
import javafx.scene.control.Control;
import javafx.scene.control.Hyperlink;
import javafx.scene.control.Label;
import javafx.scene.control.ListView;
import javafx.scene.control.MenuItem;
import javafx.scene.control.ProgressBar;
import javafx.scene.control.ProgressIndicator;
import javafx.scene.control.RadioButton;
import javafx.scene.control.ScrollBar;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.Slider;
import javafx.scene.control.TextBox;
import javafx.scene.control.ToggleButton;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.scene.text.TextAlignment;
import javafx.stage.Stage;
public class PaddingSample extends Application {
public static void main(String[] args) {
Application.launch(args);
}
enum Controls {
progressIndicator(new ProgressIndicator(0.8)),
;
public Control control;
private Controls(Control control) {
this.control = control;
}
}
private Parent getContent() {
Pane pane = new FlowPane();
Label button = new Label("Button\nButton\nButton", new Rectangle(20, 20, Color.RED));
for (Controls ctrl : Controls.values()) {
Control control = ctrl.control;
control.setStyle("-fx-padding: 40 30 20 10;-fx-border-color:green;");
pane.getChildren().add(control);
}
return pane;
}
public void start(Stage stage) {
stage.setX(100);
stage.setY(100);
stage.setWidth(700);
stage.setHeight(400);
Scene scene = new Scene(getContent());
stage.setScene(scene);
stage.setVisible(true);
}
}