float expand = DesignAttributeHandler.readAttribute("expand", rowElement.attributes(), float.class); setRowExpandRatio(row, expand);
/** * Sets the relative width of the grid rows * * @param relativeHeights * 3 row heightsuse * * @throws IllegalArgumentException * if {@code relativeHeights} does not have exactly 3 rows */ protected void setRowHeights(float... relativeHeights) { checkArgument(relativeHeights.length == 3); grid.setRowExpandRatio(0, relativeHeights[0]); grid.setRowExpandRatio(1, relativeHeights[1]); grid.setRowExpandRatio(2, relativeHeights[2]); }
/** * Sets the relative width of the grid rows * * @param relativeHeights * 3 row heightsuse * * @throws IllegalArgumentException * if {@code relativeHeights} does not have exactly 3 rows */ @SuppressFBWarnings("CLI_CONSTANT_LIST_INDEX") protected void setRowHeights(float... relativeHeights) { checkArgument(relativeHeights.length == 3); grid.setRowExpandRatio(0, relativeHeights[0]); grid.setRowExpandRatio(1, relativeHeights[1]); grid.setRowExpandRatio(2, relativeHeights[2]); }
@Override public GridLayoutBuilder rowExpandRatio(int rowIndex, float ratio) { getInstance().setRowExpandRatio(rowIndex, ratio); return builder(); }
@Override public GridLayoutBuilder rowExpandRatio(int rowIndex, float ratio) { getInstance().setRowExpandRatio(rowIndex, ratio); return builder(); }
protected void addMainLayout() { grid = new GridLayout(1, 2); grid.setSizeFull(); // Height division grid.setRowExpandRatio(1, 1.0f); setCompositionRoot(grid); }
protected void initLabel(String description) { descriptionLabel = new Label(description, Label.CONTENT_XHTML); descriptionLabel.setSizeFull(); layout.addComponent(descriptionLabel, 0, 0 , 1, 0); layout.setRowExpandRatio(0, 1.0f); } }
@Override public void doBuild() { label = new Label("This is the " + this.getClass() .getSimpleName()); label.setHeight("100px"); grid = new GridLayout(3, 3); grid.addComponent(label, 1, 1); grid.setSizeFull(); grid.setColumnExpandRatio(0, 0.33f); grid.setColumnExpandRatio(1, 0.33f); grid.setColumnExpandRatio(2, 0.33f); grid.setRowExpandRatio(0, 0.4f); grid.setRowExpandRatio(1, 0.2f); grid.setRowExpandRatio(2, 0.4f); label.setSizeFull(); setRootComponent(grid); }
@Override public void doBuild(ViewChangeBusMessage busMessage) { label = new Label("This is the " + this.getClass() .getSimpleName()); label.setHeight("100px"); grid = new GridLayout(3, 3); grid.addComponent(label, 1, 1); grid.setSizeFull(); grid.setColumnExpandRatio(0, 0.33f); grid.setColumnExpandRatio(1, 0.33f); grid.setColumnExpandRatio(2, 0.33f); grid.setRowExpandRatio(0, 0.4f); grid.setRowExpandRatio(1, 0.2f); grid.setRowExpandRatio(2, 0.4f); label.setSizeFull(); setRootComponent(grid); }
private void createMainLayout() { mainLayout = new GridLayout(); layoutWidgets(); mainLayout.setSizeFull(); mainLayout.setSpacing(true); mainLayout.setRowExpandRatio(0, 1F); mainLayout.setStyleName("fullSize"); }
private void createMainLayout() { mainLayout = new GridLayout(); layoutWidgets(); mainLayout.setSizeFull(); mainLayout.setSpacing(true); mainLayout.setRowExpandRatio(0, 1F); mainLayout.setStyleName("fullSize"); }
protected void initComponentLayout() { selectedComponentLayout = new GridLayout(1,2); selectedComponentLayout.setSizeFull(); selectedComponentLayout.setMargin(true); selectedComponentLayout.setSpacing(true); selectedComponentLayout.addStyleName(ExplorerLayout.STYLE_RELATED_CONTENT_CREATE_DETAIL); windowLayout.addComponent(selectedComponentLayout); windowLayout.setExpandRatio(selectedComponentLayout, 1.0f); selectedComponentLayout.setRowExpandRatio(0, 1.0f); selectedComponentLayout.setColumnExpandRatio(0, 1.0f); }
private void createMainLayout() { mainLayout = new GridLayout(4, 1); mainLayout.setSizeFull(); mainLayout.setSpacing(true); mainLayout.setStyleName("fullSize"); mainLayout.addComponent(filterByDSTypeLayout, 0, 0); mainLayout.addComponent(distributionTableLayout, 1, 0); mainLayout.addComponent(softwareModuleTableLayout, 2, 0); mainLayout.addComponent(filterBySMTypeLayout, 3, 0); mainLayout.setRowExpandRatio(0, 1.0F); mainLayout.setColumnExpandRatio(1, 0.5F); mainLayout.setColumnExpandRatio(2, 0.5F); }
private void createMainLayout() { mainLayout = new GridLayout(4, 1); mainLayout.setSizeFull(); mainLayout.setSpacing(true); mainLayout.setStyleName("fullSize"); mainLayout.addComponent(filterByDSTypeLayout, 0, 0); mainLayout.addComponent(distributionTableLayout, 1, 0); mainLayout.addComponent(softwareModuleTableLayout, 2, 0); mainLayout.addComponent(filterBySMTypeLayout, 3, 0); mainLayout.setRowExpandRatio(0, 1.0F); mainLayout.setColumnExpandRatio(1, 0.5F); mainLayout.setColumnExpandRatio(2, 0.5F); }
private GridLayout createMainLayout() { createDetailsAndUploadLayout(); mainLayout = new GridLayout(3, 1); mainLayout.setSizeFull(); mainLayout.setSpacing(true); mainLayout.setStyleName("fullSize"); mainLayout.addComponent(filterByTypeLayout, 0, 0); mainLayout.addComponent(smTableLayout, 1, 0); mainLayout.addComponent(detailAndUploadLayout, 2, 0); mainLayout.setRowExpandRatio(0, 1.0F); mainLayout.setColumnExpandRatio(1, 0.5F); mainLayout.setColumnExpandRatio(2, 0.5F); return mainLayout; }
private GridLayout createMainLayout() { createDetailsAndUploadLayout(); mainLayout = new GridLayout(3, 1); mainLayout.setSizeFull(); mainLayout.setSpacing(true); mainLayout.setStyleName("fullSize"); mainLayout.addComponent(filterByTypeLayout, 0, 0); mainLayout.addComponent(smTableLayout, 1, 0); mainLayout.addComponent(detailAndUploadLayout, 2, 0); mainLayout.setRowExpandRatio(0, 1.0F); mainLayout.setColumnExpandRatio(1, 0.5F); mainLayout.setColumnExpandRatio(2, 0.5F); return mainLayout; }
protected void addMainLayout() { if(showEvents) { grid = new GridLayout(3, 3); grid.setColumnExpandRatio(0, .25f); grid.setColumnExpandRatio(1, .52f); grid.setColumnExpandRatio(2, .23f); } else { grid = new GridLayout(2, 3); grid.setColumnExpandRatio(0, .25f); grid.setColumnExpandRatio(1, .75f); } grid.addStyleName(Reindeer.SPLITPANEL_SMALL); grid.setSizeFull(); // Height division grid.setRowExpandRatio(2, 1.0f); setCompositionRoot(grid); }
result.setRowExpandRatio(3, 1.0f);
wrapper.setRowExpandRatio(0, .01f); wrapper.setRowExpandRatio(1, .99f); wrapper.setSizeFull(); wrapper.addComponent(filterButtonLayout);
public CreateAttachmentPopupWindow() { this.i18nManager = ExplorerApp.get().getI18nManager(); this.attachmentRendererManager = ExplorerApp.get().getAttachmentRendererManager(); this.taskService = ProcessEngines.getDefaultProcessEngine().getTaskService(); setCaption(i18nManager.getMessage(Messages.RELATED_CONTENT_ADD)); setWidth(700, UNITS_PIXELS); setHeight(430, UNITS_PIXELS); center(); setModal(true); addStyleName(Reindeer.WINDOW_LIGHT); layout = new HorizontalLayout(); layout.setSpacing(false); layout.setMargin(true); layout.setSizeFull(); setContent(layout); initTable(); detailLayout = new GridLayout(1,2); detailLayout.setSizeFull(); detailLayout.setMargin(true); detailLayout.setSpacing(true); detailLayout.addStyleName(ExplorerLayout.STYLE_RELATED_CONTENT_CREATE_DETAIL); layout.addComponent(detailLayout); layout.setExpandRatio(detailLayout, 1.0f); detailLayout.setRowExpandRatio(0, 1.0f); detailLayout.setColumnExpandRatio(0, 1.0f); initActions(); }