Class BasicPopupPanelUI.PopupPanelEscapeDismisser

java.lang.Object
org.pushingpixels.radiance.component.internal.ui.common.popup.BasicPopupPanelUI.PopupPanelEscapeDismisser
All Implemented Interfaces:
EventListener, PopupPanelManager.PopupListener
Enclosing class:
BasicPopupPanelUI

protected static class BasicPopupPanelUI.PopupPanelEscapeDismisser extends Object implements PopupPanelManager.PopupListener
This class is used to trace the changes in the shown popup panels and install ESC key listener on the matching root pane so that the popup panels can be dismissed with the ESC key.
  • Field Details

    • newActionMap

      private ActionMap newActionMap
      The currently installed action map on the tracedRootPane.
    • newInputMap

      private InputMap newInputMap
      The currently installed input map on the tracedRootPane.
    • lastPathSelected

      The last shown popup panel sequence.
    • tracedRootPane

      private JRootPane tracedRootPane
      Currently traced root pane. It is the root pane of the originating component of the first popup panel in the currently shown sequence of PopupPanelManager.
  • Constructor Details

    • PopupPanelEscapeDismisser

      public PopupPanelEscapeDismisser()
      Creates a new tracer for popup panels to be dismissed with ESC key.
  • Method Details

    • popupHidden

      public void popupHidden(PopupPanelManager.PopupEvent event)
      Description copied from interface: PopupPanelManager.PopupListener
      Fired when a popup panel has been hidden.
      Specified by:
      popupHidden in interface PopupPanelManager.PopupListener
      Parameters:
      event - Popup event.
    • untraceRootPane

      private void untraceRootPane()
      Removes the installed maps on the currently traced root pane.
    • popupShown

      public void popupShown(PopupPanelManager.PopupEvent event)
      Description copied from interface: PopupPanelManager.PopupListener
      Fired when a popup panel has been shown.
      Specified by:
      popupShown in interface PopupPanelManager.PopupListener
      Parameters:
      event - Popup event.
    • traceRootPane

      private void traceRootPane(List<PopupPanelManager.PopupInfo> shownPath)
      Installs the maps on the root pane of the originating component of the first popup panel of the specified sequence to trace the ESC key and dismiss the shown popup panels.
      Parameters:
      shownPath - Popup panel sequence.
    • addUIInputMap

      void addUIInputMap(JComponent c, InputMap map)
      Adds the specified input map to the specified component.
      Parameters:
      c - Component.
      map - Input map to add.
    • addUIActionMap

      void addUIActionMap(JComponent c, ActionMap map)
      Adds the specified action map to the specified component.
      Parameters:
      c - Component.
      map - Action map to add.
    • removeUIInputMap

      void removeUIInputMap(JComponent c, InputMap map)
      Removes the specified input map from the specified component.
      Parameters:
      c - Component.
      map - Input map to remove.
    • removeUIActionMap

      void removeUIActionMap(JComponent c, ActionMap map)
      Removes the specified action map from the specified component.
      Parameters:
      c - Component.
      map - Action map to remove.