List of usage examples for com.vaadin.ui AbstractOrderedLayout setExpandRatio
public void setExpandRatio(Component component, float ratio)
This method is used to control how excess space in layout is distributed among components.
From source file:org.jdal.vaadin.ui.Box.java
License:Apache License
/** * Try to imitate HorizontalStruct on Swing BoxLayout * @param layout Layout to add the struct * @param width struct withd//from ww w. j ava 2 s.co m */ public static void addHorizontalStruct(AbstractOrderedLayout layout, int width) { Label label = new Label(); label.setWidth(width + "px"); layout.addComponent(label); layout.setExpandRatio(label, 0f); }
From source file:org.jdal.vaadin.ui.Box.java
License:Apache License
/** * Try to imitate VerticalStruct of Swing BoxLayout * @param layout layout to add struct/*from w w w . j av a 2s. c om*/ * @param height struct height */ public static void addVerticalStruct(AbstractOrderedLayout layout, int height) { Label label = new Label(); label.setHeight(height + "px"); layout.addComponent(label); layout.setExpandRatio(label, 0f); }