private void addContentLayout() { m_layout = new VerticalLayout(); m_layout.setSizeFull(); m_rootLayout.addComponent(m_layout); m_rootLayout.setExpandRatio(m_layout, 1); updateWidgetView(); }
/** * Creates the main window and adds the header, main and button panels to * it. */ private void initMainLayout() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(headerPanel); layout.addComponent(contentPanel); layout.setSizeFull(); // content Panel should use most of the space layout.setExpandRatio(contentPanel, 1); setContent(layout); }
addStyleName("light"); layout.setComponentAlignment(upload, Alignment.TOP_RIGHT); layout.setExpandRatio(mibsTree, 1);
private Layout createContent(final String description) { VerticalLayout content = new VerticalLayout(); content.setWidth(100, Unit.PERCENTAGE); Layout footer = createFooter(); Layout mainArea = createMainArea(description); content.addComponent(mainArea); content.addComponent(footer); content.setExpandRatio(mainArea, 1); return content; }
@Override protected Component initContent() { setImmediate(true); rootLayout.setSizeFull(); rootLayout.setSpacing(true); runButton.addStyleName("commit"); runButton.setCaption(simpleTranslator.translate("rssAggregator.manual.rss.import.all.run")); runButton.addClickListener(createButtonClickListener()); rootLayout.addComponent(runButton); rootLayout.setExpandRatio(runButton, 0); rootLayout.setComponentAlignment(runButton, Alignment.MIDDLE_CENTER); return rootLayout; }
@Override protected Component initContent() { setImmediate(true); rootLayout.setSizeFull(); rootLayout.setSpacing(true); runButton.addStyleName("commit"); runButton.setCaption(simpleTranslator.translate("rssAggregator.manual.rss.import.run")); runButton.addClickListener(createButtonClickListener()); rootLayout.addComponent(runButton); rootLayout.setExpandRatio(runButton, 0); rootLayout.setComponentAlignment(runButton, Alignment.MIDDLE_CENTER); return rootLayout; }
m_rootLayout.setExpandRatio(browser, 1.0f);
public MBeansContentPanel(final MBeansController controller) { this.controller = controller; this.attributesTable = new AttributesTable(controller, controller); emptyLayout = new VerticalLayout(); emptyLayout.setSpacing(true); emptyLayout.setMargin(true); emptyLayout.addComponent(new Label("No MBean or Composite selected. Please select one to modify data.")); nameEditForm = new NameEditForm(controller); captionLabel = new Label(); captionLabel.setContentMode(ContentMode.HTML); VerticalLayout attributeLayout = new VerticalLayout(); attributeLayout.addComponent(captionLabel); attributeLayout.addComponent(attributesTable); attributeLayout.setSizeFull(); attributeLayout.setExpandRatio(attributesTable, 1); contentLayout = new VerticalLayout(); contentLayout.setSpacing(true); contentLayout.setMargin(true); contentLayout.addComponent(nameEditForm); contentLayout.addComponent(attributeLayout); contentLayout.setSizeFull(); contentLayout.setExpandRatio(attributeLayout, 1); // by default we do not show details addComponent(emptyLayout); addComponent(contentLayout); setSizeFull(); // we have to listen for "selection" value changed events controller.registerSelectionValueChangedListener(nameEditForm); controller.registerSelectionValueChangedListener(attributesTable); }
private void addContentLayout() { m_layout = new VerticalLayout(); m_layout.setSizeFull(); // Set expand ratio so that all extra space is allocated to this vertical component m_rootLayout.addComponent(m_layout); m_rootLayout.setExpandRatio(m_layout, 1); m_mapLayout = createMapLayout(); m_mapLayout.setSizeFull(); m_menuBar = new TopologyMenuBar(); m_contextMenu = new TopologyContextMenu(getUI()); updateMenu(); if(m_widgetManager.widgetCount() != 0) { updateWidgetView(m_widgetManager); }else { m_layout.addComponent(m_mapLayout); } // Set expand ratio so that extra space is not allocated to this vertical component if (m_showHeader) { m_rootLayout.addComponent(m_menuBar, 1); } else { m_rootLayout.addComponent(m_menuBar, 0); } }
verticalLayout.setExpandRatio(table, 1.0f);
m_rootLayout.setExpandRatio(pluginManagerUIMainPanel, 1.0f);
public InvalidConfigurationWindow(NodeMapConfiguration nodeMapConfiguration) { setModal(true); setResizable(false); setWidth(500, Unit.PIXELS); setHeight(250, Unit.PIXELS); setCaption("Configuration Error"); final Button btnClose = new Button("OK", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { close(); } }); final String errorMessage = getErrorLabel(nodeMapConfiguration); final Label label = new Label(errorMessage, ContentMode.HTML); VerticalLayout rootLayout = new VerticalLayout(); rootLayout.setSpacing(true); rootLayout.setMargin(true); rootLayout.addComponent(label); rootLayout.addComponent(btnClose); rootLayout.setExpandRatio(label, 1.0f); rootLayout.setComponentAlignment(btnClose, Alignment.BOTTOM_RIGHT); setContent(rootLayout); center(); }
globalTrendLayout.setComponentAlignment(image, Alignment.MIDDLE_CENTER); globalTrendLayout.setExpandRatio(labelTitle, 1.0f);
table.setSizeFull(); root.addComponent(table); root.setExpandRatio(table, 1f); root.setSizeFull();
globalTrendLayout.setComponentAlignment(image, Alignment.MIDDLE_CENTER); globalTrendLayout.setExpandRatio(labelTitle, 1.0f);
layout.addComponent(editor); layout.addComponent(toolbar); layout.setExpandRatio(editor, 1.0f); layout.setComponentAlignment(toolbar, Alignment.BOTTOM_RIGHT); setContent(layout);
rootLayout.addComponent(new Label("<b>Results</b>", ContentMode.HTML)); rootLayout.addComponent(resultArea); rootLayout.setExpandRatio(resultArea, 1.0f);
mainLayout.addComponent(iconLayout); mainLayout.addComponent(buttonLayout); mainLayout.setExpandRatio(iconLayout, 1); mainLayout.setComponentAlignment(buttonLayout, Alignment.BOTTOM_RIGHT);
verticalLayout.setExpandRatio(buttonLayout, 1.0f);
verticalLayout.setSizeFull(); verticalLayout.addComponent(baseFormLayout); verticalLayout.setExpandRatio(baseFormLayout, 1.0f);