private void closePopup() { if (popupElement != null) { nifty.closePopup(popupElement.getId()); popupElement = null; } }
public void closePopup() { if (nifty != null) { String id = getId(); if (id != null) { nifty.closePopup(id); } } } }
public void closePopup() { if (nifty != null) { String id = getId(); if (id != null) { nifty.closePopup(id); } } } }
public void close(String command) { closeMessageBox(); nifty.closePopup(messageboxPopup.getParent().getId()); }
@Override public void perform() { if (popup == null || nifty == null) { return; } final Element draggable = getElement(); if (draggable == null) { return; } String popupId = popup.getId(); if (popupId == null) { return; } nifty.closePopup(popupId, new EndNotify() { @Override public void perform() { draggable.reactivate(); popup.markForRemoval(new EndNotify() { @Override public void perform() { popup = null; } }); } }); } };
public void close(String command) { closeMessageBox(); nifty.closePopup(messageboxPopup.getParent().getId()); }
@Override public void perform() { if (popup == null || nifty == null) { return; } final Element draggable = getElement(); if (draggable == null) { return; } String popupId = popup.getId(); if (popupId == null) { return; } nifty.closePopup(popupId, new EndNotify() { @Override public void perform() { draggable.reactivate(); popup.markForRemoval(new EndNotify() { @Override public void perform() { popup = null; } }); } }); } };
private void closeInternal(@Nullable final EndNotify endNotify) { alreadyOpen = false; if (nifty == null || popup == null || screen == null || listBox == null) { return; } String popupId = popup.getId(); final String listBoxId = listBox.getId(); if (popupId == null || listBoxId == null) { return; } nifty.closePopup(popupId, new EndNotify() { @Override public void perform() { // this really feels like a hack but I don't have another idea right now: // // when the popup is closed Nifty will automatically remove all subscribers for all controls in the popup. // this is in general the right behaviour, since the controls are gone (the popup is closed). However in this // case here the listbox is still used by the DropDown. So we need to subscribe our listener again. nifty.subscribe(screen, listBoxId, ListBoxSelectionChangedEvent.class, new DropDownListBoxSelectionChangedEventSubscriber(nifty, screen, listBox, DropDownControl.this, popup)); if (endNotify != null) { endNotify.perform(); } } }); }
private void closeInternal(@Nullable final EndNotify endNotify) { alreadyOpen = false; if (nifty == null || popup == null || screen == null || listBox == null) { return; } String popupId = popup.getId(); final String listBoxId = listBox.getId(); if (popupId == null || listBoxId == null) { return; } nifty.closePopup(popupId, new EndNotify() { @Override public void perform() { // this really feels like a hack but I don't have another idea right now: // // when the popup is closed Nifty will automatically remove all subscribers for all controls in the popup. // this is in general the right behaviour, since the controls are gone (the popup is closed). However in this // case here the listbox is still used by the DropDown. So we need to subscribe our listener again. nifty.subscribe(screen, listBoxId, ListBoxSelectionChangedEvent.class, new DropDownListBoxSelectionChangedEventSubscriber(nifty, screen, listBox, DropDownControl.this, popup)); if (endNotify != null) { endNotify.perform(); } } }); }