/** * Creates a new empty panel which contains the given content. * * @param content * the content for the panel. */ public Panel(Component content) { registerRpc(rpc); setContent(content); setWidth(100, Unit.PERCENTAGE); getState().tabIndex = -1; }
/** * Set the actual content of the panel. */ public void setDetailContainer(ComponentContainer component) { mainPanel.setContent(component); }
@Override public void showView(View view) { springViewDisplay.setContent((Component) view); } }
private void setContentPanelComponent(Component c) { contentPanel.setContent(c); }
/** * Sets the content.<p> * * @param content the content widget */ public void setContent(Component content) { m_contentPanel.setContent(content); if (content instanceof Layout.MarginHandler) { ((Layout.MarginHandler)content).setMargin(true); } }
/** * Sets the main component.<p> * * @param component the main component */ public void setMainContent(Component component) { component.addStyleName("borderless"); m_main.setContent(component); }
/** * Adds a child category panel.<p> * * @param label the label * @param child the child widget */ public void addChild(String label, CmsAppHierarchyPanel child) { Panel panel = new Panel(); panel.setCaption(label); panel.setContent(child); addComponent(panel); }
@Override public Panel createComponent(VisualizerInput input, VisualizationToggle visToggle) { Panel p = new Panel(); p.setHeight(input.getMappings().getProperty("height", "-1") + "px"); p.setContent(new PDFPanel(input, "-1")); return p; } }
private Panel createPanel(Component content, String caption) { Panel panel = new Panel(); panel.setSizeFull(); panel.setCaption(caption); panel.setContent(content); panel.addStyleName("novscroll"); return panel; } }
protected void setContent(AbstractComponent c) { AbstractComponentContainer x = (AbstractComponentContainer) content.getContent(); if (x == null) { x = new VerticalLayout(); content.setContent(x); } x.removeAllComponents(); x.addComponent(c); }
private void initContentPanel() { contentPanel = new Panel(); contentPanel.setContent(new VerticalLayout()); contentPanel.getContent().setSizeFull(); contentPanel.setSizeFull(); }
@Override public void valueChange(Property.ValueChangeEvent valueChangeEvent) { String newImage = "/opennms/charts?chart-name=" + valueChangeEvent.getProperty().getValue(); Image image = new Image(null, new ExternalResource(newImage)); image.setStyleName("preview"); panel.setContent(image); } });
@Override public com.vaadin.ui.Component getPopupComponent() { Panel popupPanel = new Panel(); popupPanel.addStyleName(ValoTheme.PANEL_BORDERLESS); popupPanel.setHeight("300px"); popupPanel.setWidth("300px"); popupViewLayout.setImmediate(true); popupPanel.setContent(popupViewLayout); popupPanel.setImmediate(true); return popupPanel; }
@Override public void valueChange(Property.ValueChangeEvent valueChangeEvent) { String newImage = "/opennms/charts?chart-name=" + valueChangeEvent.getProperty().getValue(); Image image = new Image(null, new ExternalResource(newImage)); image.setStyleName("preview"); panel.setContent(image); } });
protected void initAddSubTaskPanel(HorizontalLayout headerLayout) { // The add button is placed in a panel, so we can catch 'enter' and 'escape' events addSubTaskPanel = new Panel(); addSubTaskPanel.setContent(new VerticalLayout()); addSubTaskPanel.setSizeUndefined(); addSubTaskPanel.addStyleName(Reindeer.PANEL_LIGHT); addSubTaskPanel.addStyleName("no-border"); headerLayout.addComponent(addSubTaskPanel); initAddSubTaskPanelKeyboardActions(); initAddButton(); }
protected void initInformationPanel() { Panel infoPanel = new Panel(); infoPanel.addStyleName(Reindeer.PANEL_LIGHT); infoPanel.setSizeFull(); profilePanelLayout.addComponent(infoPanel); profilePanelLayout.setExpandRatio(infoPanel, 1.0f); // info panel should take all the remaining width available // All the information sections are put under each other in a vertical layout this.infoPanelLayout = new VerticalLayout(); infoPanel.setContent(infoPanelLayout); initAboutSection(); initContactSection(); }
@Override public void createSection(Accordion compositionRoot, SideBarSectionDescriptor descriptor, Collection<SideBarItemDescriptor> itemDescriptors) { final Panel panel = new Panel(); panel.addStyleName(SIDE_BAR_SECTION_STYLE); panel.setSizeFull(); final VerticalLayout layout = new VerticalLayout(); panel.setContent(layout); for (SideBarItemDescriptor item : itemDescriptors) { layout.addComponent(itemComponentFactory.createItemComponent(item)); } compositionRoot.addTab(panel, descriptor.getCaption()); } }
private Panel wrapToPanel(Component component) { Panel panel = new Panel(component.getCaption()); panel.setSizeFull(); VerticalLayout layout = new VerticalLayout(); layout.setMargin(false); layout.setSpacing(false); layout.setSizeFull(); layout.addComponent(component); panel.setContent(layout); component.setCaption(null); return panel; }
protected void addToCurrent(VaadinFormBuilder builder) { if (!MString.isEmpty(getElement().getTitle())) { panel = new Panel(getElement().getTitle()); panel.setContent(layout); panel.setWidth("100%"); builder.addComposite((LayoutComposite)getElement(), panel); } else super.addToCurrent(builder); }
private void init(CacheManager cacheManager) { VerticalLayout content = new VerticalLayout(); content.addComponent(createTitleBar()); content.addComponent(createCacheGrid(cacheManager)); Panel panel = new Panel(); panel.setSizeFull(); panel.setContent(createCacheCharts(cacheManager)); content.addComponent(panel); setCompositionRoot(content); }