Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8113921

Clipped shape in TitledPane

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not an Issue
    • P4
    • fx2.0
    • fx2.0
    • javafx
    • windows 7
      jdk6
      b34

    Description

      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");
          }
      }

      Attachments

        Activity

          People

            kwwong Kinsley Wong (Inactive)
            anazarov Andrey Nazarov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported: