Package javafx.scene.control

Examples of javafx.scene.control.Label.textProperty()


    protected FXFormNode createFXFormNode(Element element, FactoryProvider factoryProvider, String suffixId) {
        Callback<Void, FXFormNode> factory = factoryProvider.getFactory(element);
        if (factory == null) {
            logger.log(Level.WARNING, "No factory found for " + element + ", using " + factoryProvider + "\nCheck your factory provider.");
            Label label = new Label();
            return new FXFormNodeWrapper(label, label.textProperty());
        }
        FXFormNode fxFormNode = factory.call(null);
        fxFormNode.getNode().setId(element.getName() + suffixId);
        return fxFormNode;
    }
View Full Code Here


    }

    private Node createTitleNode() {
        Label label = new AutoHidableLabel();
        label.getStyleClass().add("form-title");
        label.textProperty().bind(fxForm.titleProperty());
        return label;
    }

    protected GridPane gridPane;
    protected int row = 0;
View Full Code Here

public class AutoHidableLabelFactory implements Callback<Void, FXFormNode> {

    public FXFormNode call(Void aVoid) {
        final Label label = new AutoHidableLabel();
        label.setWrapText(true);
        return new FXFormNodeWrapper(label, label.textProperty());
    }

}
View Full Code Here

    public FXFormNode call(Void aVoid) {
        final Label label = new Label();
        label.setMinWidth(Label.USE_PREF_SIZE);
        label.setMaxWidth(Label.USE_PREF_SIZE);
        return new FXFormNodeWrapper(label, label.textProperty());
    }

}
View Full Code Here

        // subscribed to area's paragraphs.
        EventStreams.valuesOf(lineNo.sceneProperty())
                .flatMap(scene -> scene != null
                        ? nParagraphs.map(n -> format(idx+1, n))
                        : EventStreams.<String>never())
                .feedTo(lineNo.textProperty());
        return lineNo;
    }

    private String format(int x, int max) {
        int digits = (int) Math.floor(Math.log10(max)) + 1;
View Full Code Here

* Time: 11:50
*/
public class DefaultTooltipFactory implements NodeFactory<ElementController> {
    public DisposableNode createNode(ElementController controller) throws NodeCreationException {
        Label label = new AutoHidableLabel();
        label.textProperty().bind(controller.getTooltip());
        return new DisposableNodeWrapper(label, new Callback<Node, Void>() {
            public Void call(Node node) {
                return null;
            }
        });
View Full Code Here

*/
public class DefaultLabelFactory implements NodeFactory<ElementController> {

    public DisposableNode createNode(ElementController controller) throws NodeCreationException {
        Label label = new Label();
        label.textProperty().bind(controller.getLabel());
        return new DisposableNodeWrapper(label, new Callback<Node, Void>() {
            public Void call(Node node) {
                return null;
            }
        });
View Full Code Here

        this.formatProvider = formatProvider;
    }

    public DisposableNode createNode(final ElementController controller) throws NodeCreationException {
        final Label label = new Label();
        label.textProperty().bind(new StringBinding() {

            {
                bind(controller);
            }
View Full Code Here

                }
            }
        });
        return new DisposableNodeWrapper(label, new Callback<Node, Void>() {
            public Void call(Node node) {
                label.textProperty().unbind();
                return null;
            }
        });
    }
}
View Full Code Here

    }

    private Node createTitleNode() {
        Label label = new Label();
        label.getStyleClass().add("form-title");
        label.textProperty().bind(fxForm.titleProperty());
        return label;
    }

    @Override
    public String toString() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.