/** * Set the visibility of the popup. Does not hide the minimal * representation. * * @param visible */ public void setPopupVisible(boolean visible) { if (isPopupVisible() != visible) { if (visible) { visibleComponent = content.getPopupComponent(); if (visibleComponent == null) { throw new IllegalStateException( "PopupView.Content did not return Component to set visible"); } if (visibleComponent.getParent() != null) { // If the component already has a parent, try to remove it AbstractSingleComponentContainer .removeFromParent(visibleComponent); } visibleComponent.setParent(this); } else { if (equals(visibleComponent.getParent())) { visibleComponent.setParent(null); } visibleComponent = null; } fireEvent(new PopupVisibilityEvent(this)); markAsDirty(); } }
@Override public void popupVisibilityChange(PopupVisibilityEvent event) { if (!event.isPopupVisible()) { if(currentTab != null) { currentTab.applyFilter(); } } } });
/** * Returns the current visibility of the popup. * * @return true if the popup is visible */ public boolean isPopupVisible() { return getPopupView().isPopupVisible(); } }
/** * Get the PopupView instance that is the source of this event. * * @return the source PopupView */ public PopupView getPopupView() { return (PopupView) getSource(); }