Examples of BalloonTipStyle


Examples of net.java.balloontip.styles.BalloonTipStyle

    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);
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.