Package com.eagerlogic.cubee.client.properties

Examples of com.eagerlogic.cubee.client.properties.IChangeListener


            item.widthProperty().bind(attributesPanel.clientWidthProperty());
            vbAttributes.getChildren().add(item);
           
        }
       
        collapsed.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                if (collapsed.get()) {
                    collapsePanel();
View Full Code Here


        scaleX.addChangeListener(transformChangedListener);
        scaleY.addChangeListener(transformChangedListener);
        transformCenterX.addChangeListener(transformChangedListener);
        transformCenterY.addChangeListener(transformChangedListener);
        hovered.initReadonlyBind(hoveredSetter);
        padding.addChangeListener(new IChangeListener() {
            @Override
            public void onChanged(Object sender) {
                Padding p = padding.get();
                if (p == null) {
                    getElement().getStyle().setPadding(0.0, com.google.gwt.dom.client.Style.Unit.PX);
                } else {
                    p.apply(getElement());
                }
                requestLayout();
            }
        });
        padding.invalidate();
        border.addChangeListener(new IChangeListener() {
            @Override
            public void onChanged(Object sender) {
                Border b = border.get();
                if (b == null) {
                    getElement().getStyle().clearBorderStyle();
                    getElement().getStyle().clearBorderColor();
                    getElement().getStyle().clearBorderWidth();
                    getElement().getStyle().clearProperty("borderRadius");
                } else {
                    b.apply(getElement());
                }
                requestLayout();
            }
        });
        cursor.addChangeListener(new IChangeListener() {
            @Override
            public void onChanged(Object sender) {
                getElement().getStyle().setProperty("cursor", cursor.get().getCssValue());
            }
        });
        visible.addChangeListener(new IChangeListener() {
            @Override
            public void onChanged(Object sender) {
                if (visible.get()) {
                    getElement().getStyle().setVisibility(com.google.gwt.dom.client.Style.Visibility.VISIBLE);
                } else {
                    getElement().getStyle().setVisibility(com.google.gwt.dom.client.Style.Visibility.HIDDEN);
                }
            }
        });
        enabled.addChangeListener(new IChangeListener() {
            @Override
            public void onChanged(Object sender) {
                if (!enabled.get()) {
                    getElement().setAttribute("disabled", "true");
                } else {
                    getElement().removeAttribute("disabled");
                }
            }
        });
        alpha.addChangeListener(new IChangeListener() {
            @Override
            public void onChanged(Object sender) {
                getElement().getStyle().setOpacity(alpha.get());
            }
        });
        selectable.addChangeListener(new IChangeListener() {
            @Override
            public void onChanged(Object sender) {
                if (selectable.get()) {
                    getElement().getStyle().clearProperty("mozUserSelect");
                    getElement().getStyle().clearProperty("khtmlUserSelect");
                    getElement().getStyle().clearProperty("webkitUserSelect");
                    getElement().getStyle().clearProperty("msUserSelect");
                    getElement().getStyle().clearProperty("userSelect");
                } else {
                    getElement().getStyle().setProperty("mozUserSelect", "none");
                    getElement().getStyle().setProperty("khtmlUserSelect", "none");
                    getElement().getStyle().setProperty("webkitUserSelect", "none");
                    getElement().getStyle().setProperty("msUserSelect", "none");
                    getElement().getStyle().setProperty("userSelect", "none");
                }
            }
        });
        selectable.invalidate();
        minWidth.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                if (minWidth.get() == null) {
                    element.getStyle().clearProperty("minWidth");
                } else {
                    element.getStyle().setProperty("minWidth", minWidth.get() + "px");
                }
                requestLayout();
            }
        });
        minHeight.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                if (minHeight.get() == null) {
                    element.getStyle().clearProperty("minHeight");
                } else {
                    element.getStyle().setProperty("minHeight", minHeight.get() + "px");
                }
                requestLayout();
            }
        });
        maxWidth.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                if (maxWidth.get() == null) {
                    element.getStyle().clearProperty("maxWidth");
                } else {
                    element.getStyle().setProperty("maxWidth", maxWidth.get() + "px");
                }
                requestLayout();
            }
        });
        maxHeight.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                if (maxHeight.get() == null) {
                    element.getStyle().clearProperty("maxHeight");
                } else {
                    element.getStyle().setProperty("maxHeight", maxHeight.get() + "px");
                }
                requestLayout();
            }
        });
        handlePointer.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                if (handlePointer.get()) {
                    getElement().getStyle().clearProperty("pointerEvents");
View Full Code Here

    private AView[] views;
    private int lastSelectedIndex = 0;
    private Timeline tl;

    public AnimatedViewSwitcher() {
        selectedIndex.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                if (tl != null) {
                    tl.stop();
View Full Code Here

    private BackgroundProperty background = new BackgroundProperty(new ColorBackground(Color.TRANSPARENT), true, false);
    private Property<BoxShadow> shadow = new Property<BoxShadow>(null, true, false);

    public AUserControl() {
        super(DOM.createDiv());
        width.addChangeListener(new IChangeListener() {
            @Override
            public void onChanged(Object sender) {
                if (width.get() == null) {
                    getElement().getStyle().clearWidth();
                    getElement().getStyle().setOverflowX(com.google.gwt.dom.client.Style.Overflow.HIDDEN);
                } else {
                    getElement().getStyle().setWidth(width.get(), com.google.gwt.dom.client.Style.Unit.PX);
                    getElement().getStyle().setOverflowX(com.google.gwt.dom.client.Style.Overflow.HIDDEN);
                }
                requestLayout();
            }
        });
        width.invalidate();
        height.addChangeListener(new IChangeListener() {
            @Override
            public void onChanged(Object sender) {
                if (height.get() == null) {
                    getElement().getStyle().clearHeight();
                    getElement().getStyle().setOverflowY(com.google.gwt.dom.client.Style.Overflow.HIDDEN);
                } else {
                    getElement().getStyle().setHeight(height.get(), com.google.gwt.dom.client.Style.Unit.PX);
                    getElement().getStyle().setOverflowY(com.google.gwt.dom.client.Style.Overflow.HIDDEN);
                }
                requestLayout();
            }
        });
        height.invalidate();
        background.addChangeListener(new IChangeListener() {
            @Override
            public void onChanged(Object sender) {
                getElement().getStyle().clearBackgroundColor();
                getElement().getStyle().clearBackgroundImage();
                getElement().getStyle().setProperty("background", "none");
                if (background.get() != null) {
                    background.get().apply(getElement());
                }
            }
        });
        background.invalidate();
        shadow.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                if (shadow.get() == null) {
                    getElement().getStyle().clearProperty("boxShadow");
View Full Code Here

    private AFillView[] views;
    private int lastSelectedIndex = 0;
    private Timeline tl;

    public AnimatedViewSwitcher() {
        selectedIndex.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                if (tl != null) {
                    tl.stop();
View Full Code Here

            }
        });
        root.getChildren().add(label);
        root.setLastCellVAlign(EVAlign.MIDDLE);

        this.collapsed.addChangeListener(new IChangeListener() {
            @Override
            public void onChanged(Object sender) {
                if (tl != null) {
                    tl.stop();
                }
View Full Code Here

    public HBox() {
        super(DOM.createDiv());
        getElement().getStyle().setOverflow(Style.Overflow.HIDDEN);
        this.pointerTransparentProperty().set(true);
        height.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                requestLayout();
            }
View Full Code Here

    public VBox() {
        super(DOM.createDiv());
        getElement().getStyle().setOverflow(Style.Overflow.HIDDEN);
        this.pointerTransparentProperty().set(true);
        width.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                requestLayout();
            }
View Full Code Here

    }

    TextBox(Element e) {
        super(e);
        this.borderProperty().set(new Border(1, Color.LIGHT_GRAY, 0));
        width.addChangeListener(new IChangeListener() {
            @Override
            public void onChanged(Object sender) {
                if (width.get() == null) {
                    getElement().getStyle().clearWidth();
                    getElement().getStyle().setOverflowX(com.google.gwt.dom.client.Style.Overflow.AUTO);
                } else {
                    getElement().getStyle().setWidth(width.get(), com.google.gwt.dom.client.Style.Unit.PX);
                    getElement().getStyle().setOverflowX(com.google.gwt.dom.client.Style.Overflow.HIDDEN);
                }
                requestLayout();
            }
        });
        height.addChangeListener(new IChangeListener() {
            @Override
            public void onChanged(Object sender) {
                if (height.get() == null) {
                    getElement().getStyle().clearHeight();
                    getElement().getStyle().setOverflowY(com.google.gwt.dom.client.Style.Overflow.AUTO);
                } else {
                    getElement().getStyle().setHeight(height.get(), com.google.gwt.dom.client.Style.Unit.PX);
                    getElement().getStyle().setOverflowY(com.google.gwt.dom.client.Style.Overflow.HIDDEN);
                }
                requestLayout();
            }
        });
        text.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                if (!text.get().equals(getElement().getPropertyString("value"))) {
                    getElement().setPropertyString("value", text.get());
                }
            }
        });
        foreColor.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                if (foreColor.get() == null) {
                    getElement().getStyle().setColor("rgba(0, 0, 0, 0.0)");
                } else {
                    getElement().getStyle().setColor(foreColor.get().toCSS());
                }
            }
        });
        foreColor.invalidate();
        textAlign.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                textAlign.get().apply(getElement());
            }
        });
        textAlign.invalidate();
        verticalAlign.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                EVAlign ta = verticalAlign.get();
                if (ta == EVAlign.TOP) {
                    getElement().getStyle().setVerticalAlign(com.google.gwt.dom.client.Style.VerticalAlign.TOP);
                } else if (ta == EVAlign.MIDDLE) {
                    getElement().getStyle().setVerticalAlign(com.google.gwt.dom.client.Style.VerticalAlign.MIDDLE);
                } else if (ta == EVAlign.BOTTOM) {
                    getElement().getStyle().setVerticalAlign(com.google.gwt.dom.client.Style.VerticalAlign.BOTTOM);
                }
            }
        });
        verticalAlign.invalidate();
        underline.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                if (underline.get()) {
                    getElement().getStyle().setTextDecoration(com.google.gwt.dom.client.Style.TextDecoration.UNDERLINE);
                } else {
                    getElement().getStyle().setTextDecoration(com.google.gwt.dom.client.Style.TextDecoration.NONE);
                }
                requestLayout();
            }
        });
        underline.invalidate();
        bold.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                if (bold.get()) {
                    getElement().getStyle().setFontWeight(com.google.gwt.dom.client.Style.FontWeight.BOLD);
                } else {
                    getElement().getStyle().setFontWeight(com.google.gwt.dom.client.Style.FontWeight.NORMAL);
                }
                requestLayout();
            }
        });
        bold.invalidate();
        italic.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                if (italic.get()) {
                    getElement().getStyle().setFontStyle(com.google.gwt.dom.client.Style.FontStyle.ITALIC);
                } else {
                    getElement().getStyle().setFontStyle(com.google.gwt.dom.client.Style.FontStyle.NORMAL);
                }
                requestLayout();
            }
        });
        italic.invalidate();
        fontSize.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                getElement().getStyle().setFontSize(fontSize.get(), com.google.gwt.dom.client.Style.Unit.PX);
                requestLayout();
            }
        });
        fontSize.invalidate();
        fontFamily.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                fontFamily.get().apply(getElement());
                requestLayout();
            }
        });
        fontFamily.invalidate();
        background.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                if (background.get() == null) {
                    getElement().getStyle().clearBackgroundColor();
View Full Code Here

public final class HTMLComponent extends AUserControl {

    private final Property<String> html = new Property<String>(null, true, false);

    public HTMLComponent() {
        html.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                if (html.get() == null) {
                    getElement().setInnerHTML("");
View Full Code Here

TOP

Related Classes of com.eagerlogic.cubee.client.properties.IChangeListener

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.