Java Code Examples for com.vaadin.client.WidgetUtil#measureHorizontalBorder()

The following examples show how to use com.vaadin.client.WidgetUtil#measureHorizontalBorder() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DateCell.java    From calendar-component with Apache License 2.0 5 votes vote down vote up
/**
 * @param isHorizontalSized
 *            if true, this DateCell is sized with CSS and not via
 *            {@link #setWidthPX(int)}
 */
public void setHorizontalSized(boolean isHorizontalSized) {
    if (isHorizontalSized) {
        addStyleDependentName("Hsized");

        width = getOffsetWidth()
                - WidgetUtil.measureHorizontalBorder(getElement());
        // Update moveWidth for any DateCellDayItem child
        updateEventCellsWidth();
        recalculateItemWidths();
    } else {
        removeStyleDependentName("Hsized");
    }
}
 
Example 2
Source File: DateCellContainer.java    From calendar-component with Apache License 2.0 4 votes vote down vote up
public static int measureBorderWidth(DateCellContainer dc) {
    if (borderWidth == -1) {
        borderWidth = WidgetUtil.measureHorizontalBorder(dc.getElement());
    }
    return borderWidth;
}