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

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

Introduction

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

Prototype

public void setHeight(double value, Unit unit) 

Source Link

Usage

From source file:stroom.widget.htree.client.LayeredCanvas.java

License:Apache License

public void setSize(final int width, final int height) {
    this.width = width;
    this.height = height;

    Style style = getElement().getStyle();
    style.setWidth(width, Unit.PX);/*from www .ja v a  2 s . c om*/
    style.setHeight(height, Unit.PX);

    for (final Canvas canvas : layerMap.values()) {
        style = canvas.getElement().getStyle();
        style.setWidth(width, Unit.PX);
        style.setHeight(height, Unit.PX);
        canvas.setCoordinateSpaceWidth(width);
        canvas.setCoordinateSpaceHeight(height);
    }
}