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


Java Window.setCaption方法代码示例

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


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

示例1: addEntity

import com.vaadin.ui.Window; //导入方法依赖的package包/类
protected void addEntity(String input) {

        ET newInstance = instantiator.apply(input);

        if (newInstanceForm != null) {
            String caption = "Add new " + elementType.getSimpleName();
            newInstanceForm.setEntity(newInstance);
            newInstanceForm.setSavedHandler(this);
            newInstanceForm.setResetHandler(this);
            Window w = newInstanceForm.openInModalPopup();
            w.setWidth("70%");
            w.setCaption(caption);
        } else {
            onSave(newInstance);
        }
    }
 
开发者ID:viydaag,项目名称:dungeonstory-java,代码行数:17,代码来源:SubSetSelector.java

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

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

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

示例5: zipProject

import com.vaadin.ui.Window; //导入方法依赖的package包/类
/**
 * Zips project.
 *
 * @param projectName the name of the project to be zipped
 */
protected void zipProject() {
	try {
		File zipFile = File.createTempFile("mideaas-"+project.getName(), ".zip");
		
		zipProjectToFile(zipFile, settings);
		FileResource zip = new FileResource(zipFile);
		FileDownloader fd = new FileDownloader(zip);
		Button downloadButton = new Button("Download project");
		fd.extend(downloadButton);

		//filedonwnloader can not be connected to menuitem :( So I connected it to popupwindow :)
		Window zipButtonWindow = new Window();
		zipButtonWindow.setCaption("Zip and download project");
		zipButtonWindow.setWidth(200, Unit.PIXELS);
		zipButtonWindow.setContent(downloadButton);
		UI.getCurrent().addWindow(zipButtonWindow);
	} catch (IOException e) {
		e.printStackTrace();
		Notification.show("Error: " + e.getMessage(), Notification.Type.ERROR_MESSAGE);
	}

}
 
开发者ID:ahn,项目名称:mideaas,代码行数:28,代码来源:ZipPlugin.java

示例6: addNewItem

import com.vaadin.ui.Window; //导入方法依赖的package包/类
@Override
protected void addNewItem(final ClickEvent event) {
    targetAddUpdateWindow.resetComponents();
    final Window addTargetWindow = targetAddUpdateWindow.createNewWindow();
    addTargetWindow.setCaption(i18n.getMessage(UIComponentIdProvider.TARGET_ADD_CAPTION));
    UI.getCurrent().addWindow(addTargetWindow);
    addTargetWindow.setVisible(Boolean.TRUE);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:9,代码来源:TargetTableHeader.java

示例7: openWindow

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void openWindow() {
    final Window targetWindow = targetAddUpdateWindowLayout.getWindow(getSelectedBaseEntity().getControllerId());
    if (targetWindow == null) {
        return;
    }
    targetWindow.setCaption(getI18n().getMessage(UIComponentIdProvider.TARGET_UPDATE_CAPTION));
    UI.getCurrent().addWindow(targetWindow);
    targetWindow.setVisible(Boolean.TRUE);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:10,代码来源:TargetDetails.java

示例8: addNewItem

import com.vaadin.ui.Window; //导入方法依赖的package包/类
@Override
protected void addNewItem(final ClickEvent event) {
    final Window newDistWindow = addUpdateWindowLayout.getWindow(null);
    newDistWindow.setCaption(i18n.getMessage(UIComponentIdProvider.DIST_ADD_CAPTION));
    UI.getCurrent().addWindow(newDistWindow);
    newDistWindow.setVisible(Boolean.TRUE);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:8,代码来源:DistributionSetTableHeader.java

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

示例10: onEdit

import com.vaadin.ui.Window; //导入方法依赖的package包/类
@Override
protected void onEdit(final ClickEvent event) {
    final Window addSoftwareModule = softwareModuleAddUpdateWindow
            .createUpdateSoftwareModuleWindow(getSelectedBaseEntityId());
    addSoftwareModule.setCaption(getI18n().getMessage("upload.caption.update.swmodule"));
    UI.getCurrent().addWindow(addSoftwareModule);
    addSoftwareModule.setVisible(Boolean.TRUE);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:9,代码来源:AbstractSoftwareModuleDetails.java

示例11: onEdit

import com.vaadin.ui.Window; //导入方法依赖的package包/类
@Override
protected void onEdit(final ClickEvent event) {
    final Window newDistWindow = distributionAddUpdateWindowLayout.getWindow(getSelectedBaseEntityId());
    newDistWindow.setCaption(getI18n().getMessage(UIComponentIdProvider.DIST_UPDATE_CAPTION));
    UI.getCurrent().addWindow(newDistWindow);
    newDistWindow.setVisible(Boolean.TRUE);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:8,代码来源:AbstractDistributionSetDetails.java

示例12: addNewItem

import com.vaadin.ui.Window; //导入方法依赖的package包/类
@Override
protected void addNewItem(final ClickEvent event) {
    final Window addSoftwareModule = softwareModuleAddUpdateWindow.createAddSoftwareModuleWindow();
    addSoftwareModule.setCaption(i18n.getMessage("upload.caption.add.new.swmodule"));
    UI.getCurrent().addWindow(addSoftwareModule);
    addSoftwareModule.setVisible(Boolean.TRUE);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:8,代码来源:AbstractSoftwareModuleTableHeader.java

示例13: openTestWindow

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void openTestWindow() {
    Window testWindow = new Window();
    DemoOverlayTest test = new DemoOverlayTest();
    test.setSuggestionProvider(suggestionProvider);
    testWindow.setContent(test);
    testWindow.setCaption("Window Demo");
    testWindow.center();
    getUI().addWindow(testWindow);
}
 
开发者ID:maxschuster,项目名称:Vaadin-AutocompleteTextField,代码行数:10,代码来源:DemoUI.java

示例14: addEntity

import com.vaadin.ui.Window; //导入方法依赖的package包/类
protected void addEntity(String stringInput) {
    final ET newInstance = instantiateOption(stringInput);

    if (newInstanceForm != null) {
        String caption = "Add new " + elementType.getSimpleName();
        newInstanceForm.setEntity(newInstance);
        newInstanceForm.setSavedHandler(this);
        newInstanceForm.setResetHandler(this);
        Window w = newInstanceForm.openInModalPopup();
        w.setWidth("70%");
        w.setCaption(caption);
    } else {
        onSave(newInstance);
    }
}
 
开发者ID:viritin,项目名称:viritin,代码行数:16,代码来源:SubSetSelector.java

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


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