示例#1
0
  private void reformat() {
    String text = getToolTipText();

    if (text != null && !text.matches("(?i)^<html\\b.*")) {
      int width = getToolTipWidth();
      if (width > 0) {
        text = "<html>" + TextUtil.escapeHTMLChars(TextUtil.format(text, width, false)) + "</html>";

        super.setToolTipText(text);
      }
    }
  }
示例#2
0
 @Override
 public void setToolTipText(String text) {
   super.setToolTipText(text);
   reformat();
 }