Image tile = new Image("tile.png"); Group house = new Group(); house.setCache(true); house.setCacheHint(CacheHint.SPEED); Effect lighting = new Lighting(); for (int i = 0; i < houseWidth; i++) { // here is the critical part => don't do new ImageView(new Image("tile.png")) ImageView tileView = new ImageView(tile)); tileView.setEffect(lighting); tileView.setCache(true); tileView.setCacheHint(CacheHint.SPEED); house.add(tileView); }
private void refreshHSLCircle() { ColorAdjust colorAdjust = new ColorAdjust(); colorAdjust.setHue(map(currentHue + (currentHue < 127.5 ? 1 : -1) * 127.5, 0, 255, -1, 1)); slCircleView.setEffect(colorAdjust); setColorAtLocation((int) selector.getTranslateX() + selectorSize / 2, (int) selector.getTranslateY() + selectorSize / 2); }
imageView.setEffect(new DropShadow(20, Color.BLACK));
blackout.setBrightness(-1.0); imageView.setEffect(blackout); imageView.setCache(true); imageView.setCacheHint(CacheHint.SPEED);
ColorAdjust colorAdjust = new ColorAdjust(); colorAdjust.setContrast(0.1); colorAdjust.setHue(-0.05); colorAdjust.setBrightness(0.1); colorAdjust.setSaturation(0.2); ImageView imageView = new ImageView(image); imageView.setFitWidth(image.getWidth()); imageView.setPreserveRatio(true); imageView.setEffect(colorAdjust);
imageView.setFitWidth(image.getWidth()); imageView.setPreserveRatio(true); imageView.setEffect(colorAdjust);
private void refreshHSLCircle() { ColorAdjust colorAdjust = new ColorAdjust(); colorAdjust.setHue(map(currentHue + (currentHue < 127.5 ? 1 : -1) * 127.5, 0, 255, -1, 1)); slCircleView.setEffect(colorAdjust); setColorAtLocation((int) selector.getTranslateX() + selectorSize / 2, (int) selector.getTranslateY() + selectorSize / 2); }
imageView.setEffect(new DropShadow(20, Color.BLACK));