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


Java Window.setModal方法代码示例

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


在下文中一共展示了Window.setModal方法的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: getSpellWindow

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void getSpellWindow(Spell spell) {
    Messages messages = Messages.getInstance();
    Window window = new Window(spell.getName());
    window.setModal(true);
    window.setWidth("60%");

    CollectionToStringConverter converter = new CollectionToStringConverter();

    FormLayout layout = new FormLayout();
    DSLabel componentType = new DSLabel(messages.getMessage("spellStep.component.label"),
            converter.convertToPresentation(spell.getComponentTypes(), new ValueContext()));
    DSLabel text = new DSLabel(messages.getMessage("spellStep.description.label"), spell.getDescription());
    layout.addComponents(componentType, text);

    //TODO : other useful info

    window.setContent(layout);
    UI.getCurrent().addWindow(window);
}
 
开发者ID:viydaag,项目名称:dungeonstory-java,代码行数:20,代码来源:SpellChoiceForm.java

示例3: createLayout

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void createLayout() {
    final HorizontalLayout footer = new HorizontalLayout();
    footer.setSizeUndefined();
    footer.addStyleName("confirmation-window-footer");
    footer.setSpacing(true);
    footer.setMargin(false);
    footer.addComponents(closeBtn);
    footer.setComponentAlignment(closeBtn, Alignment.TOP_CENTER);

    final VerticalLayout uploadResultDetails = new VerticalLayout();
    uploadResultDetails.setWidth(SPUIDefinitions.MIN_UPLOAD_CONFIRMATION_POPUP_WIDTH + "px");
    uploadResultDetails.addStyleName("confirmation-popup");
    uploadResultDetails.addComponent(uploadResultTable);
    uploadResultDetails.setComponentAlignment(uploadResultTable, Alignment.MIDDLE_CENTER);
    uploadResultDetails.addComponent(footer);
    uploadResultDetails.setComponentAlignment(footer, Alignment.MIDDLE_CENTER);

    uploadResultsWindow = new Window();
    uploadResultsWindow.setContent(uploadResultDetails);
    uploadResultsWindow.setResizable(Boolean.FALSE);
    uploadResultsWindow.setClosable(Boolean.FALSE);
    uploadResultsWindow.setDraggable(Boolean.TRUE);
    uploadResultsWindow.setModal(true);
    uploadResultsWindow.setCaption(SPUILabelDefinitions.UPLOAD_RESULT);
    uploadResultsWindow.addStyleName(SPUIStyleDefinitions.CONFIRMATION_WINDOW_CAPTION);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:27,代码来源:UploadResultWindow.java

示例4: buildLayout

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void buildLayout() {
    final HorizontalLayout footer = getFooterLayout();

    uploadArtifactDetails = new VerticalLayout();
    uploadArtifactDetails.setWidth(SPUIDefinitions.MIN_UPLOAD_CONFIRMATION_POPUP_WIDTH + "px");
    uploadArtifactDetails.addStyleName("confirmation-popup");
    uploadArtifactDetails.addComponent(uploadDetailsTable);
    uploadArtifactDetails.setComponentAlignment(uploadDetailsTable, Alignment.MIDDLE_CENTER);
    uploadArtifactDetails.addComponent(footer);
    uploadArtifactDetails.setComponentAlignment(footer, Alignment.MIDDLE_CENTER);

    window = new Window();
    window.setContent(uploadArtifactDetails);
    window.setResizable(Boolean.FALSE);
    window.setClosable(Boolean.TRUE);
    window.setDraggable(Boolean.TRUE);
    window.setModal(true);
    window.addCloseListener(event -> onPopupClose());
    window.setCaption(i18n.getMessage("header.caption.upload.details"));
    window.addStyleName(SPUIStyleDefinitions.CONFIRMATION_WINDOW_CAPTION);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:22,代码来源:UploadConfirmationWindow.java

示例5: buildWindow

import com.vaadin.ui.Window; //导入方法依赖的package包/类
/**
 * Build window based on type.
 *
 * @return Window
 */
public Window buildWindow() {
    final Window window = new Window(caption);
    window.setContent(content);
    window.setSizeUndefined();
    window.setModal(true);
    window.setResizable(false);

    decorateWindow(window);

    if (SPUIDefinitions.CREATE_UPDATE_WINDOW.equals(type)) {
        window.setClosable(false);
    }

    return window;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:21,代码来源:WindowBuilder.java

示例6: execute

import com.vaadin.ui.Window; //导入方法依赖的package包/类
@Override
public Undoer execute(List<VertexRef> targets,
        OperationContext operationContext) {
    Window mainWindow = operationContext.getMainWindow();
    CommandManager commandManager = m_commandManager;
    
    Window window = new Window();
    window.setModal(true);
    
    for(Command command : commandManager.getHistoryList()) {
        window.addComponent(new Label(command.toString()));
    }
    
    mainWindow.addWindow(window);
    return null;
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:17,代码来源:HistoryOperation.java

示例7: buttonClick

import com.vaadin.ui.Window; //导入方法依赖的package包/类
@Override
public void buttonClick(ClickEvent event) {
	Button b = event.getButton();
	if (b == btnJobQueueStatus) {
		Window subWindow = new Window("Job Manager");
		subWindow.setWidth("500px");
		subWindow.center();
		getApplication().getMainWindow().addWindow(subWindow);

		Panel p = new Panel(new JobsStatusViewComponent(getApplication().getURL()));
		p.getContent().setWidth("100%");
		p.setWidth("100%");
		subWindow.addComponent(p);
		subWindow.setModal(true);
	} else if (b == help) {
		String HelpURL = getApplication().getURL().toExternalForm() + "doc";
		getApplication().getMainWindow().open(new ExternalResource(HelpURL), "_blank");
	} else if (b == restart) {
		((ExpressZipWindow) getApplication().getMainWindow()).getApplication().close();
	}
}
 
开发者ID:lizardtechblog,项目名称:ExpressZip,代码行数:22,代码来源:MapToolbarViewComponent.java

示例8: 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

示例9: attach

import com.vaadin.ui.Window; //导入方法依赖的package包/类
@Override
public void attach() {

	super.attach();

	loginWindow = new Window();
	
	// create view bound form
	VerticalLayout content = buildMainLayout();
	content.setMargin(false);
	loginWindow.setContent(content);
	loginWindow.center();
	loginWindow.setCaption(getI18N().getMessage("com.thingtrack.konekti.view.web.workbench.SecurityAccessView.loginWindow.caption"));		
	loginWindow.setModal(true);
	loginWindow.setResizable(false);
	loginWindow.setClosable(false);

	User loginUser = new User();
	BeanItem<User> userBean = new BeanItem<User>(loginUser);
	viewBoundForm.setItemDataSource(userBean);
	
	getWindow().addWindow(loginWindow);
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:24,代码来源:SecurityAccessView.java

示例10: showItemWindow

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void showItemWindow() {
    Messages messages = Messages.getInstance();
    Window window = new Window(this.item.getEquipment().getName());
    window.setModal(true);
    window.setWidth("60%");

    FormLayout layout = new FormLayout();
    DSLabel description = new DSLabel("Description", this.item.getEquipment().getDescription());
    layout.addComponents(description);

    //TODO : other useful info

    window.setContent(layout);
    UI.getCurrent().addWindow(window);
}
 
开发者ID:viydaag,项目名称:dungeonstory-java,代码行数:16,代码来源:ShopItem.java

示例11: openInModalPopup

import com.vaadin.ui.Window; //导入方法依赖的package包/类
public Window openInModalPopup() {
    popup = new Window(getModalWindowTitle(), this);
    popup.setModal(true);
    UI.getCurrent().addWindow(popup);
    focusFirst();
    return popup;
}
 
开发者ID:viydaag,项目名称:dungeonstory-java,代码行数:8,代码来源:AbstractForm.java

示例12: showDetails

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void showDetails(Product product) {
    FreemarkerLayout productLayout = new FreemarkerLayout();
    productLayout.setTemplateFileName("templates/product-details.html");
    productLayout.setDataModel(product);
    productLayout.addComponent(new Image(null, new ClassResource(product.getImage())), "image");

    Window window = new Window("Details", productLayout);
    window.setModal(true);
    window.setResizable(false);
    UI.getCurrent().addWindow(window);
}
 
开发者ID:alejandro-du,项目名称:freemarker-layout,代码行数:12,代码来源:ProductsTable.java

示例13: settingsIconClicked

import com.vaadin.ui.Window; //导入方法依赖的package包/类
@Override
protected void settingsIconClicked(final ClickEvent event) {
    final Window addUpdateWindow = createORUpdateDistributionTagLayout.getWindow();
    UI.getCurrent().addWindow(addUpdateWindow);
    addUpdateWindow.setModal(true);
    addUpdateWindow.setVisible(Boolean.TRUE);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:8,代码来源:DistributionTagHeader.java

示例14: showArtifactDetailsWindow

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void showArtifactDetailsWindow(final Long itemId, final String nameVersionStr) {
    final Window artifactDtlsWindow = new Window();
    artifactDtlsWindow.setCaption(HawkbitCommonUtil.getArtifactoryDetailsLabelId(nameVersionStr));
    artifactDtlsWindow.setCaptionAsHtml(true);
    artifactDtlsWindow.setClosable(true);
    artifactDtlsWindow.setResizable(true);
    artifactDtlsWindow.setImmediate(true);
    artifactDtlsWindow.setWindowMode(WindowMode.NORMAL);
    artifactDtlsWindow.setModal(true);
    artifactDtlsWindow.addStyleName(SPUIStyleDefinitions.CONFIRMATION_WINDOW_CAPTION);

    artifactDetailsLayout.setFullWindowMode(false);
    artifactDetailsLayout.populateArtifactDetails(itemId, nameVersionStr);
    /* Now add table to the window */
    artifactDetailsLayout.getArtifactDetailsTable().setWidth(700, Unit.PIXELS);
    artifactDetailsLayout.getArtifactDetailsTable().setHeight(500, Unit.PIXELS);
    artifactDtlsWindow.setContent(artifactDetailsLayout.getArtifactDetailsTable());

    /* Create maximized view of the table */
    artifactDtlsWindow.addWindowModeChangeListener(

            event -> {
                if (event.getWindowMode() == WindowMode.MAXIMIZED) {
                    artifactDtlsWindow.setSizeFull();
                    artifactDetailsLayout.setFullWindowMode(true);
                    artifactDetailsLayout.createMaxArtifactDetailsTable();
                    artifactDetailsLayout.getMaxArtifactDetailsTable().setWidth(100, Unit.PERCENTAGE);
                    artifactDetailsLayout.getMaxArtifactDetailsTable().setHeight(100, Unit.PERCENTAGE);
                    artifactDtlsWindow.setContent(artifactDetailsLayout.getMaxArtifactDetailsTable());
                } else {
                    artifactDtlsWindow.setSizeUndefined();
                    artifactDtlsWindow.setContent(artifactDetailsLayout.getArtifactDetailsTable());
                }
            });
    /* display the window */
    UI.getCurrent().addWindow(artifactDtlsWindow);

}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:39,代码来源:SwModuleTable.java

示例15: 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


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