List of usage examples for javafx.beans.property SimpleDoubleProperty SimpleDoubleProperty
public SimpleDoubleProperty(Object bean, String name, double initialValue)
From source file:Main.java
public static void main(String[] args) { final DoubleProperty x = new SimpleDoubleProperty(null, "x", 2.0); final DoubleProperty y = new SimpleDoubleProperty(null, "y", 3.0); DoubleBinding area = new DoubleBinding() { {/*from www . ja v a2 s . co m*/ super.bind(x, y); } @Override protected double computeValue() { System.out.println("computeValue() is called."); return x.get() * y.get(); } }; System.out.println("area.get() = " + area.get()); x.set(5); y.set(7); System.out.println("area.get() = " + area.get()); }
From source file:Main.java
public static void main(String[] args) { final DoubleProperty x = new SimpleDoubleProperty(null, "x", 2.0); final DoubleProperty y = new SimpleDoubleProperty(null, "y", 3.0); DoubleBinding area = new DoubleBinding() { private double value; {/*from w ww . j ava 2 s. co m*/ super.bind(x, y); } @Override protected double computeValue() { System.out.println("computeValue() is called."); return x.get() * y.get(); } }; System.out.println("area.get() = " + area.get()); x.set(5); y.set(7); System.out.println("area.get() = " + area.get()); }
From source file:org.nmrfx.processor.gui.spectra.DatasetAttributes.java
public DoubleProperty posWidthProperty() { if (posWidth == null) { posWidth = new SimpleDoubleProperty(this, "+wid", 0.5); }/*from w w w . java 2 s.c om*/ return posWidth; }
From source file:org.nmrfx.processor.gui.spectra.DatasetAttributes.java
public DoubleProperty negWidthProperty() { if (negWidth == null) { negWidth = new SimpleDoubleProperty(this, "-wid", 0.5); }/*w ww . j av a2 s .c o m*/ return negWidth; }
From source file:org.nmrfx.processor.gui.spectra.DatasetAttributes.java
public DoubleProperty lvlProperty() { if (lvl == null) { lvl = new SimpleDoubleProperty(this, "lvl", 1.0); }/*from w w w. jav a2 s .co m*/ return lvl; }
From source file:org.nmrfx.processor.gui.spectra.DatasetAttributes.java
public DoubleProperty offsetProperty() { if (offset == null) { offset = new SimpleDoubleProperty(this, "offset", 0.05); }// w ww . j a v a 2 s .com return offset; }
From source file:org.nmrfx.processor.gui.spectra.DatasetAttributes.java
public DoubleProperty clmProperty() { if (clm == null) { clm = new SimpleDoubleProperty(this, "clm", 1.2); }/*from w ww. jav a2 s .c om*/ return clm; }