Example usage for javafx.scene.control Label getId

List of usage examples for javafx.scene.control Label getId

Introduction

In this page you can find the example usage for javafx.scene.control Label getId.

Prototype

public final String getId() 

Source Link

Document

The id of this Node .

Usage

From source file:com.rcs.shoe.shop.fx.controller.ui.Controller.java

protected Integer getSize(Label label) {
    return new Integer(label.getId().replaceFirst("label", ""));
}

From source file:com.rcs.shoe.shop.fx.controller.ui.SaleEnterController.java

private void initializeQuantityFields() {
    quantityLabels = new HashMap<>();
    quantityButtons = new HashMap<>();
    ObservableList<Node> children = sizesPane.getChildren();
    for (Node node : children) {
        if (node instanceof Label && node.getId() != null && node.getId().startsWith("label")) {
            Label label = (Label) node;
            quantityLabels.put(label.getId(), label);
        } else if (node instanceof Button) {
            Button button = (Button) node;
            if (button.getId() != null && button.getId().startsWith("button")) {
                quantityButtons.put(button.getId(), button);
            }//from   w ww .j  a v  a2 s  . c  o m
        }
    }
}

From source file:com.rcs.shoe.shop.fx.controller.ui.NewProductController.java

private void initializeQuantityFields() {
    quantityFields = new HashMap<>();
    quantityLabels = new HashMap<>();
    ObservableList<Node> children = sizesPane.getChildren();
    for (Node node : children) {
        if (node instanceof TextField) {
            TextField tx = (TextField) node;
            tx.textProperty().addListener(getDigitChangeListener(tx));
            quantityFields.put(tx.getId(), tx);
        } else if (node instanceof Label) {
            Label label = (Label) node;
            if (label.getId() != null && label.getId().startsWith("label")) {
                quantityLabels.put(label.getId(), label);
            }/*w ww  .  ja  v a 2s . c  om*/
        }
    }
}