當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。