Class CalloutWindow

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class CalloutWindow extends JDialog
Window with a callout arrow that can be shown at a specific location on the screen. This class is used to create a custom JDialog with a callout arrow that can point to a specific location on the screen. The callout arrow can be positioned on the north, south, east, or west side of the window.
See Also:
  • Constructor Details

  • Method Details

    • getPadding

      public int getPadding()
    • setPadding

      public void setPadding(int padding)
    • getBorderStrokeWidth

      public int getBorderStrokeWidth()
    • pointAtRect

      public void pointAtRect(int sideOfWindow, Rectangle pointAtRect)
      Sets shape and position of the window on screen. The window will be positioned so that the arrow points at the given rectangle on the specified side of the window. If the window would be off screen, the side of the window will be flipped.
      Parameters:
      sideOfWindow -
      pointAtRect -
    • paint

      public void paint(Graphics g)
      Overrides:
      paint in class Window
    • showCallout

      public static CalloutWindow showCallout(JFrame owner, boolean modal, JComponent content, int sideOfWindow, Point pointAtPos)
    • showCallout

      public static CalloutWindow showCallout(JFrame owner, boolean modal, JComponent content, int sideOfWindow, Rectangle pointAtRect)
    • showNonFocusableCallout

      public static CalloutWindow showNonFocusableCallout(JFrame owner, JComponent content, int sideOfWindow, Point pointAtPos)
    • showNonFocusableCallout

      public static CalloutWindow showNonFocusableCallout(JFrame owner, JComponent content, int sideOfWindow, Rectangle pointAtRect)
    • getRelativeArrowPoint

      public Point getRelativeArrowPoint()