Package org.apache.pivot.beans

Examples of org.apache.pivot.beans.NamespaceBinding


public class PropertyBinding extends Window implements Bindable {
    @Override
    public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
        // Bind list button selection to label text
        NamespaceBinding namespaceBinding1 = new NamespaceBinding(namespace,
            "listButton.selectedItem", "listButtonLabel1.text");

        namespaceBinding1.bind();

        // Bind list button selection to label text with bind mapping
        NamespaceBinding namespaceBinding2 = new NamespaceBinding(namespace,
            "listButton.selectedItem", "listButtonLabel2.text", new NamespaceBinding.BindMapping() {
            @Override
            public Object evaluate(Object value) {
                return value.toString().toUpperCase();
            }
        });

        namespaceBinding2.bind();
    }
View Full Code Here

TOP

Related Classes of org.apache.pivot.beans.NamespaceBinding

Copyright © 2018 www.massapicom. 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.