本文整理汇总了Java中javafx.scene.image.ImageView.setMouseTransparent方法的典型用法代码示例。如果您正苦于以下问题:Java ImageView.setMouseTransparent方法的具体用法?Java ImageView.setMouseTransparent怎么用?Java ImageView.setMouseTransparent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.image.ImageView
的用法示例。
在下文中一共展示了ImageView.setMouseTransparent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SimpleHeatMap
import javafx.scene.image.ImageView; //导入方法依赖的package包/类
public SimpleHeatMap(final double WIDTH, final double HEIGHT, ColorMapping COLOR_MAPPING, final double EVENT_RADIUS, final boolean FADE_COLORS) {
SNAPSHOT_PARAMETERS.setFill(Color.TRANSPARENT);
colorMapping = COLOR_MAPPING;
mappingGradient = colorMapping.mapping;
fadeColors = FADE_COLORS;
radius = EVENT_RADIUS;
opacityDistribution = OpacityDistribution.CUSTOM;
eventImage = createEventImage(radius, opacityDistribution);
monochromeCanvas = new Canvas(WIDTH, HEIGHT);
ctx = monochromeCanvas.getGraphicsContext2D();
monochromeImage = new WritableImage((int) WIDTH, (int) HEIGHT);
heatMapView = new ImageView(heatMap);
heatMapView.setMouseTransparent(true);
heatMapView.setOpacity(0.5);
}
示例2: reload
import javafx.scene.image.ImageView; //导入方法依赖的package包/类
@Override
@FXThread
protected void reload() {
final Texture2D texture2D = getPropertyValue();
final AssetKey key = texture2D == null ? null : texture2D.getKey();
if (!isSingleRow()) {
final Label textureLabel = getTextureLabel();
textureLabel.setText(key == null ? NO_TEXTURE : key.getName());
}
final ImageChannelPreview textureTooltip = getTextureTooltip();
final ImageView preview = getTexturePreview();
if (key == null) {
preview.setImage(null);
textureTooltip.clean();
preview.setDisable(true);
preview.setMouseTransparent(true);
} else {
preview.setDisable(false);
preview.setMouseTransparent(false);
final Path realFile = notNull(getRealFile(key.getName()));
if (Files.exists(realFile)) {
preview.setImage(IMAGE_MANAGER.getImagePreview(realFile, 24, 24));
textureTooltip.showImage(realFile);
} else {
preview.setImage(IMAGE_MANAGER.getImagePreview(key.getName(), 24, 24));
textureTooltip.showImage(key.getName());
}
}
}