本文整理了Java中javafx.scene.image.ImageView.fitWidthProperty()
方法的一些代码示例,展示了ImageView.fitWidthProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.fitWidthProperty()
方法的具体详情如下:
包路径:javafx.scene.image.ImageView
类名称:ImageView
方法名:fitWidthProperty
暂无
代码示例来源:origin: com.bitplan.gui/com.bitplan.javafx
public DoubleProperty imageWidthProperty() {
return iv.fitWidthProperty();
}
代码示例来源: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
ImageView ivMain = new ImageView(image);
ivMain.fitHeightProperty().bind(apMain.heightProperty());
ivMain.fitWidthProperty().bind(apMain.widthProperty());
Button btn2 = new Button("", ivMain);
apMain.getChildren().add(btn2);
代码示例来源:origin: stackoverflow.com
imageView.fitWidthProperty().bind(slider.valueProperty());
代码示例来源: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.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: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
v.fitWidthProperty().bind(this.preview.widthProperty());
if (item instanceof DirItem) {
v.getStyleClass().add("folderBig"); //$NON-NLS-1$
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls
v.fitWidthProperty().bind(this.preview.widthProperty());
if (item instanceof DirItem) {
v.getStyleClass().add("folderBig"); //$NON-NLS-1$
代码示例来源: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.setPreserveRatio(true);
imageView.setSmooth(true);
imageView.fitWidthProperty().bind(widthProperty());
imageView.fitHeightProperty().bind(heightProperty());
imageRegion.getChildren().add(imageView);
内容来源于网络,如有侵权,请联系作者删除!