@Override protected Component initContent() { HorizontalLayout chooseDialogLayout = new HorizontalLayout(); chooseDialogLayout.setSizeFull(); chooseDialogLayout.setMargin(false); Component workbenchComponent = super.initContent(); chooseDialogLayout.addComponent(workbenchComponent); chooseDialogLayout.setExpandRatio(workbenchComponent, 1f); previewBar.setHeight(DEFAULT_HEIGHT); chooseDialogLayout.addComponent(previewBar); chooseDialogLayout.setExpandRatio(previewBar, 0f); return chooseDialogLayout; }
@Override public Component initContent() { HorizontalLayout layout = new HorizontalLayout(); layout.setSpacing(true); layout.setWidth("100%"); layout.addComponent(oidType); layout.addComponent(oidValue); layout.setExpandRatio(oidValue, 1); return layout; }
private Component getLegend(String entity) { HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setSpacing(true); horizontalLayout.addStyleName("summary"); horizontalLayout.addStyleName("global"); Label labelx = new Label(entity); labelx.addStyleName("summary-font-legend"); Image ackdImage = new Image(null, new ThemeResource("img/acknowledged.png")); ackdImage.setWidth(16, Sizeable.Unit.PIXELS); Image unackdImage = new Image(null, new ThemeResource("img/unacknowledged.png")); unackdImage.setWidth(16, Sizeable.Unit.PIXELS); Label dummyLabel = new Label(); dummyLabel.setWidth(32, Sizeable.Unit.PIXELS); horizontalLayout.addComponent(labelx); horizontalLayout.addComponent(ackdImage); horizontalLayout.addComponent(unackdImage); horizontalLayout.addComponent(dummyLabel); horizontalLayout.setComponentAlignment(ackdImage, Alignment.TOP_RIGHT); horizontalLayout.setComponentAlignment(unackdImage, Alignment.TOP_RIGHT); horizontalLayout.setExpandRatio(labelx, 4.0f); horizontalLayout.setExpandRatio(ackdImage, 1.0f); horizontalLayout.setExpandRatio(unackdImage, 1.0f); horizontalLayout.setExpandRatio(dummyLabel, 1.0f); horizontalLayout.setWidth(375, Sizeable.Unit.PIXELS); return horizontalLayout; }
horizontalLayout.addComponent(image); horizontalLayout.setExpandRatio(labelSeverity, 4.0f); horizontalLayout.setExpandRatio(labelAcknowledge, 1.0f); horizontalLayout.setExpandRatio(labelNotAcknowledged, 1.0f); horizontalLayout.setExpandRatio(image, 1.0f);
horizontalLayout.addComponent(image); horizontalLayout.setExpandRatio(labelSeverity, 4.0f); horizontalLayout.setExpandRatio(labelAcknowledge, 1.0f); horizontalLayout.setExpandRatio(labelNotAcknowledged, 1.0f); horizontalLayout.setExpandRatio(image, 1.0f);
horizontalLayout.setExpandRatio(cancel, 1); horizontalLayout.setComponentAlignment(cancel, Alignment.TOP_RIGHT);
private void construct() { mainLayout.setPrimaryStyleName("switcher"); mainLayout.addStyleName(VARIATION_GREEN.equals(colorVariation) ? cssGreenVariationClassname : cssBlackVariationClassname); // back-arrow back = new Button(""); back.setPrimaryStyleName(cssSwitcherArrowClassname); back.addStyleName("icon-arrow2_w"); mainLayout.addComponent(back); // combobox with descriptionLabel below wrapped in verticalLayout // comboLayout.setWidth(100, Unit.PERCENTAGE); combobox.setWidth(100, Unit.PERCENTAGE); comboLayout.addComponent(combobox); // descriptionLabel descriptionLabel = new Label(""); descriptionLabel.setPrimaryStyleName("switcherItemDescription"); descriptionLabel.addStyleName("descriptionLabel"); comboLayout.addComponent(descriptionLabel); mainLayout.addComponent(comboLayout); mainLayout.setExpandRatio(comboLayout, 1.0f); // forward arrow forward = new Button(""); forward.setPrimaryStyleName(cssSwitcherArrowClassname); forward.addStyleName("icon-arrow2_e"); mainLayout.addComponent(forward); updateButtonState(getValue()); updateItemDescription(); }
layout.addComponent(mapLayout); layout.addComponent(m_toolbarPanel); layout.setExpandRatio(mapLayout, 1); layout.setSizeFull();
edgesListAndButtonLayout.setExpandRatio(m_edgesListSelect, 1.0f); attributesListAndButtonLayout.setExpandRatio(m_attributesListSelect, 1.0f);
horizontalLayout.setExpandRatio(m_cancelButton, 1); horizontalLayout.setComponentAlignment(m_cancelButton, Alignment.TOP_RIGHT);
horizontalLayout.setExpandRatio(cancel, 1); horizontalLayout.setComponentAlignment(cancel, Alignment.TOP_RIGHT);
horizontalLayout.setExpandRatio(m_cancelButton, 1); horizontalLayout.setComponentAlignment(m_cancelButton, Alignment.TOP_RIGHT);