List of usage examples for javafx.scene.control Label getId
public final String getId()
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*/ } } }