List of usage examples for javafx.beans.property IntegerProperty get
int get();
From source file:Main.java
public static void main(String[] args) { IntegerProperty intProperty = new SimpleIntegerProperty(1024); System.out.println("intProperty = " + intProperty); System.out.println("intProperty.get() = " + intProperty.get()); }
From source file:Main.java
public static void main(String[] args) { IntegerProperty i = new SimpleIntegerProperty(null, "i", 1024); LongProperty l = new SimpleLongProperty(null, "l", 0L); System.out.println("i.get() = " + i.get()); System.out.println("l.get() = " + l.get()); l.bind(i);/*www .j av a 2 s . c o m*/ i.set(2048); System.out.println("i.get() = " + i.get()); System.out.println("l.get() = " + l.get()); l.unbind(); System.out.println("Unbound l to i, f to l, d to f."); i.bind(l); System.out.println("Bound f to d, l to f, i to l."); System.out.println("Calling d.set(10000000000L)."); i.set(100); System.out.println("l.get() = " + l.get()); System.out.println("i.get() = " + i.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 w ww . ja va 2 s. com*/ height.set(200); System.out.println(width.get() + " " + height.get()); System.out.println(area.getValue()); }
From source file:Main.java
public static void main(String[] args) { // Create three properties IntegerProperty x = new SimpleIntegerProperty(10); IntegerProperty y = new SimpleIntegerProperty(20); IntegerProperty z = new SimpleIntegerProperty(60); // Create the binding z = x + y z.bind(x.add(y));/* w w w. j a v a2 s. co m*/ System.out.println("After binding z: Bound = " + z.isBound() + ", z = " + z.get()); // Change x and y x.set(15); y.set(19); System.out.println("After changing x and y: Bound = " + z.isBound() + ", z = " + z.get()); // Unbind z z.unbind(); // Will not affect the value of z as it is not bound // to x and y anymore x.set(100); y.set(200); System.out.println("After unbinding z: Bound = " + z.isBound() + ", z = " + z.get()); }
From source file:Main.java
private static void printResult(IntegerProperty x1, IntegerProperty y1, NumberBinding area) { System.out.println(x1.get()); System.out.println(y1.get()); System.out.println(area.getValue()); }