Class PopupWindow

java.lang.Object
docking.widgets.PopupWindow

public class PopupWindow extends Object
A generic window intended to be used as a temporary window to show information. This window is designed to stay open as long as the user mouses over the window. Once the user mouses away, the window will be closed.
  • Constructor Details

    • PopupWindow

      public PopupWindow(JComponent displayComponent)
    • PopupWindow

      public PopupWindow(Component sourceComponent, JComponent displayComponent)
    • PopupWindow

      public PopupWindow(Window parentWindow, JComponent displayComponent)
  • Method Details

    • hideAllWindows

      public static void hideAllWindows()
    • getDisplayComponent

      public JComponent getDisplayComponent()
    • setWindowName

      public void setWindowName(String name)
    • addComponentListener

      public void addComponentListener(ComponentListener listener)
    • isShowing

      public boolean isShowing()
    • hide

      public void hide()
    • dispose

      public void dispose()
    • pack

      public void pack()
    • setCloseWindowDelay

      public void setCloseWindowDelay(int delayInMillis)
      Sets the amount of time that will pass before the popup window is closed after the user moves away from the popup window and out of the neutral zone
      Parameters:
      delayInMillis - the timer delay
    • setPopupPlacer

      public void setPopupPlacer(PopupWindowPlacer popupWindowPlacer)
      Sets the object that decides where to place the popup window.
      Parameters:
      popupWindowPlacer - the placer
    • showOffsetPopup

      public void showOffsetPopup(MouseEvent e, Rectangle keepVisibleArea, boolean forceShow)
    • showPopup

      public void showPopup(MouseEvent e, boolean forceShow)
      Shows this popup window unless popups are disabled as reported by DockingUtils.isTipWindowEnabled(). If forceShow is true, then the popup will be shown regardless of the state returned by DockingUtils.isTipWindowEnabled().
      Parameters:
      e - the event
      forceShow - true to show the popup even popups are disabled application-wide
    • showPopup

      public void showPopup(Component component, Point location, boolean forceShow)
      Shows this popup window unless popups are disabled as reported by DockingUtils.isTipWindowEnabled(). If forceShow is true, then the popup will be shown regardless of the state returned by DockingUtils.isTipWindowEnabled().

      Note: the component passed in is the component to which the location the location belongs. In the example below, the component used to get the location is to the component passed to this method. This is because the location is relative to the parent's coordinate space. Thus, when calling this method, make sure to use the correct component.

       Point location = textField.getLocation(); // this is relative to the text field's parent
       Component parent = textField.getParent();
       PopupWindow.showPopup(parent, location, true);
       
      Parameters:
      component - the component whose coordinate space the location belongs
      location - the location to show the popup
      forceShow - true to show the popup even popups are disabled application-wide
    • showPopup

      public void showPopup(MouseEvent e)
      Shows this popup window unless popups are disabled as reported by DockingUtils.isTipWindowEnabled().
      Parameters:
      e - the event