protected Component createDefaultContent() { return new VerticalLayout(); }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
@Override public Component initContent() { final VerticalLayout layout = new VerticalLayout(); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
public HelpContent(UiState uiState) { Objects.requireNonNull(uiState); if (!uiState.hasUi()) { throw new IllegalArgumentException("The provided uiState " + uiState + " does not have a ui."); } String content = UIHelper.loadContentFromFile(getClass(), String.format("/help/%s.html", uiState.name())); content = content.replaceAll("%title%", uiState.getDescription()); layout = new VerticalLayout(); layout.setMargin(true); layout.setWidth(400, Sizeable.Unit.PIXELS); layout.setSpacing(true); layout.addComponent(new Label(content, ContentMode.HTML)); }
private void addContentLayout() { m_layout = new VerticalLayout(); m_layout.setSizeFull(); m_rootLayout.addComponent(m_layout); m_rootLayout.setExpandRatio(m_layout, 1); updateWidgetView(); }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(step); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(combo); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
private void createRootLayout() { m_rootLayout = new VerticalLayout(); m_rootLayout.setSizeFull(); m_rootLayout.addStyleName("root-layout"); setContent(m_rootLayout); addHeader(); addContentLayout(); }
/** * 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 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; }
/** * The ResourceGraphsWindow method constructs a sub-window instance which can be added to a * main window. The sub-window contains an embedded browser which displays the Resource Graphs * page of the currently selected node * @param node Selected node * @param nodeURL Node URL * @throws MalformedURLException */ public ResourceGraphsWindow(final Node node, final URL nodeURL) { rgBrowser = new Embedded("", new ExternalResource(nodeURL)); String label = node == null? "" : node.getLabel(); /*Sets up window settings*/ if (label == null || label.equals("") || label.equalsIgnoreCase(noLabel)) { label = ""; } else { label = " - " + label; } setCaption("Resource Graphs" + label); setResizable(false); /*Adds the browser component to the main layout*/ VerticalLayout layout = new VerticalLayout(); layout.addComponent(rgBrowser); setContent(layout); }
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(); }
/** * {@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); }
public InfoWindow(final URL embeddedURL, LabelCreator labelCreator) { infoBrowser = new Embedded("", new ExternalResource(embeddedURL)); String label = labelCreator == null ? "" : labelCreator.getLabel(); setCaption(label); setResizable(false); setModal(true); /*Adds the browser to the main layout*/ VerticalLayout layout = new VerticalLayout(); layout.addComponent(infoBrowser); setContent(layout); }
private TabContent(OutputDataKey key) { configTextArea.setSizeFull(); configTextArea.addStyleName("borderless"); descriptionLabel = new Label( UIHelper.loadContentFromFile(getClass(), key.getDescriptionFilename()), ContentMode.HTML); VerticalLayout leftLayout = new VerticalLayout(descriptionLabel); leftLayout.setMargin(true); addComponent(configTextArea); addComponent(leftLayout); setSizeFull(); setLocked(false); setSplitPosition(75, Unit.PERCENTAGE); setCaption(key.getTitle()); }
private void handleLayerButton(GraphContainer graphContainer) { // Toggle layer button boolean enableLayerButton = graphContainer.getTopologyServiceClient().getGraphProviders().size() > 1; layerButton.setEnabled(enableLayerButton); // update the layer layout layerLayout.removeAllComponents(); if (enableLayerButton) { graphContainer.getTopologyServiceClient().getGraphProviders().forEach(topologyProvider -> { boolean selected = topologyProvider.getNamespace().equals(graphContainer.getTopologyServiceClient().getNamespace()); final TopologyProviderInfo topologyProviderInfo = topologyProvider.getTopologyProviderInfo(); final Label nameLabel = new Label(topologyProviderInfo.getName()); VerticalLayout verticalLayout = new VerticalLayout(); verticalLayout.addComponent(nameLabel); verticalLayout.addStyleName(Styles.LAYOUT); if (selected) { verticalLayout.addStyleName(Styles.SELECTED); } verticalLayout.addLayoutClickListener((event) -> graphContainer.selectTopologyProvider(topologyProvider, Callbacks.applyDefaults())); layerLayout.addComponent(verticalLayout); }); } else { setLayerLayoutVisible(false); } }
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); } }