List of usage examples for javafx.scene.effect Light setColor
public final void setColor(Color value)
From source file:Main.java
public static void main(String[] args) { ObjectProperty<Lighting> root = new SimpleObjectProperty<Lighting>(); final ObjectBinding<Color> colorBinding = Bindings.select(root, "light", "color"); colorBinding.addListener(new ChangeListener<Color>() { @Override/*w w w . ja v a 2 s. co m*/ public void changed(ObservableValue<? extends Color> observableValue, Color oldValue, Color newValue) { System.out.println(oldValue + "new = " + newValue); } }); Light firstLight = new Light.Point(); firstLight.setColor(Color.BLACK); Light secondLight = new Light.Point(); secondLight.setColor(Color.WHITE); Lighting firstLighting = new Lighting(); firstLighting.setLight(firstLight); root.set(firstLighting); firstLighting.setLight(firstLight); firstLight.setColor(Color.RED); }