List of usage examples for com.google.gwt.event.logical.shared CloseHandler onClose
void onClose(CloseEvent<T> event);
From source file:gwt.material.design.addins.client.overlay.MaterialOverlay.java
License:Apache License
@Override public HandlerRegistration addCloseHandler(CloseHandler<MaterialOverlay> closeHandler) { return addHandler(new CloseHandler<MaterialOverlay>() { @Override//from w w w .j a v a 2 s. com public void onClose(CloseEvent<MaterialOverlay> closeEvent) { if (isEnabled()) { closeHandler.onClose(closeEvent); } } }, CloseEvent.getType()); }
From source file:gwt.material.design.addins.client.popupmenu.MaterialPopupMenu.java
License:Apache License
@Override public HandlerRegistration addCloseHandler(CloseHandler<MaterialPopupMenu> closeHandler) { return addHandler(new CloseHandler<MaterialPopupMenu>() { @Override//from w w w . j a va 2s. c o m public void onClose(CloseEvent<MaterialPopupMenu> closeEvent) { if (isEnabled()) { closeHandler.onClose(closeEvent); } } }, CloseEvent.getType()); }
From source file:gwt.material.design.addins.client.tree.MaterialTree.java
License:Apache License
@Override public HandlerRegistration addCloseHandler(final CloseHandler<MaterialTreeItem> handler) { return addHandler(new CloseHandler<MaterialTreeItem>() { @Override/*from www .j a v a 2 s . c o m*/ public void onClose(CloseEvent<MaterialTreeItem> event) { if (isEnabled()) { handler.onClose(event); } } }, CloseEvent.getType()); }
From source file:org.cruxframework.crux.core.client.screen.views.View.java
License:Apache License
/** * /* w ww. ja v a 2s. co m*/ * @param event */ protected void fireWindowCloseEvent(CloseEvent<Window> event) { for (int i = 0; i < windowCloseHandlers.size(); i++) { CloseHandler<Window> handler = windowCloseHandlers.get(i); handler.onClose(event); } }
From source file:org.cruxframework.crux.smartfaces.client.dialog.PopupPanel.java
License:Apache License
/** * Creates an empty popup panel, specifying its "auto-hide" and "modal" * properties.//from w w w .j av a 2s .co m * * @param autoHide - <code>true</code> if the popup should be automatically hidden * when the user clicks outside of it or the history token * changes. * @param modal - <code>true</code> if keyboard or mouse events that do not * target the PopupPanel or its children should be ignored */ public PopupPanel(boolean autoHide, boolean modal) { this.autoHide = autoHide; this.autoHideOnHistoryEvents = autoHide; this.modal = modal; if (modal) { glass = Document.get().createDivElement(); glass.setClassName(glassStyleName); } addCloseHandler(new CloseHandler<PopupPanel>() { @Override public void onClose(CloseEvent<PopupPanel> event) { if (defaultCloseHandlers != null) { for (CloseHandler<PopupPanel> closeHandler : defaultCloseHandlers) { closeHandler.onClose(event); } } } }); addOpenHandler(new OpenHandler<PopupPanel>() { @Override public void onOpen(OpenEvent<PopupPanel> event) { if (defaultOpenHandlers != null) { for (OpenHandler<PopupPanel> openHandler : defaultOpenHandlers) { openHandler.onOpen(event); } } } }); containerElement = Document.get().createDivElement().cast(); super.getContainerElement().appendChild(containerElement); getElement().getStyle().setPosition(Position.ABSOLUTE); setPosition(0, 0); setStyleName(getContainerElement(), "faces-popup-content"); }
From source file:org.jboss.errai.workspaces.client.widgets.WSTab.java
License:Apache License
private void notifyCloseHandlers() { WSTabCloseEvent<WSTab> evt = new WSTabCloseEvent<WSTab>(this, false); for (CloseHandler<WSTab> handler : tabCloseHandlers) { handler.onClose(evt); }//from w w w .ja v a 2 s . c o m }