javafx.scene.image.ImageView.fitHeightProperty()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(275)

本文整理了Java中javafx.scene.image.ImageView.fitHeightProperty()方法的一些代码示例,展示了ImageView.fitHeightProperty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.fitHeightProperty()方法的具体详情如下:
包路径:javafx.scene.image.ImageView
类名称:ImageView
方法名:fitHeightProperty

ImageView.fitHeightProperty介绍

暂无

代码示例

代码示例来源:origin: com.bitplan.gui/com.bitplan.javafx

public DoubleProperty imageHeightProperty() {
 return iv.fitHeightProperty();
}

代码示例来源:origin: stackoverflow.com

ImageView imageView = new ImageView(new Image("/images/Wim_F.png"));
imageView.setPreserveRatio(true);
imageView.fitWidthProperty().bind(lsduController1.oneWIM.widthProperty().subtract(10d));
imageView.fitHeightProperty().bind(lsduController1.oneWIM.heightProperty().subtract(10d));
lsduController1.oneWIM.setGraphic(imageView);

代码示例来源:origin: stackoverflow.com

ivMain.fitHeightProperty().bind(apMain.heightProperty());
ivMain.fitWidthProperty().bind(apMain.widthProperty());
Button btn2 = new Button("", ivMain);

代码示例来源:origin: org.controlsfx/controlsfx

/**
 * Create ImageGridCell instance
 * @param preserveImageProperties if set to true will preserve image aspect ratio and smoothness
 */
public ImageGridCell( boolean preserveImageProperties ) {
  getStyleClass().add("image-grid-cell"); //$NON-NLS-1$
  
  this.preserveImageProperties = preserveImageProperties;
  imageView = new ImageView();
  imageView.fitHeightProperty().bind(heightProperty());
  imageView.fitWidthProperty().bind(widthProperty());
}

代码示例来源:origin: stackoverflow.com

title.setLayoutX(569);
title.setLayoutY(146);
title.fitHeightProperty().add(100);
title.fitWidthProperty().add(100);
title.setVisible(true);

代码示例来源:origin: com.bitplan.gui/com.bitplan.javafx

/**
 * helper function for images
 * @param icon
 * @return the BoderPane that wraps the given icon
 */
public BorderPane wrapImageView(ImageView icon) {
 BorderPane pane = new BorderPane();
 pane.setCenter(icon);
 // resize images automatically
 // https://stackoverflow.com/a/12635224/1497139
 icon.setPreserveRatio(true);
 icon.fitHeightProperty().bind(pane.heightProperty());
 icon.fitWidthProperty().bind(pane.widthProperty());
 return pane;
}

代码示例来源:origin: Tristan971/Lyrebird

@Override
public void bindViewSizeToParent() {
  container.setPrefWidth(imageProp.getValue().getWidth());
  container.setPrefHeight(imageProp.getValue().getHeight());
  photoImageView.fitHeightProperty().bind(container.heightProperty());
  photoImageView.fitWidthProperty().bind(container.widthProperty());
}

代码示例来源:origin: com.bitplan.radolan/com.bitplan.radolan

private void addTab(String tabId, MapView mapView) {
 Tab mapViewTab = xyTabPane.getTab(tabId);
 mapViewTab.setContent(mapView.getStackPane());
 NumberBinding heightAdjust = getScene().heightProperty()
   .subtract(xyTabPane.getTabSize()); // getMenuBar().heightProperty().add(
 NumberBinding widthAdjust = getScene().widthProperty()
   .subtract(xyTabPane.getTabSize());
 // mapView.addSizeListener(widthAdjust, heightAdjust);
 // NumberBinding
 // heightAdjust=rainTabPane.heightProperty().add(getMenuBar().heightProperty());
 mapView.getImageView().fitHeightProperty().bind(heightAdjust);
 mapView.getImageView().fitWidthProperty().bind(widthAdjust);
}

代码示例来源:origin: Tristan971/Lyrebird

@Override
public void initialize() {
  followButton.setDisable(true);
  userBanner.fitWidthProperty().bind(userDetailsVBox.widthProperty());
  userBanner.fitHeightProperty().bind(userDetailsVBox.heightProperty());
  userBanner.setPreserveRatio(false);
  userBanner.setImage(ImageResources.BACKGROUND_DARK_1PX.getImage());
  userProfilePictureImageView.setImage(ImageResources.GENERAL_USER_AVATAR_LIGHT.getImage());
  final Rectangle profilePictureClip = Clipping.getSquareClip(290.0, 50.0);
  userProfilePictureImageView.setClip(profilePictureClip);
  if (targetUserProp.getValue() == null) {
    this.targetUserProp.addListener((o, prev, cur) -> displayTargetUser());
  } else {
    displayTargetUser();
  }
}

代码示例来源:origin: com.guigarage/imaging

imageView.setSmooth(true);
imageView.fitWidthProperty().bind(widthProperty());
imageView.fitHeightProperty().bind(heightProperty());
imageRegion.getChildren().add(imageView);

相关文章