Example usage for com.vaadin.ui AbstractOrderedLayout getExpandRatio

List of usage examples for com.vaadin.ui AbstractOrderedLayout getExpandRatio

Introduction

In this page you can find the example usage for com.vaadin.ui AbstractOrderedLayout getExpandRatio.

Prototype

public float getExpandRatio(Component component) 

Source Link

Document

Returns the expand ratio of given component.

Usage

From source file:com.haulmont.cuba.web.gui.components.WebComponentsHelper.java

License:Apache License

public static boolean isComponentExpanded(com.haulmont.cuba.gui.components.Component component) {
    Component vComponent = WebComponentsHelper.getComposition(component);
    if (vComponent.getParent() instanceof AbstractOrderedLayout) {
        AbstractOrderedLayout layout = (AbstractOrderedLayout) vComponent.getParent();
        return (int) layout.getExpandRatio(vComponent) == 1;
    }/*from w w w  . ja v  a  2  s.c  o  m*/

    return false;
}