java.lang.Object
org.pushingpixels.radiance.component.api.common.popup.PopupPanelManager

public class PopupPanelManager extends Object
Manager for showing and hiding JPopupPanels.
  • Field Details

  • Constructor Details

    • PopupPanelManager

      private PopupPanelManager()
      Private constructor to prevent initialization outside of defaultManager() calls.
  • Method Details

    • defaultManager

      public static PopupPanelManager defaultManager()
      Returns the default popup panel manager.
      Returns:
      a PopupPanelManager object
    • showPopup

      public void showPopup(JComponent popupOriginator, JPopupPanel popupContent, int xOnScreen, int yOnScreen)
      Shows the specified content in a new popup and starts tracking it.
      Parameters:
      popupOriginator - The originator component.
      popupContent - The content of the popup.
    • hideLastPopup

      public void hideLastPopup()
      Hides the last shown popup panel.
    • hidePopups

      public void hidePopups(Component comp)
      Hides all popup panels based on the specified component. We find the first ancestor of the specified component that is a popup panel, and close all popups that were open from that popup panel. If the specified component is null, all popup panels are closed.
      Parameters:
      comp - Component.
    • getShownPath

      public List<PopupPanelManager.PopupInfo> getShownPath()
      Returns all currently shown popup panels.
      Returns:
      All currently shown popup panels.
    • addPopupListener

      public void addPopupListener(PopupPanelManager.PopupListener l)
      Adds the specified popup listener.
      Parameters:
      l - Listener to add.
    • removePopupListener

      public void removePopupListener(PopupPanelManager.PopupListener l)
      Removes the specified popup listener.
      Parameters:
      l - Listener to remove.
    • firePopupShown

      protected void firePopupShown(JPopupPanel panel, JComponent popupOriginator)
      Fires an event on showing the specified popup panel.
      Parameters:
      panel - Popup panel that was shown.
      popupOriginator - The originating component.
    • firePopupHidden

      protected void firePopupHidden(JPopupPanel panel, JComponent popupOriginator)
      Fires an event on hiding the specified popup panel.
      Parameters:
      panel - Popup panel that was hidden.
      popupOriginator - The originating component.