use of com.vaadin.ui.HasComponents in project jmix by jmix-framework.
the class AbstractCanvasLayout method getWeight.
@Override
public int getWeight() {
Layout unwrapThis = this.unwrap(Layout.class);
HasComponents parent = unwrapThis.getParent();
if (parent instanceof AbstractOrderedLayout) {
int weight = (int) ((AbstractOrderedLayout) parent).getExpandRatio(unwrapThis);
return weight > 0 ? weight : 1;
} else {
return 1;
}
}
Aggregations