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); }
private void createRootLayout() { m_rootLayout = new VerticalLayout(); m_rootLayout.setSizeFull(); m_rootLayout.addStyleName("root-layout"); setContent(m_rootLayout); addHeader(); addContentLayout(); }
private void createLayouts() { m_rootLayout = new VerticalLayout(); m_rootLayout.setSizeFull(); m_rootLayout.addStyleName("root-layout"); m_rootLayout.addStyleName("topo-root-layout"); setContent(m_rootLayout); addHeader(); addContentLayout(); addNoContentWindow(); }
public StubView(String iconId) { layout.addStyleName("app-stub-view"); layout.setSizeFull(); final Label icon = new Label(); icon.addStyleName("icon"); icon.setSizeUndefined(); icon.addStyleName(iconId); layout.addComponent(icon); layout.setComponentAlignment(icon, Alignment.MIDDLE_CENTER); }
@Override public void refresh() { m_timeslot = 3600; try { m_timeslot = Math.max(1, Integer.parseInt(getDashletSpec().getParameters().get("timeslot"))); } catch (NumberFormatException numberFormatException) { /** * Just ignore */ } m_horizontalLayout.removeAllComponents(); Accordion accordion = new Accordion(); accordion.setSizeFull(); injectDashboardStyles(); Component severity = getComponentSeverity(16); Component uei = getComponentUei(16); VerticalLayout v1 = new VerticalLayout(severity); v1.setSizeFull(); v1.setComponentAlignment(severity, Alignment.MIDDLE_CENTER); v1.setMargin(true); accordion.addTab(v1, "by Severity"); VerticalLayout v2 = new VerticalLayout(uei); v2.setSizeFull(); v2.setComponentAlignment(uei, Alignment.MIDDLE_CENTER); v2.setMargin(true); accordion.addTab(v2, "by Uei"); m_horizontalLayout.addComponent(accordion); }
/** * {@inheritDoc} */ @Override protected void init(VaadinRequest request) { /** * Force the reload of the configuration */ SurveillanceViewProvider.getInstance().load(); /** * Create the basic layout */ VerticalLayout rootLayout = new VerticalLayout(); rootLayout.setSizeFull(); rootLayout.setSpacing(true); rootLayout.addComponent(new SurveillanceViewsConfigList(m_surveillanceViewService)); setContent(rootLayout); }
@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.setSizeFull(); m_rootLayout.addStyleName("root-layout"); setContent(m_rootLayout);
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); } }
m_rootLayout.setSizeFull(); m_rootLayout.addStyleName("root-layout"); setContent(m_rootLayout);
iconLayout.addStyleName("icon-selection-component"); iconLayout.setSpacing(true); iconLayout.setSizeFull(); iconLayout.addComponent(iconSelectionComponent); mainLayout.setSpacing(true); mainLayout.setMargin(true); mainLayout.setSizeFull(); mainLayout.addComponent(iconLayout); mainLayout.addComponent(buttonLayout);
globalTrendLayout.addStyleName("summary"); globalTrendLayout.addStyleName("global"); globalTrendLayout.setSizeFull();
/** * The EventsAlarmsWindow method constructs a sub-window instance which can be added to a * main window. The sub-window contains two embedded browsers which are directed at the Events * and Alarms page of the selected node * @param node Selected node * @throws MalformedURLException */ public EventsAlarmsWindow(final Node node, final URL eventsURL, final URL alarmsURL) { super("Events & Alarms" + makeLabel(node)); eventsBrowser = new Embedded("", new ExternalResource(eventsURL)); eventsBrowser.setSizeFull(); alarmsBrowser = new Embedded("", new ExternalResource(alarmsURL)); alarmsBrowser.setSizeFull(); setResizable(false); /*Adds the two browsers to separate tabs in a tabsheet layout*/ m_tabSheet = new TabSheet(); m_tabSheet.setSizeFull(); m_tabSheet.addTab(eventsBrowser, "Events"); m_tabSheet.addTab(alarmsBrowser, "Alarms"); /*Adds tabsheet component to the main layout of the sub-window*/ VerticalLayout layout = new VerticalLayout(); layout.addComponent(m_tabSheet); layout.setSizeFull(); setContent(layout); }
root.addComponent(table); root.setExpandRatio(table, 1f); root.setSizeFull();
public InfoDialog(String caption, String description) { setCaption(caption); setModal(true); setResizable(false); setClosable(false); setWidth(400, Unit.PIXELS); setHeight(200, Unit.PIXELS); okButton = UIHelper.createButton("ok", null, null, event -> InfoDialog.this.close()); okButton.setId("infoDialog.button.ok"); label.setValue(description); final HorizontalLayout buttonLayout = new HorizontalLayout(okButton); buttonLayout.setSpacing(true); layout.setSpacing(true); layout.setMargin(true); layout.setSizeFull(); layout.addComponent(label); layout.addComponent(buttonLayout); layout.setComponentAlignment(buttonLayout, Alignment.BOTTOM_RIGHT); setContent(layout); center(); }
public ConfirmationDialog(String caption, String description) { setCaption(caption); setModal(true); setResizable(false); setClosable(false); setWidth(400, Unit.PIXELS); setHeight(200, Unit.PIXELS); addCloseListener(this); okButton = UIHelper.createButton("ok", null, null, this); okButton.setId("confirmationDialog.button.ok"); cancelButton = UIHelper.createButton("cancel", "cancels the current action.", null, this); cancelButton.setId("confirmationDialog.button.cancel"); label.setDescription(description); final HorizontalLayout buttonLayout = new HorizontalLayout(okButton, cancelButton); buttonLayout.setSpacing(true); layout.setSpacing(true); layout.setMargin(true); layout.setSizeFull(); layout.addComponent(label); layout.addComponent(buttonLayout); layout.setComponentAlignment(buttonLayout, Alignment.BOTTOM_RIGHT); setContent(layout); center(); }
globalTrendLayout.addStyleName("summary"); globalTrendLayout.addStyleName("global"); globalTrendLayout.setSizeFull();