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(); }
private void createRootLayout() { m_rootLayout = new VerticalLayout(); m_rootLayout.setSizeFull(); m_rootLayout.addStyleName("root-layout"); setContent(m_rootLayout); addHeader(); addContentLayout(); }
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); }
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); } }
/** * Wraps the provided component in order to fit it better in the Info Panel. * E.g. a caption is added to better difference between components. * * @param component The component to wrap. * @param title the title of the component to wrap. * @param id the id of the wrapped component. * @return The wrapped component. */ private Component wrap(Component component, String title, String id) { Label label = new Label(); label.addStyleName("info-panel-item-label"); if (title != null) { label.setValue(title); } VerticalLayout layout = new VerticalLayout(); layout.addStyleName("info-panel-item"); layout.addComponent(label); layout.addComponent(component); layout.setMargin(true); if (id != null) { layout.setId(id); } return layout; }
m_rootLayout.addStyleName("root-layout"); setContent(m_rootLayout); addHeader(request);
globalTrendLayout.addStyleName("summary"); globalTrendLayout.addStyleName("global"); globalTrendLayout.setSizeFull();
m_rootLayout.addStyleName("root-layout"); setContent(m_rootLayout);
globalTrendLayout.addStyleName("summary"); globalTrendLayout.addStyleName("global"); globalTrendLayout.setSizeFull();
iconLayout.addStyleName("icon-selection-component"); iconLayout.setSpacing(true); iconLayout.setSizeFull();