private Panel createPanel(Component content, String caption) { Panel panel = new Panel(); panel.setSizeFull(); panel.setCaption(caption); panel.setContent(content); panel.addStyleName("novscroll"); return panel; } }
@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; }
private void initContentPanel() { contentPanel = new Panel(); contentPanel.setContent(new VerticalLayout()); contentPanel.getContent().setSizeFull(); contentPanel.setSizeFull(); }
/** * 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; }
if (newWidth != null && newWidth.intValue() != getWidth()) { setWidth(newWidth.intValue(), UNITS_PIXELS); if (newHeight != null && newHeight.intValue() != getHeight()) { setHeight(newHeight.intValue(), UNITS_PIXELS); if (newScrollX != null && newScrollX.intValue() != getScrollLeft()) { getState().scrollLeft = newScrollX.intValue(); if (newScrollY != null && newScrollY.intValue() != getScrollTop()) { getState().scrollTop = newScrollY.intValue();
public OrganisaatioSearchPopup(OrganisaatioSearchTree orgSearch,List<String> oids) { orgSearchTree = orgSearch; orgSearchTree.init(); orgSearchTree.reloadWithOids(oids); root = new Panel(); root.setWidth(popupWidth); root.setHeight(popupHeight); root.addComponent(orgSearchTree); }
private void initContentPanel() { contentPanel = new Panel(); contentPanel.setSizeFull(); }
@Override public void openAlert(MessageStyleType type, String title, View body, String okButton, final AlertCallback callback) { final BaseDialog dialog = new LightDialog(); dialog.addStyleName(type.getCssClass()); dialog.addStyleName("alert"); dialog.setCaption(title); CompositeIcon icon = (CompositeIcon) Classes.getClassFactory().newInstance(type.getIconClass()); icon.setStyleName("dialog-icon"); dialog.setHeaderToolbar(icon); dialog.showCloseButton(); dialog.setContent(body.asVaadinComponent()); Panel shortcutPanel = new Panel(); shortcutPanel.setStyleName("shortcut-panel"); shortcutPanel.setHeight(100, Unit.PERCENTAGE); shortcutPanel.setWidth(100, Unit.PERCENTAGE); shortcutPanel.setContent(dialog); final OverlayCloser overlayCloser = openOverlay(new ViewAdapter(shortcutPanel), ModalityLevel.LIGHT); final ShortcutListener escapeShortcut = new ShortcutListener("Escape shortcut", ShortcutAction.KeyCode.ESCAPE, null) { @Override public void handleAction(Object sender, Object target) { callback.onOk(); dialog.closeSelf(); } }; shortcutPanel.addShortcutListener(escapeShortcut); addOkHandler(dialog, okButton, overlayCloser, callback); dialog.addDialogCloseHandler(createCloseHandler(overlayCloser)); }
final Panel tablePanel = new Panel(); tablePanel.setStyleName("table-panel"); tablePanel.setHeight(100.0F, Unit.PERCENTAGE); tablePanel.setContent(table); tablePanel.addActionHandler(getShortCutKeysHandler(i18n)); tablePanel.addStyleName(ValoTheme.PANEL_BORDERLESS); tableHeaderLayout.addComponent(tablePanel); tableHeaderLayout.setComponentAlignment(tablePanel, Alignment.TOP_CENTER);
/** * used wqhen nav tree not required, and split panel also therefore not required */ protected void nonSplitPanel() { if (nonSplitPanel == null) { nonSplitPanel = new Panel(); nonSplitPanel.setSizeFull(); } if (!option.get(optionNavTreeVisible)) { nonSplitPanel.setContent(mainArea); nonSplitPanel.setVisible(true); } else { nonSplitPanel.setVisible(false); } }
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 init() { this.tabsheetPanel = new Panel(); this.tabsheetPanel.addStyleName(ValoTheme.PANEL_BORDERLESS); this.tabsheetPanel.setSizeFull(); super.setSizeFull(); }
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(); }
/** * 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); }
/** * Constructor */ public AbstractDialog() { super(); // defaults setModal(true); setResizable(false); setDraggable(false); setClosable(false); // style name addStyleName("h-dialog"); // build content = new Panel(); content.setWidth("100%"); content.addStyleName(ValoTheme.PANEL_BORDERLESS); content.addStyleName("h-dialog-content"); actions = new HorizontalLayout(); actions.setWidth("100%"); actions.setSpacing(true); actions.addStyleName(ValoTheme.WINDOW_BOTTOM_TOOLBAR); actions.addStyleName("h-dialog-actions"); root = new VerticalLayout(); root.addComponent(content); root.addComponent(actions); setContent(root); }
Panel panel = new Panel(); panel.setCaption(title); panel.setWidth("500px"); VerticalLayout layout = new VerticalLayout(); layout.setMargin(true); panel.setContent(layout); layout.addComponent(new Label(message)); Button okButton = new Button();
private Panel buildContent() { final Panel content = new Panel(); content.setSizeFull(); content.setStyleName("view-content"); return content; }
final Panel panel = new Panel(); panel.setWidth(230, Unit.PIXELS); panel.setCaption("Preview");
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); }
Panel p = new Panel(); p.setStyleName(Reindeer.PANEL_LIGHT); p.setWidth("100%"); p.setHeight("240px"); VerticalLayout layout = (VerticalLayout) p.getContent();