List of usage examples for com.google.gwt.event.logical.shared CloseEvent fire
public static <T> void fire(HasCloseHandlers<T> source, T target, boolean autoClosed)
From source file:cc.alcina.framework.gwt.client.widget.dialog.RelativePopupPanel.java
License:Apache License
/** * Hides the popup and detaches it from the page. This has no effect if it * is not currently showing.// www . ja va 2 s .co m * * @param autoClosved * the value that will be passed to * {@link CloseHandler#onClose(CloseEvent)} when the popup is * closed */ public void hide(boolean autoClosed) { if (!isShowing()) { return; } setState(false, true); CloseEvent.fire(this, this, autoClosed); }
From source file:com.lorepo.icplayer.client.module.choice.MyPopupPanel.java
License:Apache License
/** * Hides the popup and detaches it from the page. This has no effect if it is * not currently showing./* w w w . j a va 2s. c o m*/ * * @param autoClosed the value that will be passed to * {@link CloseHandler#onClose(CloseEvent)} when the popup is closed */ public void hide(boolean autoClosed) { if (!isShowing()) { return; } resizeAnimation.setState(false, false); CloseEvent.fire(this, this, autoClosed); }
From source file:cz.incad.kramerius.editor.client.view.AdvancedTabLayoutPanel.java
License:Open Source License
private Widget createCloseTabWidget(final Widget child) { Label closeHandle = new InlineLabel(); closeHandle.setTitle(I18N.closeTabHandleTooltip()); closeHandle.addStyleName("ui-icon ui-icon-close"); closeHandle.addStyleName(this.style.tabCloseButton()); closeHandle.addClickHandler(new ClickHandler() { @Override/*from w w w . j ava 2 s . c om*/ public void onClick(ClickEvent event) { int widgetIndex = delegate.getWidgetIndex(child); CloseEvent.fire(AdvancedTabLayoutPanel.this, widgetIndex, false); } }); return closeHandle; }
From source file:edu.caltech.ipac.firefly.ui.PopupPane.java
public PopupPane(String header, Widget content, PopupType ptype, boolean pointerPopup, boolean modal, boolean autoHide, HeaderType headerType) { cnt++;//from w ww. j a va 2 s. com this.header = header; _ptype = isStyleImplemented(ptype) ? ptype : PopupType.STANDARD; _pointerPopup = pointerPopup; _pointerIm = null; _headerType = headerType; _anStyleName = "ppDrop" + cnt; init(modal, autoHide, headerType); if (content != null) setWidget(content); popup.setAnimationEnabled(true); _masking = modal; if (Application.getInstance().getDefZIndex() > 0) { GwtUtil.setStyle(popup, "zIndex", Application.getInstance().getDefZIndex() + ""); } if (_masking) { _maskPanel = new PopupPanel(false, false); _maskPanel.setAnimationEnabled(false); _maskPanel.setStyleName("firefly-mask-ui"); addZIndexStyle(popup, "onTopDialog"); _maskPanel.setWidget(new Label()); // needed for style to take effect } else { _maskPanel = null; } popup.addCloseHandler(new CloseHandler<PopupPanel>() { public void onClose(CloseEvent<PopupPanel> ev) { CloseEvent.fire(PopupPane.this, PopupPane.this, ev.isAutoClosed()); } }); }
From source file:gwt.material.design.addins.client.cutout.MaterialCutOut.java
License:Apache License
/** * Closes the cut out.// ww w.j a v a 2 s.co m * * @param autoClosed Notifies with the dialog was auto closed or closed by user action */ public void close(boolean autoClosed) { //restore the old overflow of the page Document.get().getDocumentElement().getStyle().setProperty("overflow", viewportOverflow); getElement().getStyle().setDisplay(Display.NONE); getHandlerRegistry().clearHandlers(); // if the component added himself to the document, it must remove // himself too if (autoAddedToDocument) { this.removeFromParent(); autoAddedToDocument = false; } CloseEvent.fire(this, this, autoClosed); }
From source file:gwt.material.design.addins.client.ui.MaterialCutOut.java
License:Apache License
/** * Closes the cut out.// w ww. j av a 2 s . c o m * * @param autoClosed * Notifies with the modal was auto closed or closed by user action */ public void closeCutOut(boolean autoClosed) { //restore the old overflow of the page Document.get().getDocumentElement().getStyle().setProperty("overflow", viewportOverflow); getElement().getStyle().setDisplay(Display.NONE); //remove old handlers to avoid memory leaks if (resizeHandler != null) { resizeHandler.removeHandler(); resizeHandler = null; } if (scrollHandler != null) { scrollHandler.removeHandler(); scrollHandler = null; } // if the component added himself to the document, it must remove // himself too if (autoAddedToDocument) { this.removeFromParent(); autoAddedToDocument = false; } CloseEvent.fire(this, this, autoClosed); }
From source file:gwt.material.design.client.ui.MaterialDialog.java
License:Apache License
protected void onNativeClose(boolean autoClosed, boolean fireEvent) { if (fireEvent) { CloseEvent.fire(this, this, autoClosed); }//from w ww .j a va2s . c o m }
From source file:gwt.material.design.client.ui.MaterialModal.java
License:Apache License
private void onNativeClose(boolean autoClosed) { CloseEvent.fire(this, this, autoClosed); }
From source file:org.cruxframework.crux.smartfaces.client.dialog.PopupPanel.java
License:Apache License
private void doHide(boolean fireEvent, final boolean autoClosed, boolean animated) { if (!isShowing()) { return;/* w w w .ja va 2 s. c om*/ } if (animated && centered) { fixPositionToCenter(); } if (fireEvent) { setState(false, false, animated, new StateChangeCallback() { @Override public void onStateChange() { CloseEvent.fire(PopupPanel.this, PopupPanel.this, autoClosed); } }); } else { setState(false, false, animated, null); } }
From source file:org.uberfire.client.views.pfly.popup.PopupViewImpl.java
License:Apache License
@Override public void show() { modal.show();//from www . ja v a2 s . c o m modal.addHiddenHandler(new ModalHiddenHandler() { @Override public void onHidden(final ModalHiddenEvent hiddenEvent) { CloseEvent.fire(PopupViewImpl.this, PopupViewImpl.this, false); } }); modal.addHideHandler(new ModalHideHandler() { @Override public void onHide(ModalHideEvent evt) { CloseEvent.fire(PopupViewImpl.this, PopupViewImpl.this, false); } }); }