java.lang.Object
com.inductiveautomation.ignition.client.util.gui.popup.PopupHelper

public class PopupHelper extends Object
This class uses a lower-level implementation of Popup than the similar JPopupMenuHelper class does. This can help when popups get nested.
  • Field Details

    • DEFAULT_CLOSE_INSETS

      public static final Insets DEFAULT_CLOSE_INSETS
  • Constructor Details

  • Method Details

    • initializeContentPanel

      protected JComponent initializeContentPanel(JComponent content)
    • setCloseListener

      public void setCloseListener(Runnable closeListener)
      Set a runnable to be called when the popup is closed.
    • getCloseListener

      public Runnable getCloseListener()
    • setTrigger

      public void setTrigger(PopupTrigger trigger)
      Set when the popup is show (for use with bind())
    • getTrigger

      public PopupTrigger getTrigger()
    • setLocation

      public void setLocation(PopupLocation location)
    • getLocation

      public PopupLocation getLocation()
    • isAcceptInputFocus

      public boolean isAcceptInputFocus()
    • setAcceptInputFocus

      public void setAcceptInputFocus(boolean acceptInputFocus)
    • setInvoker

      public void setInvoker(JComponent invoker)
      Set the invoking component. Shouldn't be re-set after the consructor if using the bind() method of controlling the popup. Can be used if doTogglePopup(MouseEvent) is being called directly.
    • bind

      public void bind()
      Adds mouse handling to the invoking component to show the popup. Popup is shown either when the PopupTrigger matches.
    • unbind

      public void unbind()
      Removes the mouse handling added by bind()
    • isShowing

      public boolean isShowing()
    • doTogglePopup

      public void doTogglePopup(MouseEvent e)
      Toggles popup visibility
    • hidePopup

      public void hidePopup()
    • showPopup

      protected void showPopup(MouseEvent e)