Example usage for javafx.beans.property SimpleIntegerProperty SimpleIntegerProperty

List of usage examples for javafx.beans.property SimpleIntegerProperty SimpleIntegerProperty

Introduction

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

Prototype

public SimpleIntegerProperty(Object bean, String name, int initialValue) 

Source Link

Document

The constructor of IntegerProperty

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);/*from  w ww . ja va 2  s  .  c om*/

    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:org.nmrfx.processor.gui.spectra.DatasetAttributes.java

public IntegerProperty nlvlsProperty() {
    if (nlvls == null) {
        nlvls = new SimpleIntegerProperty(this, "nlevels", 20);
    }//www.  jav a 2  s. co m
    return nlvls;
}