Package org.terasology.rendering.nui.layouts.miglayout

Examples of org.terasology.rendering.nui.layouts.miglayout.MigLayout


    public void addPropertyProvider(String groupLabel, final PropertyProvider<?> propertyProvider) {
        if (propertyProvider.getProperties().size() > 0) {
            final UIButton expand = new UIButton("", "-");
            expand.setTooltip("Click to collapse");
            final UILabel headline = new UILabel(groupLabel);
            final MigLayout layout = new MigLayout();
            layout.setColConstraints("[min][fill]");
            layout.setRowConstraints("[min]");

            expand.subscribe(new ActivateEventListener() {

                @Override
                public void onActivated(UIWidget widget) {
                    UIButton button = (UIButton) widget;
                    if ("-".equals(button.getText())) {
                        layout.clear();
                        invalidate();
                        button.setText("+");
                        button.setTooltip("Click to expand");
                    } else {
                        expand(propertyProvider, layout);
View Full Code Here

TOP

Related Classes of org.terasology.rendering.nui.layouts.miglayout.MigLayout

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.