setHeight(newHeight.intValue(), UNITS_PIXELS);
/** * Sets the height of the main panel to 100% to allow for scrollable children.<p> * If not set, the height of the main panel will adjust to it's content.<p> * * @param full <code>true</code> to set the height to 100% */ public void setMainHeightFull(boolean full) { if (full) { m_main.setHeight("100%"); } else { m_main.setHeightUndefined(); } }
/** * @param popupHeight the popupHeight to set */ public void setPopupHeight(String popupHeight) { this.popupHeight = popupHeight; if (root != null) { root.setHeight(popupHeight); } }
@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; } }
@Override public void setHeight(float height, Unit unit) { super.setHeight(height, unit); if (getContent() != null) { if (height < 0) { getContent().setHeight(-1, Unit.PIXELS); } else { getContent().setHeight(100, Unit.PERCENTAGE); } } }
public OrganisaatioSearchPopup(OrganisaatioSearchTree orgSearch) { orgSearchTree = orgSearch; orgSearchTree.init(); orgSearchTree.reload(); root = new Panel(); root.setWidth(popupWidth); root.setHeight(popupHeight); root.addComponent(orgSearchTree); }
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); }
@Override public void addChild(ProcessToolWidget child) { if (!(child instanceof ProcessToolVaadinWidget)) { throw new IllegalArgumentException("child is not instance of " + ProcessToolVaadinWidget.class.getName()); } Component component; ProcessToolVaadinWidget vChild = (ProcessToolVaadinWidget) child; try { component = vChild.render(); } catch (Throwable e) { logger.log(Level.SEVERE, e.getMessage(), e); Panel p = new Panel(); VerticalLayout vl = new VerticalLayout(); vl.addComponent(new Label(getMessage("process.data.widget.exception-occurred"))); vl.addComponent(new Label(e.getMessage())); ByteArrayOutputStream baos = new ByteArrayOutputStream(); e.printStackTrace(new PrintWriter(baos)); vl.addComponent(new Label("<pre>" + baos.toString() + "</pre>", CONTENT_XHTML)); vl.addStyleName("error"); p.addComponent(vl); p.setHeight("150px"); component = p; } ts.addTab(component, getMessage(child.getAttributeValue("caption")), null); if (ts.getSelectedTab() == null) ts.setSelectedTab(component); }
@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; }
protected void addHtmlContent(String html) { Panel panel = new Panel(); panel.setWidth(800, UNITS_PIXELS); panel.setHeight(300, UNITS_PIXELS); content = new Label(html, Label.CONTENT_XHTML); content.setHeight(100, UNITS_PERCENTAGE); panel.addComponent(content); addComponent(panel); }
@Override protected Component getField() { if (field == null) { field = new Panel(); field.setWidth("100%"); field.setHeight("100px"); description = new Label(); description.setContentMode(Label.CONTENT_XHTML); //description.setWidth("100%"); VerticalLayout layout = new VerticalLayout(); layout.addComponent(description); layout.setWidth("100%"); field.setContent(layout); } return field; }
private Panel getInitedWidgetTreePanel() { widgetTree.setContainerDataSource(hierarchicalContainer); widgetTree.setDragMode(Tree.TreeDragMode.NODE); widgetTree.setItemCaptionPropertyId("name"); widgetTree.setDropHandler(new TreeSortDropHandler(widgetTree, hierarchicalContainer)); widgetTree.setWidth("100%"); widgetTree.addShortcutListener(getDeleteShortcutListener()); Panel panel = new Panel(getLocalizedMessage("widget-hierarchy")); panel.setHeight("340px"); panel.setWidth("250px"); panel.addComponent(widgetTree); return panel; }
imagePanel.addStyleName(Reindeer.PANEL_LIGHT); imagePanel.setWidth(100, UNITS_PERCENTAGE); imagePanel.setHeight("100%"); mainLayout.addComponent(imagePanel);
public void doBuild() throws Exception { if (form.getAdapterProvider() == null) form.setAdapterProvider(MApi.lookup(ActivatorAdapterProvider.class, DefaultAdapterProvider.class ) ); if (isShowInformation()) { informationPane = new VaadinUiInformation(); form.setInformationPane(informationPane); addComponent(informationPane); setExpandRatio(informationPane, 0); int h = form.getModel().getInt("showInformationHeight", 0); informationPane.setHeight(h > 0 ? h + "px" : "100px"); informationPane.setWidth("100%"); } if (builder == null) builder = new VaadinFormBuilder(); builder.setForm(form); builder.doBuild(); builder.doRevert(); formPanel = new Panel(); formPanel.setWidth("100%"); formPanel.setHeight("100%"); layout = builder.getLayout(); formPanel.setContent(layout.getComponent()); addComponent(formPanel); setExpandRatio(formPanel, 1); }
@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)); }
shortcutPanel.setHeight(100, Unit.PERCENTAGE); shortcutPanel.setWidth(100, Unit.PERCENTAGE); shortcutPanel.setContent(dialog);
imagePanel.addStyleName(Reindeer.PANEL_LIGHT); imagePanel.setWidth(100, UNITS_PERCENTAGE); imagePanel.setHeight(700, UNITS_PIXELS); HorizontalLayout panelLayout = new HorizontalLayout(); panelLayout.setSizeUndefined();
final Panel tablePanel = new Panel(); tablePanel.setStyleName("table-panel"); tablePanel.setHeight(100.0F, Unit.PERCENTAGE); tablePanel.setContent(table); tablePanel.addActionHandler(getShortCutKeysHandler(i18n));
final Panel tablePanel = new Panel(); tablePanel.setStyleName("table-panel"); tablePanel.setHeight(100.0F, Unit.PERCENTAGE); tablePanel.setContent(table); tablePanel.addActionHandler(getShortCutKeysHandler(i18n));
securityAdministrationPanel.setHeight("100%"); securityAdministrationPanel.setWidth("100%");