Example usage for com.google.gwt.dom.client Style clearDisplay

List of usage examples for com.google.gwt.dom.client Style clearDisplay

Introduction

In this page you can find the example usage for com.google.gwt.dom.client Style clearDisplay.

Prototype

public void clearDisplay() 

Source Link

Usage

From source file:com.dianaui.universal.core.client.ui.DateTimePicker.java

License:Apache License

@Override
public void setVisible(final boolean visible) {
    Style style = container.getElement().getStyle();

    if (visible) {
        style.setDisplay(Style.Display.BLOCK);
        style.setZIndex(9999);//from ww w. ja va2s  .c o  m
        style.setPosition(Style.Position.ABSOLUTE);
        style.setProperty("right", "auto");
    } else {
        super.setVisible(false);

        style.clearDisplay();
        style.clearZIndex();
        style.clearPosition();
        style.clearTop();
        style.clearLeft();
    }
}

From source file:geogebra.web.gui.app.docklayout.LayoutImpl.java

License:Apache License

public void layout(Layer layer) {
    Style style = layer.container.getStyle();

    if (layer.visible) {
        style.clearDisplay();
    } else {//from w w w. j  a  v  a 2 s .c om
        style.setDisplay(Display.NONE);
    }

    style.setProperty("left", layer.setLeft ? (layer.left + layer.leftUnit.getType()) : "");
    style.setProperty("top", layer.setTop ? (layer.top + layer.topUnit.getType()) : "");
    style.setProperty("right", layer.setRight ? (layer.right + layer.rightUnit.getType()) : "");
    style.setProperty("bottom", layer.setBottom ? (layer.bottom + layer.bottomUnit.getType()) : "");
    style.setProperty("width", layer.setWidth ? (layer.width + layer.widthUnit.getType()) : "");
    style.setProperty("height", layer.setHeight ? (layer.height + layer.heightUnit.getType()) : "");

    style = layer.child.getStyle();
    switch (layer.hPos) {
    case BEGIN:
        style.setLeft(0, Unit.PX);
        style.clearRight();
        break;
    case END:
        style.clearLeft();
        style.setRight(0, Unit.PX);
        break;
    case STRETCH:
        style.setLeft(0, Unit.PX);
        style.setRight(0, Unit.PX);
        break;
    }

    switch (layer.vPos) {
    case BEGIN:
        style.setTop(0, Unit.PX);
        style.clearBottom();
        break;
    case END:
        style.clearTop();
        style.setBottom(0, Unit.PX);
        break;
    case STRETCH:
        style.setTop(0, Unit.PX);
        style.setBottom(0, Unit.PX);
        break;
    }
}

From source file:info.magnolia.ui.vaadin.gwt.client.magnoliashell.viewport.ShellAppsTransitionDelegate.java

License:Open Source License

private void initAnimations() {
    this.fadeInAnimation = new FadeAnimation(ALPHA_MAX, false) {
        @Override//from  w w w.  j ava 2 s  .  c o  m
        protected void onStart() {
            super.onStart();
            Style style = getCurrentElement().getStyle();
            String currentOpacity = style.getOpacity();
            if (currentOpacity == null || currentOpacity.isEmpty()) {
                style.setOpacity(0d);
            }
            style.clearDisplay();
        }
    };
    this.fadeInAnimation.addCallback(new JQueryCallback() {
        @Override
        public void execute(JQueryWrapper query) {
            viewport.onShellAppLoaded(Util.<Widget>findWidget(query.get(0), null));
        }
    });

    this.slideUpAnimation = new SlideAnimation(false);
    this.slideDownAnimation = new SlideAnimation(false);

    this.slideDownAnimation.addCallback(new JQueryCallback() {
        @Override
        public void execute(JQueryWrapper query) {
            if (!slideDownAnimation.isCancelled()) {
                viewport.onShellAppLoaded(viewport.getVisibleChild());
            }
        }
    });

    this.slideUpAnimation.addCallback(new JQueryCallback() {
        @Override
        public void execute(JQueryWrapper query) {
            if (!slideUpAnimation.isCancelled()) {
                viewport.onShellAppsHidden();
            }
        }
    });
    this.fadeOutAnimation = new FadeAnimation(ALPHA_MIN, false);
}

From source file:org.opencms.gwt.client.ui.input.location.CmsLocationPopupContent.java

License:Open Source License

/**
 * Sets the field visibility.<p>//ww w  .j a  va 2 s. co  m
 *
 * @param visible <code>true</code> to show the field
 */
protected void setAddressVisible(boolean visible) {

    Style style = m_addressLabel.getElement().getParentElement().getStyle();
    if (visible) {
        style.clearDisplay();
    } else {
        style.setDisplay(Display.NONE);
    }
}

From source file:org.opencms.gwt.client.ui.input.location.CmsLocationPopupContent.java

License:Open Source License

/**
 * Sets the field visibility.<p>// w w w.  j av a2  s . com
 *
 * @param visible <code>true</code> to show the field
 */
protected void setLatLngVisible(boolean visible) {

    Style styleLat = m_latitudeLabel.getElement().getParentElement().getStyle();
    Style styleLng = m_longitudeLabel.getElement().getParentElement().getStyle();
    if (visible) {
        styleLat.clearDisplay();
        styleLng.clearDisplay();
    } else {
        styleLat.setDisplay(Display.NONE);
        styleLng.setDisplay(Display.NONE);
    }
}

From source file:org.opencms.gwt.client.ui.input.location.CmsLocationPopupContent.java

License:Open Source License

/**
 * Sets the field visibility.<p>/*from   w  w  w.j a v  a2s  .  co m*/
 *
 * @param visible <code>true</code> to show the field
 */
protected void setMapVisible(boolean visible) {

    Style style = m_mapCanvas.getStyle();
    if (visible) {
        style.clearDisplay();
    } else {
        style.setDisplay(Display.NONE);
    }
}

From source file:org.opencms.gwt.client.ui.input.location.CmsLocationPopupContent.java

License:Open Source License

/**
 * Sets the field visibility.<p>//from   w  ww.  j  a va  2s  .  c  o m
 *
 * @param visible <code>true</code> to show the field
 */
protected void setModeVisible(boolean visible) {

    Style style = m_modeLabel.getElement().getParentElement().getStyle();
    if (visible) {
        style.clearDisplay();
    } else {
        style.setDisplay(Display.NONE);
    }
}

From source file:org.opencms.gwt.client.ui.input.location.CmsLocationPopupContent.java

License:Open Source License

/**
 * Sets the field visibility.<p>//from  w w  w .  j  a v  a  2s  . c om
 *
 * @param visible <code>true</code> to show the field
 */
protected void setSizeVisible(boolean visible) {

    Style style = m_sizeLabel.getElement().getParentElement().getStyle();
    if (visible) {
        style.clearDisplay();
    } else {
        style.setDisplay(Display.NONE);
    }
}

From source file:org.opencms.gwt.client.ui.input.location.CmsLocationPopupContent.java

License:Open Source License

/**
 * Sets the field visibility.<p>// www  .  j  a  v  a 2  s . c  o  m
 *
 * @param visible <code>true</code> to show the field
 */
protected void setTypeVisible(boolean visible) {

    Style style = m_typeLabel.getElement().getParentElement().getStyle();
    if (visible) {
        style.clearDisplay();
    } else {
        style.setDisplay(Display.NONE);
    }
}

From source file:org.opencms.gwt.client.ui.input.location.CmsLocationPopupContent.java

License:Open Source License

/**
 * Sets the field visibility.<p>/*from w w  w  .ja  va 2s  .  c o  m*/
 *
 * @param visible <code>true</code> to show the field
 */
protected void setZoomVisible(boolean visible) {

    Style style = m_zoomLabel.getElement().getParentElement().getStyle();
    if (visible) {
        style.clearDisplay();
    } else {
        style.setDisplay(Display.NONE);
    }
}