本文整理汇总了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);
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
});
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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