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

Region: css "-fx-background-repeat: space". There are different sizes of gaps between backgrounds

    XMLWordPrintable

Details

    Description

      To reproduce run following code


      import javafx.application.Application;
      import javafx.scene.Parent;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class CheckBoxBackgroundSpace extends Application {

          public static void main(String[] args) {
              launch( args);
          }

          private Parent getContent() {
              VBox list = new VBox(10);
              
              Button but = new Button("Button long long line");
              but.setStyle("-fx-background-image: "
                          + "url(\"file:red-rectangle.png\");"+"-fx-background-repeat: space;-fx-border-color: green;");
              but.setPrefSize(200, 200);
              list.getChildren().add(but);
              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);
          }
      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              anazarov Andrey Nazarov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Imported: