Examples of BalloonTip


Examples of net.java.balloontip.BalloonTip

    return result;
  }
 
  public static void UpdateUI(JTextComponent comp, ValidationResult valResult){
    Severity severity = ValidationComponentUtils.getSeverity(comp);
    BalloonTip tip = (BalloonTip) comp.getClientProperty("Balloon");
    if (tip!=null) tip.closeBalloon();
    if (valResult.hasErrors()){
      if (severity!=Severity.ERROR){
        comp.setBackground(ERROR_BACKGROUND);
        ValidationComponentUtils.setSeverity(comp, Severity.ERROR);
      }
      BalloonTipStyle tipStyle = new RoundedBalloonStyle(5,5,ERROR_BACKGROUND, Color.BLACK);
      BalloonTip newTip = new BalloonTip(comp,new JLabel(valResult.getErrors().get(0).formattedText()),tipStyle,
          Orientation.RIGHT_ABOVE, AttachLocation.WEST, 15, 15, false);
      comp.putClientProperty("Balloon", newTip);
      return;
    }
    if (valResult.hasWarnings()){
      if (severity!=Severity.WARNING){
        comp.setBackground(WARNING_BACKGROUND);
        ValidationComponentUtils.setSeverity(comp, Severity.WARNING);
      }
      BalloonTipStyle tipStyle = new RoundedBalloonStyle(5,5,WARNING_BACKGROUND, Color.BLACK);
      BalloonTip newTip = new BalloonTip(comp,new JLabel(valResult.getWarnings().get(0).formattedText()),tipStyle,
          Orientation.RIGHT_ABOVE, AttachLocation.WEST, 15, 15, false);
     
      ToolTipUtils.balloonToToolTip(newTip, 500, 10000);
      comp.putClientProperty("Balloon", newTip);
      return;
View Full Code Here

Examples of net.java.balloontip.BalloonTip

    public static JPanel generateLabelWithHelpBubble(String labelText, String helpBubbleText, int topOffset) {
        JPanel labelContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, HELP_ICON_LEFT_PADDING, topOffset));
        labelContainer.add(new JLabel(labelText));
        JLabel help = new JLabel(helpIcon);
        BalloonTip chunkSizeTip = new BalloonTip(help, helpBubbleText, helpBubbleStyle, false);
        ToolTipUtils.balloonToToolTip(chunkSizeTip, 100, 100000);
        labelContainer.add(help);
        return labelContainer;
    }
View Full Code Here

Examples of net.java.balloontip.BalloonTip

        return labelContainer;
    }

    public static JLabel generateHelpBubble(String helpBubbleText) {
        JLabel help = new JLabel(helpIcon);
        BalloonTip chunkSizeTip = new BalloonTip(help, helpBubbleText, helpBubbleStyle, false);
        ToolTipUtils.balloonToToolTip(chunkSizeTip, 100, 100000);
        return help;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.