本文整理了Java中javafx.scene.image.ImageView.setOpacity()
方法的一些代码示例,展示了ImageView.setOpacity()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.setOpacity()
方法的具体详情如下:
包路径:javafx.scene.image.ImageView
类名称:ImageView
方法名:setOpacity
暂无
代码示例来源:origin: jfoenixadmin/JFoenix
private void updatePlaceholder(Node newView) {
if (view.getWidth() > 0 && view.getHeight() > 0) {
SnapshotParameters parameters = new SnapshotParameters();
parameters.setFill(Color.TRANSPARENT);
Image placeholderImage = view.snapshot(parameters,
new WritableImage((int) view.getWidth(), (int) view.getHeight()));
placeholder.setImage(placeholderImage);
placeholder.setFitWidth(placeholderImage.getWidth());
placeholder.setFitHeight(placeholderImage.getHeight());
} else {
placeholder.setImage(null);
}
placeholder.setVisible(true);
placeholder.setOpacity(1.0);
view.getChildren().setAll(placeholder, newView);
placeholder.toFront();
}
}
代码示例来源:origin: com.bitplan.gui/com.bitplan.javafx
@Override
public void setActive(boolean active) {
this.active = active;
if (icon != null)
if (active) {
icon.setOpacity(OPACITY_ACTIVE);
} else {
icon.setOpacity(OPACITY_INACTIVE);
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-demoapp-components
final ImageView imgView = new ImageView(img);
getChildren().add(imgView);
imgView.setOpacity(0.67);
} catch (IOException e) {
e.printStackTrace();
代码示例来源:origin: io.datafx/flow
private void updatePlaceholder(Node newView) {
if (root.getWidth() > 0 && root.getHeight() > 0) {
Image placeholderImage = root.snapshot(null, new WritableImage((int) root.getWidth(), (int) root.getHeight()));
placeholder.setImage(placeholderImage);
placeholder.setFitWidth(placeholderImage.getWidth());
placeholder.setFitHeight(placeholderImage.getHeight());
} else {
placeholder.setImage(null);
}
placeholder.setVisible(true);
placeholder.setOpacity(1.0);
root.getChildren().setAll(placeholder);
root.getChildren().add(newView);
placeholder.toFront();
}
}
代码示例来源:origin: com.github.almasb/fxgl-base
imageView.setLayoutX(x);
imageView.setLayoutY(y);
imageView.setOpacity(alpha);
imageView.setBlendMode(blendMode);
代码示例来源:origin: com.github.almasb/fxgl-effects
imageView.setLayoutX(x);
imageView.setLayoutY(y);
imageView.setOpacity(alpha);
imageView.setBlendMode(blendMode);
内容来源于网络,如有侵权,请联系作者删除!