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

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

Introduction

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

Prototype

public void clearPosition() 

Source Link

Usage

From source file:org.eclipse.che.ide.ui.window.Window.java

License:Open Source License

/**
 * Hides the {@link Window} popup. The popup will animate out of view.
 *///w  w  w  . jav  a 2 s  . c  om
public void hide() {
    if (blocked) {
        return;
    }

    if (!isShowing) {
        return;
    }

    isShowing = false;

    // Animate the popup out of existence.
    view.setShowing(false);

    // Remove the popup when the animation completes.
    new Timer() {
        @Override
        public void run() {
            if (blocked) {
                return;
            }

            // The popup may have been shown before this timer executes.
            if (!isShowing) {
                view.removeFromParent();
                Style style = view.contentContainer.getElement().getStyle();
                style.clearPosition();
                style.clearLeft();
                style.clearTop();
            }
        }
    }.schedule(view.getAnimationDuration());
}

From source file:org.opencms.ade.containerpage.client.ui.CmsGroupcontainerEditor.java

License:Open Source License

/**
 * Closes the dialog.<p>//from ww w . j a va 2  s . com
 * 
 * @param breakingUp <code>true</code> if the group container is to be removed
 */
protected void closeDialog(boolean breakingUp) {

    m_controller.stopEditingGroupcontainer();
    m_editingPlaceholder.removeFromParent();
    m_editorDialog.hide();
    RootPanel.get().removeStyleName(I_CmsLayoutBundle.INSTANCE.containerpageCss().groupcontainerEditing());
    if (!breakingUp) {
        m_groupContainer.clearEditingPlaceholder();
        Style style = m_groupContainer.getElement().getStyle();
        style.clearPosition();
        style.clearTop();
        style.clearLeft();
        style.clearZIndex();
        style.clearWidth();
        m_parentContainer.insert(m_groupContainer, m_indexPosition);
        m_groupContainer.getElementOptionBar().setVisible(true);
        if (!m_groupContainer.iterator().hasNext()) {
            // group-container is empty, mark it
            m_groupContainer.addStyleName(I_CmsLayoutBundle.INSTANCE.containerpageCss().emptyGroupContainer());
        }
    }
    INSTANCE = null;
    this.removeFromParent();
}

From source file:org.opencms.ade.containerpage.client.ui.groupeditor.A_CmsGroupEditor.java

License:Open Source License

/**
 * Closes the dialog.<p>/*from  w  w  w  .jav  a  2s . c om*/
 *
 * @param breakingUp <code>true</code> if the group container is to be removed
 */
protected void closeDialog(boolean breakingUp) {

    m_controller.stopEditingGroupcontainer();
    m_editingPlaceholder.removeFromParent();
    m_editorDialog.hide();
    RootPanel.get().removeStyleName(I_CmsLayoutBundle.INSTANCE.containerpageCss().groupcontainerEditing());
    if (!breakingUp) {
        m_groupContainer.clearEditingPlaceholder();
        Style style = m_groupContainer.getElement().getStyle();
        style.clearPosition();
        style.clearTop();
        style.clearLeft();
        style.clearZIndex();
        style.clearWidth();
        m_parentContainer.insert(m_groupContainer, m_indexPosition);
        m_groupContainer.getElementOptionBar().setVisible(true);
        if (!m_groupContainer.iterator().hasNext()) {
            // group-container is empty, mark it
            m_groupContainer.addStyleName(I_CmsLayoutBundle.INSTANCE.containerpageCss().emptyGroupContainer());
        }
    }
    clearInstance();
    removeFromParent();
    if (!m_controller.getData().isUseClassicEditor()) {
        for (Widget element : m_groupContainer) {
            if (element instanceof CmsContainerPageElementPanel) {
                ((CmsContainerPageElementPanel) element).removeInlineEditor();
            }
        }
    }
    m_controller.reinitializeButtons();
    m_controller.reInitInlineEditing();
    m_controller.fireEvent(new CmsContainerpageEvent(EventType.elementEdited));
}

From source file:org.vaadin.alump.fancylayouts.gwt.client.GwtFancyPanel.java

License:Apache License

/**
 * Clear hardcoded position on the screen
 * /*from  w w w.java 2  s .co m*/
 * @param wrapper
 */
private void clearWrapperTransitionPosition(Element wrapper) {
    Style style = wrapper.getStyle();
    style.clearPosition();
    if (this.isScrollable()) {
        style.clearHeight();
    } else {
        style.setHeight(100, Unit.PCT);
    }
    style.clearTop();
    style.clearLeft();
    style.clearOverflow();
}