Example usage for javafx.beans.property LongProperty get

List of usage examples for javafx.beans.property LongProperty get

Introduction

In this page you can find the example usage for javafx.beans.property LongProperty get.

Prototype

long get();

Source Link

Document

Returns the current value of this ObservableLongValue .

Usage

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);/*  w  w w  . j a  va 2 s.co 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());
}