Example usage for com.vaadin.client Util measureVerticalPaddingAndBorder

List of usage examples for com.vaadin.client Util measureVerticalPaddingAndBorder

Introduction

In this page you can find the example usage for com.vaadin.client Util measureVerticalPaddingAndBorder.

Prototype

@Deprecated
public static int measureVerticalPaddingAndBorder(Element element, int paddingGuess) 

Source Link

Usage

From source file:fi.jasoft.simplecalendar.client.SimpleCalendarWidget.java

License:Apache License

private void calculateRowHeights() {
    int totalHeight = Util.getRequiredHeight(this)
            - Util.measureVerticalPaddingAndBorder(grid.getElement(), 10);
    double rowHeight = totalHeight / ROWS;

    for (int r = 0; r < ROWS; r++) {
        for (int c = 0; c < COLUMNS; c++) {
            if (r > 0) {
                grid.getCellFormatter().getElement(r, c).getStyle().setHeight(rowHeight, Unit.PX);
            }// www  .  j  a  v a  2 s  .  c o m
        }
    }
}