/** * Fires a close event on all registered handlers in the handler manager. If * no such handlers exist, this method will do nothing. * * @param <T> the target type * @param source the source of the handlers * @param target the target */ public static <T> void fire(HasCloseHandlers<T> source, T target) { fire(source, target, false); }
public HandlerRegistration addCloseHandler( CloseHandler<DisclosurePanel> handler) { return addHandler(handler, CloseEvent.getType()); }
public void onClose(CloseEvent<TreeItem> event) { getListener().onTreeItemStateChanged(event.getTarget()); }
public void onClose(CloseEvent<PopupPanel> event) { getListener().onPopupClosed((PopupPanel) event.getSource(), event.isAutoClosed()); } }
public void testImageItems() { // given final String URL_OPEN = "open.png"; final String URL_CLOSE = "close.png"; MaterialTree tree = getWidget(); // when / then tree.clear(); assertEquals(0, tree.getWidgetCount()); MaterialTreeItem item = new MaterialTreeItem(); tree.add(item); assertEquals(1, tree.getWidgetCount()); // Check Open tree.addOpenHandler(openEvent -> openEvent.getTarget().setUrl(URL_OPEN)); OpenEvent.fire(tree, item); assertEquals(URL_OPEN, item.getImage().getUrl()); // Check Close tree.addCloseHandler(closeEvent -> closeEvent.getTarget().setUrl(URL_CLOSE)); CloseEvent.fire(tree, item); assertEquals(URL_CLOSE, item.getImage().getUrl()); } }
public void onClose(CloseEvent<PopupPanel> event) { lastKey = null; lastValue = null; lastIndex = -1; lastColumn = -1; if (lastParent != null && !event.isAutoClosed()) { // Refocus on the containing cell after the user selects a value, but // not if the popup is auto closed. lastParent.focus(); } lastParent = null; } });
/** * Fires a close event on all registered handlers in the handler manager. * * @param <T> the target type * @param source the source of the handlers * @param target the target * @param autoClosed was the target closed automatically */ public static <T> void fire(HasCloseHandlers<T> source, T target, boolean autoClosed) { if (TYPE != null) { CloseEvent<T> event = new CloseEvent<T>(target, autoClosed); source.fireEvent(event); } }
@Override public void onClose(CloseEvent<PopupPanel> rEvent) { if (rEvent.isAutoClosed()) { hideComplexFilterPopup(false); } } });
public void onClose(CloseEvent<PopupPanel> event) { getListener().onPopupClosed((PopupPanel) event.getSource(), event.isAutoClosed()); } }
/** * Fires a close event on all registered handlers in the handler manager. * * @param <T> the target type * @param source the source of the handlers * @param target the target * @param autoClosed was the target closed automatically */ public static <T> void fire(HasCloseHandlers<T> source, T target, boolean autoClosed) { if (TYPE != null) { CloseEvent<T> event = new CloseEvent<T>(target, autoClosed); source.fireEvent(event); } }
static void onClosed() { if (closeHandlersInitialized) { CloseEvent.fire(getHandlers(), null); } }
@Override public HandlerRegistration addCloseHandler(CloseHandler<TreeItem> handler) { return addHandler(handler, CloseEvent.getType()); }
public void onClose(CloseEvent<PopupPanel> popupPanelCloseEvent) { if (popupPanelCloseEvent.isAutoClosed()) { button.setActive(false); } } });
@Override public void onClose(CloseEvent<KSItemLabel> event) { KSItemLabel itemToBeDeleted = event.getTarget(); selectedItems.remove(itemToBeDeleted); removedItems.add(itemToBeDeleted); valuesPanel.remove(itemToBeDeleted); selectionChanged(); } });
public void onClose(CloseEvent<PopupPanel> event) { getListener().onPopupClosed((PopupPanel) event.getSource(), event.isAutoClosed()); } }
/** * Fires a close event on all registered handlers in the handler manager. * * @param <T> the target type * @param source the source of the handlers * @param target the target * @param autoClosed was the target closed automatically */ public static <T> void fire(HasCloseHandlers<T> source, T target, boolean autoClosed) { if (TYPE != null) { CloseEvent<T> event = new CloseEvent<T>(target, autoClosed); source.fireEvent(event); } }
private void fireEvent() { if (isOpen) { OpenEvent.fire(this, this); } else { CloseEvent.fire(this, this); } }
@Override public HandlerRegistration addCloseHandler(CloseHandler<PopupPanel> handler) { return addHandler(handler, CloseEvent.getType()); }
public void onClose(CloseEvent<PopupPanel> popupPanelCloseEvent) { if (popupPanelCloseEvent.isAutoClosed()) { button.setActive(false); } } });
public void onClose(CloseEvent<TreeItem> event) { getListener().onTreeItemStateChanged(event.getTarget()); }