Package javafx.scene.image

Examples of javafx.scene.image.ImageView.fitWidthProperty()


            super.updateItem(item, empty);

            if(!empty) {
              ImageView image = item.getImage();
              image.setPreserveRatio(true);
              image.fitWidthProperty().bind(carousel.heightProperty().multiply(0.6));
              image.fitHeightProperty().bind(carousel.heightProperty().multiply(0.6));
              setGraphic(image);
            }
            else {
              setGraphic(null);
View Full Code Here


          Image arg1, Image arg2) {
        getChildren().clear();
        //TODO: Style ImageView by CSS
        ImageView imageView = ImageViewBuilder.create().image(arg2).build();
        imageView.fitHeightProperty().bind(heightProperty());
        imageView.fitWidthProperty().bind(widthProperty());
       
        setGraphic(imageView);
      }
    });
  }
View Full Code Here

                imageBorder.setCenter(MediaControl.create((VideoFile<?>) file));
            };
        } else {
            ImageView imageView = new ImageView(((ImageFile<?>) file).getFullSizeImage());
            imageView.setPreserveRatio(true);
            imageView.fitWidthProperty().bind(imageBorder.widthProperty().subtract(CAT_BORDER_WIDTH * 2));
            imageView.fitHeightProperty().bind(this.heightProperty().subtract(CAT_BORDER_WIDTH * 4).subtract(footer.heightProperty()).subtract(toolBar.heightProperty()));
            return () -> {
                imageBorder.setCenter(imageView);
            };
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.