@Override public GridLayoutBuilder hideEmptyRowsAndColumns() { getInstance().setHideEmptyRowsAndColumns(true); return builder(); }
@Override public GridLayoutBuilder hideEmptyRowsAndColumns() { getInstance().setHideEmptyRowsAndColumns(true); return builder(); }
public UiLayout100() { this.layout = new GridLayout(3,1); layout.setMargin(true); layout.setSpacing(true); layout.setHideEmptyRowsAndColumns(true); layout.setColumnExpandRatio(0, 0.3f); layout.setColumnExpandRatio(1, 0.7f); layout.setColumnExpandRatio(2, 0); // layout.setSizeFull(); layout.setWidth("100%"); rows = 0; }
public AbstractColLayout(int columns) { this.columns = columns; this.layout = new GridLayout(columns*3,1); layout.setMargin(true); layout.setSpacing(true); layout.setHideEmptyRowsAndColumns(true); for (int i = 0; i < columns; i++) { layout.setColumnExpandRatio(i*3 + 0, 0.3f); layout.setColumnExpandRatio(i*3 + 1, 0.7f); layout.setColumnExpandRatio(i*3 + 2, 0); } // layout.setSizeFull(); layout.setWidth("100%"); rows = 0; }
/** * Creates the complete options component. * It's a grid with two rows and two columns, styled like: * * || * [language switch] [mode switch] File-Label || [file path display] * -------------------------------------------||---------------------------------- * New-Key-Label || [new key input] [add key button] * || * * NOTE: The second row is not filled with components on initialization, what means keys can not be added * Filling is done via {@link #updateShownOptions(boolean, boolean)} */ private void initOptionsComponent() { // create and layout the component m_optionsComponent = new GridLayout(2, 2); m_optionsComponent.setHideEmptyRowsAndColumns(true); m_optionsComponent.setDefaultComponentAlignment(Alignment.MIDDLE_RIGHT); m_optionsComponent.setWidth("100%"); m_optionsComponent.setColumnExpandRatio(1, 1f); m_optionsComponent.setStyleName("v-options"); // add the components m_optionsComponent.addComponent(m_upperLeftComponent, 0, 0); Component upperRight = createUpperRightComponent(); m_optionsComponent.addComponent(upperRight, 1, 0); }