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

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

Introduction

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

Prototype

public String getHeight() 

Source Link

Usage

From source file:annis.gui.widgets.gwt.client.ui.VAudioPlayer.java

License:Apache License

@Override
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
    if (client.updateComponent(this, uidl, true)) {
        return;//from w w w  . j  ava2s  .  co m
    }
    super.updateFromUIDL(uidl, client);
    Style mediaStyle = getMedia().getStyle();

    // ensure control visibility
    if ((mediaStyle.getHeight() == null || "".equals(mediaStyle.getHeight()))) {
        if (BrowserInfo.get().isChrome()) {
            mediaStyle.setHeight(32, Style.Unit.PX);
        } else {
            mediaStyle.setHeight(25, Style.Unit.PX);
        }
    }
}

From source file:com.bearsoft.gwt.ui.containers.window.WindowPanel.java

private void snapshotMetrics() throws NumberFormatException {
    // measurement
    Style targetStyle = getWidget().getElement().getStyle(); // content
    String sHeight = targetStyle.getHeight();
    contentHeightToRestore = Double.parseDouble(sHeight.substring(0, sHeight.length() - 2));
    String sWidth = targetStyle.getWidth();
    contentWidthToRestore = Double.parseDouble(sWidth.substring(0, sWidth.length() - 2));
    targetStyle = getMovableTarget().getElement().getStyle(); // window
    String sLeft = targetStyle.getLeft();
    leftToRestore = Double.parseDouble(sLeft.substring(0, sLeft.length() - 2));
    String sTop = targetStyle.getTop();
    topToRestore = Double.parseDouble(sTop.substring(0, sTop.length() - 2));
}

From source file:com.vaadin.terminal.gwt.client.ui.VAudio.java

License:Open Source License

@Override
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
    if (client.updateComponent(this, uidl, true)) {
        return;/*from w w  w  . j a  v  a  2s. co  m*/
    }
    super.updateFromUIDL(uidl, client);
    Style style = audio.getStyle();

    // Make sure that the controls are not clipped if visible.
    if (shouldShowControls(uidl) && (style.getHeight() == null || "".equals(style.getHeight()))) {
        if (BrowserInfo.get().isChrome()) {
            style.setHeight(32, Unit.PX);
        } else {
            style.setHeight(25, Unit.PX);
        }
    }
}