Class TipWindow

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer

class TipWindow extends JWindow implements ActionListener
The actual tool tip component.
Version:
1.0
  • Field Details

  • Constructor Details

    • TipWindow

      TipWindow(Window owner, FocusableTip ft, String msg)
      Constructor.
      Parameters:
      owner - The parent window.
      msg - The text of the tool tip. This can be HTML.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • dispose

      public void dispose()
      Disposes of this window.
      Overrides:
      dispose in class Window
    • fixSize

      void fixSize()
      Workaround for JEditorPane not returning its proper preferred size when rendering HTML until after layout already done. See http://forums.sun.com/thread.jspa?forumID=57invalid input: '&threadID'=574810 for a discussion.
    • getReplacementForFlatLafBorder

      private static Border getReplacementForFlatLafBorder(Border border)
      FlatLaf adds insets to tool tips, and for some themes (usually light ones) also uses a line border, whereas for other themes (usually dark ones) there is no line border. We need to ensure our border has no insets so our draggable bottom component looks good, but we'd like to preserve the color of the line border, if any. This method allows us to do so without a compile-time dependency on flatlaf.
      Parameters:
      border - The default tool tip border for the current Look and Feel.
      Returns:
      The border to use for this window.
    • getText

      public String getText()
    • getToolTipBorder

      private static Border getToolTipBorder()
    • isFlatLafBorder

      private static boolean isFlatLafBorder(Border border)
    • setBottomPanel

      private void setBottomPanel()
    • setHyperlinkListener

      public void setHyperlinkListener(HyperlinkListener listener)
      Sets the listener for hyperlink events in this tip window.
      Parameters:
      listener - The new listener. The old listener (if any) is removed. A value of null means "no listener."