Class JMultiLineToolTip

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class JMultiLineToolTip extends JToolTip
A multi-line tool tip using simple HTML/BR. Text can be set with br tags to indicate that this task is already done but still needs wrapping within an html element. Likewise, if text starts with <html>, then it is left unchanged. Complex HTML text for JavaScript in particular should be wrapped with an html element so as to bypass the addition of br tags inappropriately.
Author:
hansonr
See Also:
  • Constructor Details

    • JMultiLineToolTip

      public JMultiLineToolTip()
      default constructor for maxChar=40 and bgColor=YELLOW
    • JMultiLineToolTip

      public JMultiLineToolTip(int maxChar, Color bgColor)
      Parameters:
      maxChar - simple character count for width
      bgColor - just for convenience; background color
  • Method Details

    • setTipText

      public void setTipText(String tipText)
      Overrides:
      setTipText in class JToolTip
    • wrapToolTip

      protected String wrapToolTip(String text)
      Wrap the text using a simple maximum between-word character count. Can be overridden.
      Parameters:
      text -
      Returns:
      wrapped text with br tags