-
Bug
-
Resolution: Not an Issue
-
P4
-
fx2.0
-
windows 7
jdk6
b34
To reproduce run following code
import javafx.application.Application;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.TitledPane;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class TitledPaneBorderBackground extends Application {
public static void main(String[] args) {
launch(args);
}
private Parent getContent() {
VBox list = new VBox(10);
TitledPane outerPane = new TitledPane();
outerPane.setTitle(new Label("OuterPane label"));
Text text = new Text("Content Content\n\nContent");
outerPane.setContent(text);
outerPane.setStyle("-fx-background-color: green; "
+ "-fx-shape: \"M 50 50 L 150 50 L 100 150 Z\";"
+ "-fx-scale-shape: false;");
list.getChildren().add(outerPane);
return list;
}
public void start(Stage stage) {
stage.setX(100);
stage.setY(100);
stage.setWidth(300);
stage.setHeight(300);
Scene scene = new Scene(getContent());
stage.setScene(scene);
stage.setVisible(true);
scene.getStylesheets().add("/style.css");
}
}
import javafx.application.Application;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.TitledPane;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class TitledPaneBorderBackground extends Application {
public static void main(String[] args) {
launch(args);
}
private Parent getContent() {
VBox list = new VBox(10);
TitledPane outerPane = new TitledPane();
outerPane.setTitle(new Label("OuterPane label"));
Text text = new Text("Content Content\n\nContent");
outerPane.setContent(text);
outerPane.setStyle("-fx-background-color: green; "
+ "-fx-shape: \"M 50 50 L 150 50 L 100 150 Z\";"
+ "-fx-scale-shape: false;");
list.getChildren().add(outerPane);
return list;
}
public void start(Stage stage) {
stage.setX(100);
stage.setY(100);
stage.setWidth(300);
stage.setHeight(300);
Scene scene = new Scene(getContent());
stage.setScene(scene);
stage.setVisible(true);
scene.getStylesheets().add("/style.css");
}
}