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

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

Introduction

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

Prototype

public String getWidth() 

Source Link

Usage

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));
}