当前位置: 首页>>代码示例>>Java>>正文


Java Window.setHeight方法代码示例

本文整理汇总了Java中com.vaadin.ui.Window.setHeight方法的典型用法代码示例。如果您正苦于以下问题:Java Window.setHeight方法的具体用法?Java Window.setHeight怎么用?Java Window.setHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vaadin.ui.Window的用法示例。


在下文中一共展示了Window.setHeight方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: showBadgesInBrowser

import com.vaadin.ui.Window; //导入方法依赖的package包/类
public void showBadgesInBrowser(List<Attendee> attendeeList) {
    if (attendeeList.size() > 0) {
        StreamResource.StreamSource source = handler.getBadgeFormatter(this, attendeeList);
        String filename = "testbadge" + System.currentTimeMillis() + ".pdf";
        StreamResource resource = new StreamResource(source, filename);

        resource.setMIMEType("application/pdf");
        resource.getStream().setParameter("Content-Disposition", "attachment; filename="+filename);

        Window window = new Window();
        window.setWidth(800, Sizeable.Unit.PIXELS);
        window.setHeight(600, Sizeable.Unit.PIXELS);
        window.setModal(true);
        window.center();
        BrowserFrame pdf = new BrowserFrame("test", resource);
        pdf.setSizeFull();

        window.setContent(pdf);
        getUI().addWindow(window);
    } else {
        Notification.show("No attendees selected");
    }
}
 
开发者ID:kumoregdev,项目名称:kumoreg,代码行数:24,代码来源:PrintBadgeWindow.java

示例2: createOldWaySourceWindow

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private Window createOldWaySourceWindow() {
    Window sourceWindow = new Window("Example");
    VerticalLayout content = new VerticalLayout();
    content.setDefaultComponentAlignment(Alignment.MIDDLE_CENTER);
    Label sourceCode = new Label("<pre><code>" + "        final TextArea anotherArea = new TextArea();\n"
            + "        anotherArea.setId(\"clipboardTarget\");\n"
            + "        anotherArea.setValue(\"Another example to copy to clipboard\");\n" + "\n"
            + "        ClipboardButton clipboardButton = new ClipboardButton(\"clipboardTarget\");\n"
            + "        clipboardButton.addSuccessListener(new ClipboardButton.SuccessListener() {\n" + "\n"
            + "            @Override\n" + "            public void onSuccess() {\n"
            + "                Notification.show(\"Copy to clipboard successful\");\n" + "            }\n"
            + "        });\n" + "        clipboardButton.addErrorListener(new ClipboardButton.ErrorListener() {\n"
            + "\n" + "            @Override\n" + "            public void onError() {\n"
            + "                Notification.show(\"Copy to clipboard unsuccessful\", Notification.Type.ERROR_MESSAGE);\n"
            + "            }\n" + "        });</code></pre>", ContentMode.HTML);

    content.addComponent(new HorizontalLayout(sourceCode));
    sourceWindow.setContent(content);
    sourceWindow.setHeight("400px");
    return sourceWindow;
}
 
开发者ID:vaadin4qbanos,项目名称:vaadin-jsclipboard-addon,代码行数:22,代码来源:DeprecatedWayView.java

示例3: init

import com.vaadin.ui.Window; //导入方法依赖的package包/类
@Override
public void init() {
    // エラーハンドリング
    setErrorHandler(new ErrorHandler(this));

    // ログアウト後の画面設定
    String logoutUrl;
    try {
        logoutUrl = new URL(getURL(), "..").toExternalForm();
    } catch (MalformedURLException e) {
        logoutUrl = "../../../";
    }
    setLogoutURL(logoutUrl);

    Window mainWindow = new Window(ViewProperties.getCaption("window.main"));
    mainWindow.setWidth("960px");
    mainWindow.setHeight("100%");
    setTheme("classy");
    setMainWindow(mainWindow);

    MainView mainView = new MainView();
    mainWindow.setContent(mainView);
}
 
开发者ID:primecloud-controller-org,项目名称:primecloud-controller,代码行数:24,代码来源:AutoApplication.java

示例4: showModalWin

import com.vaadin.ui.Window; //导入方法依赖的package包/类
public static void showModalWin(final ExtaEditForm<?> editWin) {

        final Window window = new Window(editWin.getCaption(), editWin);
        window.setClosable(true);
        window.setModal(true);

        if (editWin.getWinHeight() != Sizeable.SIZE_UNDEFINED)
            window.setHeight(editWin.getWinHeight(), editWin.getWinHeightUnit());
        if (editWin.getWinWidth() != Sizeable.SIZE_UNDEFINED)
            window.setWidth(editWin.getWinWidth(), editWin.getWinWidthUnit());

        window.addCloseListener(event -> editWin.fireCloseForm());
        editWin.addCloseFormListener(event -> window.close());

        if (editWin.getWinHeight() != Sizeable.SIZE_UNDEFINED && editWin.getWinWidth() != Sizeable.SIZE_UNDEFINED)
            editWin.addAttachListener(e -> editWin.adjustSize());
        else
            new WinSizeAdjuster(editWin, window);

        UI.getCurrent().addWindow(window);
    }
 
开发者ID:ExtaSoft,项目名称:extacrm,代码行数:22,代码来源:FormUtils.java

示例5: openLogWindow

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void openLogWindow() {
	Window w = new Window("Log");
	w.center();
	w.setWidth("80%");
	w.setHeight("80%");
	w.setContent(logView);
	logView.setSizeFull();
	UI.getCurrent().addWindow(w);
	setEnabled(false);
	w.addCloseListener(new CloseListener() {
		@Override
		public void windowClose(CloseEvent e) {
			ShowLogButton.this.setEnabled(true);
		}
	});
}
 
开发者ID:ahn,项目名称:mideaas,代码行数:17,代码来源:ShowLogButton.java

示例6: getAddonComponent

import com.vaadin.ui.Window; //导入方法依赖的package包/类
@Override
public Component getAddonComponent() {
    Window w = new Window("Medium Editor in window");
    w.setWidth(500, Unit.PIXELS);
    w.setHeight(400, Unit.PIXELS);
    
    
    Panel p = new Panel();
    p.addStyleName(ValoTheme.PANEL_WELL);
    p.setSizeFull();

    MediumEditor editor = new MediumEditor();
    editor.setSizeFull();
    editor.setFocusOutlineEnabled(false);
    editor.setJsLoggingEnabled(true);
    editor.setContent(Lorem.getHtmlParagraphs(3, 5));
    editor.configure(
            editor.options()
            .toolbar()
            .buttons(Buttons.BOLD, Buttons.ITALIC, 
                    Buttons.JUSTIFY_CENTER, 
                    Buttons.ANCHOR)
            .done()
            .autoLink(true)
            .imageDragging(false)
            .done()
            );
    editors.add(editor);
    p.setContent(editor);
    w.setContent(p);

    Button b = new Button("Open Window");
    b.addClickListener(e -> {
        w.setPosition(e.getClientX(), e.getClientY());
        UI.getCurrent().addWindow(w);
    });


    return b; 
}
 
开发者ID:moberwasserlechner,项目名称:vaadin-medium-editor,代码行数:41,代码来源:WindowEditorView.java

示例7: showPopup

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void showPopup(String eintrag) {
	Window modalWin = new Window("E-Mail is being sent...");
	modalWin.setContent(new Label("<div style=\"margin: 10px; \">"
			+ "<h2>Season's greetings</h2>" + "<p>" + eintrag + "</p>"
			+ "</div>", ContentMode.HTML));
	modalWin.setModal(true);
	modalWin.setWidth("400px");
	modalWin.setHeight("250px");
	modalWin.center();
	UI.getCurrent().addWindow(modalWin);
}
 
开发者ID:akquinet,项目名称:vaangular,代码行数:12,代码来源:VaangularUI.java

示例8: addWorkbenchContent

import com.vaadin.ui.Window; //导入方法依赖的package包/类
/**
 * Adds the given component as a tab or window acordingly to current visualizacion settings.
 * @param component component to add.
 * @param caption Tab or Window caption.
 * @param icon Tab or Window icon.
 * @param closable true if the user can close the tab or window.
 * @param confirmClosing true to show a confirmation dialog before closing the tab or window.
 */
public void addWorkbenchContent(Component component, String caption, Resource icon, boolean closable, boolean confirmClosing) {
	component.setSizeFull();
	
	if(windowsMenuItem != null && !windowsMenuItem.isVisible()) {
		VerticalLayout layout = new VerticalLayout();
		layout.setSizeFull();
		layout.setMargin(false);
		layout.addComponent(component);
		
		Window window = new Window(caption);
		window.setIcon(icon);
		window.setClosable(closable);
		window.setContent(layout);
		window.setWidth("80%");
		window.setHeight("80%");
		window.getContent().setSizeFull();
		placeWindow(window);
		
		UI.getCurrent().addWindow(window);
		
	} else {
		Tab tab = tabsheet.addTab(component, caption, icon);
		tab.setClosable(closable);
		tabsheet.setSelectedTab(component);
	}
	
	if(confirmClosing) {
		confirmClosingComponents.add(component);
	}
}
 
开发者ID:alejandro-du,项目名称:enterprise-app,代码行数:39,代码来源:MDIWindow.java

示例9: adjustWindow

import com.vaadin.ui.Window; //导入方法依赖的package包/类
protected void adjustWindow(final ExtaEditForm<?> editWin, final Window window) {
    if (!adjusted) {
        if(formHeight != 0 && wndHeight > formHeight || wndHeight >= brwHeight) {
            if (wndHeight >= brwHeight)
                window.setHeight(100, Sizeable.Unit.PERCENTAGE);
            else
                window.setHeight(wndHeight, Sizeable.Unit.PIXELS);
            editWin.adjustSize();
            adjusted = true;
        }
    }
}
 
开发者ID:ExtaSoft,项目名称:extacrm,代码行数:13,代码来源:FormUtils.java

示例10: showMessage

import com.vaadin.ui.Window; //导入方法依赖的package包/类
public void showMessage(String message,String width, String height,String caption){
   	Label messageLabel=new Label(message);	    		
   	Window window = new Window(caption);
	
	VerticalLayout windowContent = new VerticalLayout();
	windowContent.addComponent(messageLabel);
	windowContent.setMargin(true);
	windowContent.setComponentAlignment(messageLabel, Alignment.MIDDLE_CENTER);
	window.setContent(windowContent);
	window.setWidth(width);
	window.setHeight(height);
	
	window.center();
	UI.getCurrent().addWindow(window);
}
 
开发者ID:alternativeTime,项目名称:GlycanBuilderVaadin7Version,代码行数:16,代码来源:VaadinGlycanCanvas.java

示例11: GridContainerCSVExport

import com.vaadin.ui.Window; //导入方法依赖的package包/类
public GridContainerCSVExport(final String fileName, final Grid grid, final GridHeadingPropertySet<E> headingsSet)
{

	this.grid = grid;
	this.headingsSet = headingsSet;
	final Window window = new Window();
	window.setCaption("Download " + fileName + " CSV data");
	window.center();
	window.setHeight("100");
	window.setWidth("300");
	window.setResizable(false);
	window.setModal(true);

	final HorizontalLayout layout = new HorizontalLayout();
	layout.setSizeFull();
	layout.setMargin(true);

	window.setContent(layout);

	UI.getCurrent().addWindow(window);
	window.setVisible(true);

	final Button downloadButton = createDownloadButton(fileName, window);

	layout.addComponent(downloadButton);
	layout.setComponentAlignment(downloadButton, Alignment.MIDDLE_CENTER);
}
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:28,代码来源:GridContainerCSVExport.java

示例12: ContainerCSVExport

import com.vaadin.ui.Window; //导入方法依赖的package包/类
public ContainerCSVExport(final String fileName, final Table table, final HeadingPropertySet headingsSet)
{

	this.table = table;
	this.headingsSet = headingsSet;
	final Window window = new Window();
	window.setCaption("Download " + fileName + " CSV data");
	window.center();
	window.setHeight("100");
	window.setWidth("300");
	window.setModal(true);

	HorizontalLayout layout = new HorizontalLayout();
	layout.setMargin(true);

	window.setContent(layout);

	UI.getCurrent().addWindow(window);
	window.setVisible(true);

	final Button downloadButton = createDownloadButton(fileName, window);

	layout.addComponent(downloadButton);
	layout.setComponentAlignment(downloadButton, Alignment.MIDDLE_CENTER);

	layout.addComponent(downloadButton);

}
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:29,代码来源:ContainerCSVExport.java

示例13: showTextWindow

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void showTextWindow(String caption, String content) {
	
	Label textComponent = new Label(content);
	textComponent.setContentMode(ContentMode.PREFORMATTED);
	
	Window subWindow = new Window(caption);
	subWindow.setContent(textComponent);
	
	subWindow.setWidth(70, Unit.PERCENTAGE);
	subWindow.setHeight(90, Unit.PERCENTAGE);
	subWindow.center();
	
	this.getUI().addWindow(subWindow);
}
 
开发者ID:chipster,项目名称:chipster,代码行数:15,代码来源:JobLogView.java

示例14: showMailForm

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void showMailForm(final TextField emailField)
{
	final Window mailWindow = new Window("Send Email");
	mailWindow.setWidth("80%");
	mailWindow.setHeight("80%");
	final User sender = (User) getSession().getAttribute("user");
	mailWindow.setContent(new EmailForm(mailWindow, sender, getCurrent(), emailField.getValue()));
	mailWindow.setVisible(true);
	mailWindow.center();
	UI.getCurrent().addWindow(mailWindow);

}
 
开发者ID:bsutton,项目名称:scoutmaster,代码行数:13,代码来源:ContactView.java

示例15: showMailForm

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void showMailForm(EmailContact emailContact)
{
	final Window mailWindow = new Window("Send Email");
	mailWindow.setWidth("80%");
	mailWindow.setHeight("80%");
	final User sender = (User) getSession().getAttribute("user");
	mailWindow.setContent(
			new EmailForm(mailWindow, sender, emailContact.getContact(), emailContact.getContact().getEmail()));
	mailWindow.setVisible(true);
	mailWindow.center();
	UI.getCurrent().addWindow(mailWindow);

}
 
开发者ID:bsutton,项目名称:scoutmaster,代码行数:14,代码来源:SchoolView.java


注:本文中的com.vaadin.ui.Window.setHeight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。