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


Java CloseEvent类代码示例

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


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

示例1: movePDP

import com.vaadin.ui.Window.CloseEvent; //导入依赖的package包/类
protected void movePDP(final PDP pdp, final PDPGroup currentGroup) {
	List<PDPGroup> currentGroups = this.container.getGroups();
	Set<PDPGroup> otherGroups = new HashSet<PDPGroup>(currentGroups);
	if (otherGroups.remove(currentGroup) == false) {
		logger.warn("Group list inconsistency - failed to move pdp to selected group");
		return;
	}
	final SelectPDPGroupWindow editor = new SelectPDPGroupWindow(otherGroups, "What was this?");
	editor.setCaption("Move PDP to group");
	editor.setModal(true);
	editor.addCloseListener(new CloseListener() {
		private static final long serialVersionUID = 1L;

		@Override
		public void windowClose(CloseEvent event) {
			if (editor.isSaved()) {
				self.container.movePDP((PDP) pdp, editor.selectedGroup());
			}
		}
	});
	editor.center();
	UI.getCurrent().addWindow(editor);
}
 
开发者ID:apache,项目名称:incubator-openaz,代码行数:24,代码来源:PDPManagement.java

示例2: editConfiguration

import com.vaadin.ui.Window.CloseEvent; //导入依赖的package包/类
public static void editConfiguration(final EntityItem<PIPConfiguration> entity) {
	final PIPConfigurationEditorWindow editor = new PIPConfigurationEditorWindow(entity);
	if (entity.isPersistent()) {
		editor.setCaption("Edit PIP Configuration " + entity.getEntity().getName());
	} else {
		editor.setCaption("Create New PIP Configuration");
	}
	editor.setModal(true);
	editor.addCloseListener(new CloseListener() {
		private static final long serialVersionUID = 1L;

		@Override
		public void windowClose(CloseEvent event) {
			if (editor.isSaved()) {
				if (entity.isPersistent() == false) {
					((XacmlAdminUI)UI.getCurrent()).getPIPConfigurations().addEntity(entity.getEntity());
				}
				((XacmlAdminUI)UI.getCurrent()).refreshPIPConfiguration();
			}
		}					
	});
	editor.center();
	UI.getCurrent().addWindow(editor);
}
 
开发者ID:apache,项目名称:incubator-openaz,代码行数:25,代码来源:PIPManagement.java

示例3: createApplication

import com.vaadin.ui.Window.CloseEvent; //导入依赖的package包/类
@Override
public UIApplication<IUnoVaadinApplication> createApplication(final IUnoVaadinApplication application) {
	UIApplication<IUnoVaadinApplication> uiApplication = cacheMap.get(application);
	if (uiApplication == null) {
		uiApplication = delegate.createApplication(application);
		application.getMainWindow().addListener(new CloseListener() {

			private static final long serialVersionUID = 8932963545406877665L;

			@Override
			public void windowClose(CloseEvent e) {
				// TODO Check if this is called when the session expired
				cacheMap.remove(application);
			}

		});
		cacheMap.put(application, uiApplication);
	}
	return uiApplication;
}
 
开发者ID:frincon,项目名称:openeos,代码行数:21,代码来源:CachedApplicationFactoryDecorator.java

示例4: editButtonClick

import com.vaadin.ui.Window.CloseEvent; //导入依赖的package包/类
private void editButtonClick(ClickEvent event) {
    LoadBalancerDto loadBalancer = (LoadBalancerDto) sender.loadBalancerPanel.loadBalancerTable.getValue();

    Window winLoadBalancerEdit;
    if (PCCConstant.PLATFORM_TYPE_CLOUDSTACK.equals(loadBalancer.getLoadBalancer().getType())) {
        winLoadBalancerEdit = new WinCloudStackLoadBalancerEdit(loadBalancer.getLoadBalancer().getLoadBalancerNo());
    } else {
        winLoadBalancerEdit = new WinLoadBalancerEdit(loadBalancer.getLoadBalancer().getLoadBalancerNo());
    }

    winLoadBalancerEdit.addListener(new Window.CloseListener() {
        @Override
        public void windowClose(CloseEvent e) {
            refreshTable();
        }
    });

    getWindow().addWindow(winLoadBalancerEdit);
}
 
开发者ID:primecloud-controller-org,项目名称:primecloud-controller,代码行数:20,代码来源:LoadBalancerButtonsBottom.java

示例5: importFile

import com.vaadin.ui.Window.CloseEvent; //导入依赖的package包/类
private void importFile() throws IllegalArgumentException, IllegalAccessException {
	final UploadViewForm uploadViewForm = new UploadViewForm(null, null);
	
	uploadViewForm.setWidth("300px");
	uploadViewForm.setHeight("-1px");
	uploadViewForm.addListener(new CloseListener() {				
		@Override
		public void windowClose(CloseEvent e) {
			byte[] file = uploadViewForm.getFile();
			
			if(listenerImportButton != null)
				listenerImportButton.importButtonClick(new ClickNavigationEvent(btnImport, file, e.getComponent()));
	    					    		
    			    		
		}
	});
	
	getApplication().getMainWindow().addWindow(uploadViewForm);
	
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:21,代码来源:BoxToolbar.java

示例6: openLogWindow

import com.vaadin.ui.Window.CloseEvent; //导入依赖的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

示例7: buttonClick

import com.vaadin.ui.Window.CloseEvent; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void buttonClick(ClickEvent event) {
	final TableComponent<?> table = getTable();
	VaadinView view = table.getEditorView();
	Object bean = BeanUtils.instantiate(table.getEntityClass());
	view.setModel(bean);
	ViewDialog dialog = table.getGuiFactory().newViewDialog(view);
	dialog.setModal(this.modal);
	dialog.addCloseListener(new CloseListener() {

		public void windowClose(CloseEvent e) {
			table.refresh();
		}
	});
	table.getUI().addWindow(dialog);
}
 
开发者ID:chelu,项目名称:jdal,代码行数:21,代码来源:AddAction.java

示例8: PIPResolverEditorWindow

import com.vaadin.ui.Window.CloseEvent; //导入依赖的package包/类
public static void	editResolver(final EntityItem<PIPResolver> entity) {
	
	final PIPResolverEditorWindow window = new PIPResolverEditorWindow(entity);
	window.setModal(true);
	window.center();
	if (entity.isPersistent()) {
		window.setCaption("Edit Resolver");
	} else {
		window.setCaption("Create Resolver");
	}
	window.addCloseListener(new CloseListener() {
		private static final long serialVersionUID = 1L;

		@Override
		public void windowClose(CloseEvent e) {
			//
			// Did the user click "save"?
			//
			if (window.isSaved() == false) {
				return;
			}
			//
			// Adding a new entity?
			//
			if (entity.isPersistent() == false) {
				//
				// Yes - let's official add it
				//
				((XacmlAdminUI)UI.getCurrent()).getPIPResolvers().addEntity(entity.getEntity());
				((XacmlAdminUI)UI.getCurrent()).refreshPIPConfiguration();
			}
		}
	});
	UI.getCurrent().addWindow(window);
}
 
开发者ID:apache,项目名称:incubator-openaz,代码行数:36,代码来源:PIPResolverComponent.java

示例9: RenamePolicyFileWindow

import com.vaadin.ui.Window.CloseEvent; //导入依赖的package包/类
protected void	renamePolicy(final File policy) {
	//
	// Run the rename window
	//
	final RenamePolicyFileWindow window = new RenamePolicyFileWindow(policy.getName());
	window.setCaption("Rename Policy");
	window.setModal(true);
	window.addCloseListener(new CloseListener() {
		private static final long serialVersionUID = 1L;
		
		@Override
		public void windowClose(CloseEvent event) {
			String newFilename = window.getNewFilename();
			if (newFilename == null) {
				//
				// User cancelled
				//
				return;
			}
			Path newPolicy = Paths.get(policy.getParent(), newFilename);
			if (Files.exists(newPolicy)) {
				Notification.show("Cannot rename to an existing file", Notification.Type.ERROR_MESSAGE);
				return;
			}
			try {
				if (policy.renameTo(newPolicy.toFile()) == false) {
					throw new Exception("No known error, rename failed");
				}
				self.treeContainer.updateItem(newPolicy.getParent().toFile());
			} catch (Exception e) {
				Notification.show("Failed to rename file: " + e.getLocalizedMessage());
			}
		}
	});
	window.center();
	UI.getCurrent().addWindow(window);
}
 
开发者ID:apache,项目名称:incubator-openaz,代码行数:38,代码来源:PolicyWorkspace.java

示例10: showCloudEditWindow

import com.vaadin.ui.Window.CloseEvent; //导入依赖的package包/类
public void showCloudEditWindow() {
    MyCloudManage window = new MyCloudManage();
    window.addListener(new CloseListener() {
        @Override
        public void windowClose(CloseEvent e) {
            sender.initialize();
            sender.refresh();
        }
    });
    getApplication().getMainWindow().addWindow(window);
}
 
开发者ID:primecloud-controller-org,项目名称:primecloud-controller,代码行数:12,代码来源:TopBar.java

示例11: addButtonClick

import com.vaadin.ui.Window.CloseEvent; //导入依赖的package包/类
private void addButtonClick(ClickEvent event) {
    WinServiceAdd winServiceAdd = new WinServiceAdd();
    winServiceAdd.addListener(new Window.CloseListener() {
        @Override
        public void windowClose(CloseEvent e) {
            refreshTable();
        }
    });

    getWindow().addWindow(winServiceAdd);
}
 
开发者ID:primecloud-controller-org,项目名称:primecloud-controller,代码行数:12,代码来源:ServiceButtonsBottom.java

示例12: editButtonClick

import com.vaadin.ui.Window.CloseEvent; //导入依赖的package包/类
private void editButtonClick(Button.ClickEvent event) {
    ComponentDto component = (ComponentDto) sender.servicePanel.serviceTable.getValue();

    WinServiceEdit winServiceEdit = new WinServiceEdit(component.getComponent().getComponentNo());
    winServiceEdit.addListener(new Window.CloseListener() {
        @Override
        public void windowClose(CloseEvent e) {
            refreshTable();
        }
    });

    getWindow().addWindow(winServiceEdit);
}
 
开发者ID:primecloud-controller-org,项目名称:primecloud-controller,代码行数:14,代码来源:ServiceButtonsBottom.java

示例13: addButtonClick

import com.vaadin.ui.Window.CloseEvent; //导入依赖的package包/类
private void addButtonClick(ClickEvent event) {
    WinServerAdd winServerAdd = new WinServerAdd();
    winServerAdd.addListener(new Window.CloseListener() {
        @Override
        public void windowClose(CloseEvent e) {
            refreshTable();
        }
    });

    getWindow().addWindow(winServerAdd);
}
 
开发者ID:primecloud-controller-org,项目名称:primecloud-controller,代码行数:12,代码来源:ServerButtonsBottom.java

示例14: editButtonClick

import com.vaadin.ui.Window.CloseEvent; //导入依赖的package包/类
private void editButtonClick(Button.ClickEvent event) {
    InstanceDto instance = (InstanceDto) sender.serverPanel.serverTable.getValue();

    WinServerEdit winServerEdit = new WinServerEdit(instance.getInstance().getInstanceNo());
    winServerEdit.addListener(new Window.CloseListener() {
        @Override
        public void windowClose(CloseEvent e) {
            refreshTable();
        }
    });

    getWindow().addWindow(winServerEdit);
}
 
开发者ID:primecloud-controller-org,项目名称:primecloud-controller,代码行数:14,代码来源:ServerButtonsBottom.java

示例15: addButtonClick

import com.vaadin.ui.Window.CloseEvent; //导入依赖的package包/类
private void addButtonClick(ClickEvent event) {
    WinLoadBalancerAdd winLoadBalancerAdd = new WinLoadBalancerAdd();
    winLoadBalancerAdd.addListener(new Window.CloseListener() {
        @Override
        public void windowClose(CloseEvent e) {
            refreshTable();
        }
    });

    getWindow().addWindow(winLoadBalancerAdd);
}
 
开发者ID:primecloud-controller-org,项目名称:primecloud-controller,代码行数:12,代码来源:LoadBalancerButtonsBottom.java


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