List of usage examples for javafx.beans.property IntegerProperty multiply
@Override public DoubleBinding multiply(final double other)
From source file:Main.java
public static void main(String[] args) { // Area = width * height IntegerProperty width = new SimpleIntegerProperty(10); IntegerProperty height = new SimpleIntegerProperty(10); NumberBinding area = width.multiply(height); System.out.println(area.getValue()); }
From source file:Main.java
public static void main(String[] args) { IntegerProperty x1 = new SimpleIntegerProperty(0); IntegerProperty y1 = new SimpleIntegerProperty(0); final NumberBinding area = x1.multiply(y1).divide(2.0D); StringExpression output = Bindings.format("For A(%d,%d), the area is %3.1f", x1, y1, area); x1.set(0);/*from w ww .j a v a 2s .com*/ y1.set(0); System.out.println(output.get()); x1.set(10); y1.set(110); System.out.println(output.get()); }
From source file:Main.java
public static void main(String[] args) { final IntegerProperty width = new SimpleIntegerProperty(10); final IntegerProperty height = new SimpleIntegerProperty(10); NumberBinding area = width.multiply(height); System.out.println(width.get() + " " + height.get()); System.out.println(area.getValue()); width.set(100);//from www. j ava 2 s. c o m height.set(200); System.out.println(width.get() + " " + height.get()); System.out.println(area.getValue()); }