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

        1. CheckBoxBackgroundSpace.java
          1 kB
          Chien Yang
        2. ControlCss-MenubarsBACKGROUND-POSITION.png
          9 kB
          Alexander Vorobyev
        3. ControlCss-MenubarsBACKGROUND-REPEAT-SPACE.png
          9 kB
          Alexander Vorobyev
        4. RT-14502
          2 kB
          David Grieve
        5. screenshot-1.jpg
          40 kB
          Andrey Nazarov
        6. space.css
          0.5 kB
          Chien Yang

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Imported: