Examples of JRTextMeasurer


Examples of net.sf.jasperreports.engine.fill.JRTextMeasurer

   */
  public static void measureTextElement(JRPrintText printText)//FIXMEHANDLER consider putting in JRTextMeasurerUtil
  {
    String text = printText.getText();
   
    JRTextMeasurer textMeasurer = JRTextMeasurerUtil.createTextMeasurer(printText);//FIXME use element properties?
   
    if (text == null)
    {
      text = "";
    }
    JRStyledText styledText =
      JRStyledTextParser.getInstance().getStyledText(
        JRStyledTextAttributeSelector.NO_BACKCOLOR.getStyledTextAttributes(printText),
        text,
        JRCommonText.MARKUP_STYLED_TEXT.equals(printText.getMarkup()),//FIXMEMARKUP only static styled text appears on preview. no other markup
        JRStyledTextAttributeSelector.getTextLocale(printText)
        );
   
    JRMeasuredText measuredText = textMeasurer.measure(
        styledText,
        0,
        0,
        false
        );
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.