Package java.awt.font

Examples of java.awt.font.LineBreakMeasurer


                    lineBreakTLs = new Vector();
                    for ( int i = 0; i < fileText.length; i++ ) {
                        AttributedString as =
                          new AttributedString( fileText[i], g2.getFont().getAttributes() );

                        LineBreakMeasurer lbm =
                          new LineBreakMeasurer( as.getIterator(), g2.getFontRenderContext() );

                        while ( lbm.getPosition() < fileText[i].length() )
                          lineBreakTLs.add( lbm.nextLayout( (float) w ));

                    }
                }
                if ( !isPrinting )
                  resetScrollbar( verticalBar.getValue() );
View Full Code Here


        AttributedCharacterIterator it = at.getIterator();
        int paragraphStart = it.getBeginIndex();
        int paragraphEnd = it.getEndIndex();

        List<TextElement> lines = new ArrayList<TextElement>();
        LineBreakMeasurer measurer = new LineBreakMeasurer(it, frc);
        measurer.setPosition(paragraphStart);
        while (measurer.getPosition() < paragraphEnd) {
            int startIndex = measurer.getPosition();
            int nextBreak = text.indexOf('\n', measurer.getPosition() + 1);

            boolean prStart = text.charAt(startIndex) == '\n';
            if(prStart) measurer.setPosition(startIndex++);

            RichTextRun rt = run.getRichTextRunAt(startIndex == text.length() ? (startIndex-1) : startIndex);
            if(rt == null) {
                logger.log(POILogger.WARN,  "RichTextRun not found at pos" + startIndex + "; text.length: " + text.length());
                break;
            }

            float wrappingWidth = textWidth - _shape.getMarginLeft() - _shape.getMarginRight();
            int bulletOffset = rt.getBulletOffset();
            int textOffset = rt.getTextOffset();
            int indent = rt.getIndentLevel();

            TextRulerAtom ruler = run.getTextRuler();
            if(ruler != null) {
                int bullet_val = ruler.getBulletOffsets()[indent]*Shape.POINT_DPI/Shape.MASTER_DPI;
                int text_val = ruler.getTextOffsets()[indent]*Shape.POINT_DPI/Shape.MASTER_DPI;
                if(bullet_val > text_val){
                    int a = bullet_val;
                    bullet_val = text_val;
                    text_val = a;
                }
                if(bullet_val != 0 ) bulletOffset = bullet_val;
                if(text_val != 0) textOffset = text_val;
            }

            if(bulletOffset > 0 || prStart || startIndex == 0) wrappingWidth -= textOffset;

            if (_shape.getWordWrap() == TextShape.WrapNone) {
                wrappingWidth = _shape.getSheet().getSlideShow().getPageSize().width;
            }

            TextLayout textLayout = measurer.nextLayout(wrappingWidth + 1,
                    nextBreak == -1 ? paragraphEnd : nextBreak, true);
            if (textLayout == null) {
                textLayout = measurer.nextLayout(textWidth,
                    nextBreak == -1 ? paragraphEnd : nextBreak, false);
            }
            if(textLayout == null){
                logger.log(POILogger.WARN, "Failed to break text into lines: wrappingWidth: "+wrappingWidth+
                        "; text: " + rt.getText());
                measurer.setPosition(rt.getEndIndex());
                continue;
            }
            int endIndex = measurer.getPosition();

            float lineHeight = (float)textLayout.getBounds().getHeight();
            int linespacing = rt.getLineSpacing();
            if(linespacing == 0) linespacing = 100;

View Full Code Here

        AttributedCharacterIterator it = at.getIterator();
        int paragraphStart = it.getBeginIndex();
        int paragraphEnd = it.getEndIndex();

        ArrayList lines = new ArrayList();
        LineBreakMeasurer measurer = new LineBreakMeasurer(it, frc);
        measurer.setPosition(paragraphStart);
        while (measurer.getPosition() < paragraphEnd) {
            int startIndex = measurer.getPosition();
            int nextBreak = text.indexOf('\n', measurer.getPosition() + 1);

            boolean prStart = text.charAt(startIndex) == '\n';
            if(prStart) measurer.setPosition(startIndex++);

            RichTextRun rt = run.getRichTextRunAt(startIndex == text.length() ? (startIndex-1) : startIndex);
            if(rt == null) {
                logger.log(POILogger.WARN,  "RichTextRun not found at pos" + startIndex + "; text.length: " + text.length());
                break;
            }

            float wrappingWidth = textWidth - _shape.getMarginLeft() - _shape.getMarginRight();
            int bulletOffset = rt.getBulletOffset();
            int textOffset = rt.getTextOffset();
            int indent = rt.getIndentLevel();

            TextRulerAtom ruler = run.getTextRuler();
            if(ruler != null) {
                int bullet_val = ruler.getBulletOffsets()[indent]*Shape.POINT_DPI/Shape.MASTER_DPI;
                int text_val = ruler.getTextOffsets()[indent]*Shape.POINT_DPI/Shape.MASTER_DPI;
                if(bullet_val > text_val){
                    int a = bullet_val;
                    bullet_val = text_val;
                    text_val = a;
                }
                if(bullet_val != 0 ) bulletOffset = bullet_val;
                if(text_val != 0) textOffset = text_val;
            }

            if(bulletOffset > 0 || prStart || startIndex == 0) wrappingWidth -= textOffset;

            if (_shape.getWordWrap() == TextShape.WrapNone) {
                wrappingWidth = _shape.getSheet().getSlideShow().getPageSize().width;
            }

            TextLayout textLayout = measurer.nextLayout(wrappingWidth + 1,
                    nextBreak == -1 ? paragraphEnd : nextBreak, true);
            if (textLayout == null) {
                textLayout = measurer.nextLayout(textWidth,
                    nextBreak == -1 ? paragraphEnd : nextBreak, false);
            }
            if(textLayout == null){
                logger.log(POILogger.WARN, "Failed to break text into lines: wrappingWidth: "+wrappingWidth+
                        "; text: " + rt.getText());
                measurer.setPosition(rt.getEndIndex());
                continue;
            }
            int endIndex = measurer.getPosition();

            float lineHeight = (float)textLayout.getBounds().getHeight();
            int linespacing = rt.getLineSpacing();
            if(linespacing == 0) linespacing = 100;

View Full Code Here

               
                if (wordLength > maxLineLength) {
                    // This word by itself is too long to fit on one line so we truncate the word.
               
                    AttributedString attrString = new AttributedString (word);
                    LineBreakMeasurer measurer = new LineBreakMeasurer(attrString.getIterator(), context);
                    int index = measurer.nextOffset(maxLineLength);
               
                    // Add the previous line if there is any
                    if (lineBuffer.length() > 0) {
                        result.add (lineBuffer.toString ());
                        lineBuffer = new StringBuilder ();
View Full Code Here

        AttributedString attributedString = new AttributedString(getText());
        attributedString.addAttribute(TextAttribute.FONT, getFont());
        AttributedCharacterIterator charIterator = attributedString.getIterator();
        FontRenderContext fontContext = g2d.getFontRenderContext();

        LineBreakMeasurer measurer = new LineBreakMeasurer(charIterator, BreakIterator.getWordInstance(Locale.ENGLISH), fontContext);
        lineCount = 0;
        while (measurer.getPosition() < charIterator.getEndIndex()) {
            //TextLayout textLayout = measurer.nextLayout(wrapWidth);
            lineCount++;
            if (lineCount > 2) {
                break;
            }
        }
        charIterator.first();
        // Use char wrap if word wrap would cause more than two lines of text.
        if (lineCount > 2) {
            measurer = new LineBreakMeasurer(charIterator, BreakIterator.getCharacterInstance(Locale.ENGLISH), fontContext);
        } else {
            measurer.setPosition(0);
        }
        while (measurer.getPosition() < charIterator.getEndIndex()) {
            TextLayout textLayout = measurer.nextLayout(wrapWidth);
            float ascent = textLayout.getAscent();
            textY += ascent; // Move down to baseline.

            g2d.setColor(glowColor);
            g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.8f));
View Full Code Here

     * Use a LineBreakMeasurer instance to break our text into lines that fit
     * the imageable area of the page.
     */
    Point2D.Float pen = new Point2D.Float();
    AttributedCharacterIterator charIterator = myStyledText.getIterator();
    LineBreakMeasurer measurer = new LineBreakMeasurer(charIterator,
        graphics2d.getFontRenderContext());
    float wrappingWidth = (float) format.getImageableWidth();
    while (measurer.getPosition() == charIterator.getEndIndex()) {
      TextLayout layout = measurer.nextLayout(wrappingWidth);
      pen.y += layout.getAscent();
      float dx = layout.isLeftToRight() ? 0 : (wrappingWidth - layout
          .getAdvance());
      layout.draw(graphics2d, pen.x + dx, pen.y);
      pen.y += layout.getDescent() + layout.getLeading();
View Full Code Here

        String text = getRenderableText();
        if(text.length() == 0) return _lines;

        AttributedString at = getAttributedString(graphics);
        AttributedCharacterIterator it = at.getIterator();
        LineBreakMeasurer measurer = new LineBreakMeasurer(it, graphics.getFontRenderContext())  ;
        for (;;) {
            int startIndex = measurer.getPosition();

            double wrappingWidth = getWrappingWidth(_lines.size() == 0, graphics) + 1; // add a pixel to compensate rounding errors
            // shape width can be smaller that the sum of insets (this was proved by a test file)
            if(wrappingWidth < 0) wrappingWidth = 1;

            int nextBreak = text.indexOf('\n', startIndex + 1);
            if(nextBreak == -1) nextBreak = it.getEndIndex();

            TextLayout layout = measurer.nextLayout((float)wrappingWidth, nextBreak, true);
            if (layout == null) {
                 // layout can be null if the entire word at the current position
                 // does not fit within the wrapping width. Try with requireNextWord=false.
                 layout = measurer.nextLayout((float)wrappingWidth, nextBreak, false);
            }

            if(layout == null) {
                // exit if can't break any more
                break;
            }

            int endIndex = measurer.getPosition();
            // skip over new line breaks (we paint 'clear' text runs not starting or ending with \n)
            if(endIndex < it.getEndIndex() && text.charAt(endIndex) == '\n'){
                measurer.setPosition(endIndex + 1);
            }

            TextAlign hAlign = getTextAlign();
            if(hAlign == TextAlign.JUSTIFY || hAlign == TextAlign.JUSTIFY_LOW) {
                layout = layout.getJustifiedLayout((float)wrappingWidth);
View Full Code Here

        String text = getRenderableText();
        if(text.length() == 0) return _lines;

        AttributedString at = getAttributedString(graphics);
        AttributedCharacterIterator it = at.getIterator();
        LineBreakMeasurer measurer = new LineBreakMeasurer(it, graphics.getFontRenderContext())  ;
        for (;;) {
            int startIndex = measurer.getPosition();

            double wrappingWidth = getWrappingWidth(_lines.size() == 0, graphics) + 1; // add a pixel to compensate rounding errors
            // shape width can be smaller that the sum of insets (this was proved by a test file)
            if(wrappingWidth < 0) wrappingWidth = 1;

            int nextBreak = text.indexOf('\n', startIndex + 1);
            if(nextBreak == -1) nextBreak = it.getEndIndex();

            TextLayout layout = measurer.nextLayout((float)wrappingWidth, nextBreak, true);
            if (layout == null) {
                 // layout can be null if the entire word at the current position
                 // does not fit within the wrapping width. Try with requireNextWord=false.
                 layout = measurer.nextLayout((float)wrappingWidth, nextBreak, false);
            }

            if(layout == null) {
                // exit if can't break any more
                break;
            }

            int endIndex = measurer.getPosition();
            // skip over new line breaks (we paint 'clear' text runs not starting or ending with \n)
            if(endIndex < it.getEndIndex() && text.charAt(endIndex) == '\n'){
                measurer.setPosition(endIndex + 1);
            }

            TextAlign hAlign = getTextAlign();
            if(hAlign == TextAlign.JUSTIFY || hAlign == TextAlign.JUSTIFY_LOW) {
                layout = layout.getJustifiedLayout((float)wrappingWidth);
View Full Code Here

      } else {
        AttributedString attributedDescription = new AttributedString(
            commandButton.getExtraText());
        attributedDescription.addAttribute(TextAttribute.FONT,
            g.getFont());
        LineBreakMeasurer lineBreakMeasurer = new LineBreakMeasurer(
            attributedDescription.getIterator(),
            ((Graphics2D) g).getFontRenderContext());
        // The max width of the extra text line - need to leave
        // space for the popup arrow icon
        int maxFirstExtraLineWidth = width - x - ins.right - layoutHGap
            - labelHeight;
        int breakIndex = lineBreakMeasurer
            .nextOffset(maxFirstExtraLineWidth);

        TextLayoutInfo extraLineLayoutInfo1 = new TextLayoutInfo();
        extraLineLayoutInfo1.text = commandButton.getExtraText()
            .substring(0, breakIndex);
        extraLineLayoutInfo1.textRect = new Rectangle();

        extraLineLayoutInfo1.textRect.x = x;
        extraLineLayoutInfo1.textRect.y = ins.top + layoutVGap
            + labelHeight;
        extraLineLayoutInfo1.textRect.width = fm
            .stringWidth(extraLineLayoutInfo1.text);
        extraLineLayoutInfo1.textRect.height = labelHeight;

        TextLayoutInfo extraLineLayoutInfo2 = new TextLayoutInfo();
        extraLineLayoutInfo2.text = commandButton.getExtraText()
            .substring(breakIndex);
        extraLineLayoutInfo2.textRect = new Rectangle();

        extraLineLayoutInfo2.textRect.x = x;
        extraLineLayoutInfo2.textRect.y = ins.top + layoutVGap + 2
            * labelHeight;
        extraLineLayoutInfo2.textRect.width = fm
            .stringWidth(extraLineLayoutInfo2.text);
        extraLineLayoutInfo2.textRect.height = labelHeight;

        result.extraTextLayoutInfoList = new ArrayList<TextLayoutInfo>();
        result.extraTextLayoutInfoList.add(extraLineLayoutInfo1);
        result.extraTextLayoutInfoList.add(extraLineLayoutInfo2);
      }

      x += fm.getStringBounds(commandButton.getText(), g).getWidth();
      if (buttonKind == JCommandButton.CommandButtonKind.ACTION_AND_POPUP_MAIN_ACTION) {
        // popup click areas are right aligned
        result.actionClickArea.x = 0;
        result.actionClickArea.y = 0;
        result.actionClickArea.width = width - ins.right - labelHeight;
        result.actionClickArea.height = height;

        result.popupClickArea.x = width - ins.right - labelHeight;
        result.popupClickArea.y = 0;
        result.popupClickArea.width = labelHeight + ins.right;
        result.popupClickArea.height = height;

        result.separatorOrientation = CommandButtonSeparatorOrientation.VERTICAL;
        result.separatorArea = new Rectangle();
        result.separatorArea.x = width - ins.right - labelHeight;
        result.separatorArea.y = 0;
        result.separatorArea.width = new JSeparator(JSeparator.VERTICAL)
            .getPreferredSize().width;
        result.separatorArea.height = height;
        result.isTextInActionArea = true;
      }

      if (FlamingoUtilities.hasPopupAction(commandButton)) {
        result.popupActionRect.x = width - ins.right - labelHeight * 3
            / 4;
        result.popupActionRect.y = (height - labelHeight) / 2 - 1;
        result.popupActionRect.width = 1 + labelHeight / 2;
        result.popupActionRect.height = labelHeight + 2;
      }
    } else {
      int x = commandButton.getWidth() - ins.right;
      // medium icon, 1-line text, 1-line extra text and action arrow
      if (buttonIcon != null) {
        result.iconRect.x = x - buttonIcon.getIconWidth();
        result.iconRect.y = ins.top + layoutVGap;
        result.iconRect.width = buttonIcon.getIconWidth();
        result.iconRect.height = buttonIcon.getIconHeight();

        x -= buttonIcon.getIconWidth();
      }
      if (buttonKind == JCommandButton.CommandButtonKind.ACTION_AND_POPUP_MAIN_POPUP) {
        result.actionClickArea.x = x + layoutHGap;
        result.actionClickArea.y = 0;
        result.actionClickArea.width = width - x - layoutHGap;
        result.actionClickArea.height = height;

        result.popupClickArea.x = 0;
        result.popupClickArea.y = 0;
        result.popupClickArea.width = x + layoutHGap;
        result.popupClickArea.height = height;

        result.separatorOrientation = CommandButtonSeparatorOrientation.VERTICAL;
        result.separatorArea = new Rectangle();
        result.separatorArea.x = x + layoutHGap;
        result.separatorArea.y = 0;
        result.separatorArea.width = new JSeparator(JSeparator.VERTICAL)
            .getPreferredSize().width;
        result.separatorArea.height = height;

        result.isTextInActionArea = false;
      }
      x -= (2 * layoutHGap + jsep.getPreferredSize().width);

      TextLayoutInfo lineLayoutInfo = new TextLayoutInfo();
      lineLayoutInfo.text = commandButton.getText();
      lineLayoutInfo.textRect = new Rectangle();

      lineLayoutInfo.textRect.width = fm.stringWidth(commandButton
          .getText());
      lineLayoutInfo.textRect.x = x - lineLayoutInfo.textRect.width;
      lineLayoutInfo.textRect.y = ins.top + layoutVGap / 2;
      lineLayoutInfo.textRect.height = labelHeight;

      result.textLayoutInfoList = new ArrayList<TextLayoutInfo>();
      result.textLayoutInfoList.add(lineLayoutInfo);

      String extraText = commandButton.getExtraText();
      if ((extraText == null) || (extraText.length() == 0)) {
        lineLayoutInfo.textRect.y = (height - labelHeight) / 2;
      } else {
        AttributedString attributedDescription = new AttributedString(
            commandButton.getExtraText());
        attributedDescription.addAttribute(TextAttribute.FONT,
            g.getFont());
        LineBreakMeasurer lineBreakMeasurer = new LineBreakMeasurer(
            attributedDescription.getIterator(),
            ((Graphics2D) g).getFontRenderContext());
        // The max width of the extra text line - need to leave
        // space for the popup arrow icon
        int maxFirstExtraLineWidth = x - ins.left - layoutHGap
            - labelHeight;
        int breakIndex = lineBreakMeasurer
            .nextOffset(maxFirstExtraLineWidth);

        TextLayoutInfo extraLineLayoutInfo1 = new TextLayoutInfo();
        extraLineLayoutInfo1.text = commandButton.getExtraText()
            .substring(0, breakIndex);
View Full Code Here

      } else {
        AttributedString attributedDescription = new AttributedString(
            commandButton.getExtraText());
        attributedDescription.addAttribute(TextAttribute.FONT, g
            .getFont());
        LineBreakMeasurer lineBreakMeasurer = new LineBreakMeasurer(
            attributedDescription.getIterator(), ((Graphics2D) g)
                .getFontRenderContext());
        // The max width of the extra text line - need to leave
        // space for the popup arrow icon
        int maxFirstExtraLineWidth = width - x - ins.right - layoutHGap
            - labelHeight;
        int breakIndex = lineBreakMeasurer
            .nextOffset(maxFirstExtraLineWidth);

        TextLayoutInfo extraLineLayoutInfo1 = new TextLayoutInfo();
        extraLineLayoutInfo1.text = commandButton.getExtraText()
            .substring(0, breakIndex);
        extraLineLayoutInfo1.textRect = new Rectangle();

        extraLineLayoutInfo1.textRect.x = x;
        extraLineLayoutInfo1.textRect.y = ins.top + layoutVGap
            + labelHeight;
        extraLineLayoutInfo1.textRect.width = fm
            .stringWidth(extraLineLayoutInfo1.text);
        extraLineLayoutInfo1.textRect.height = labelHeight;

        TextLayoutInfo extraLineLayoutInfo2 = new TextLayoutInfo();
        extraLineLayoutInfo2.text = commandButton.getExtraText()
            .substring(breakIndex);
        extraLineLayoutInfo2.textRect = new Rectangle();

        extraLineLayoutInfo2.textRect.x = x;
        extraLineLayoutInfo2.textRect.y = ins.top + layoutVGap + 2
            * labelHeight;
        extraLineLayoutInfo2.textRect.width = fm
            .stringWidth(extraLineLayoutInfo2.text);
        extraLineLayoutInfo2.textRect.height = labelHeight;

        result.extraTextLayoutInfoList = new ArrayList<TextLayoutInfo>();
        result.extraTextLayoutInfoList.add(extraLineLayoutInfo1);
        result.extraTextLayoutInfoList.add(extraLineLayoutInfo2);
      }

      x += fm.getStringBounds(commandButton.getText(), g).getWidth();
      if (buttonKind == JCommandButton.CommandButtonKind.ACTION_AND_POPUP_MAIN_ACTION) {
        // popup click areas are right aligned
        result.actionClickArea.x = 0;
        result.actionClickArea.y = 0;
        result.actionClickArea.width = width - ins.right - labelHeight;
        result.actionClickArea.height = height;

        result.popupClickArea.x = width - ins.right - labelHeight;
        result.popupClickArea.y = 0;
        result.popupClickArea.width = labelHeight + ins.right;
        result.popupClickArea.height = height;

        result.separatorOrientation = CommandButtonSeparatorOrientation.VERTICAL;
        result.separatorArea = new Rectangle();
        result.separatorArea.x = width - ins.right - labelHeight;
        result.separatorArea.y = 0;
        result.separatorArea.width = new JSeparator(JSeparator.VERTICAL)
            .getPreferredSize().width;
        result.separatorArea.height = height;
        result.isTextInActionArea = true;
      }

      if (FlamingoUtilities.hasPopupAction(commandButton)) {
        result.popupActionRect.x = width - ins.right - labelHeight * 3
            / 4;
        result.popupActionRect.y = (height - labelHeight) / 2 - 1;
        result.popupActionRect.width = 1 + labelHeight / 2;
        result.popupActionRect.height = labelHeight + 2;
      }
    } else {
      int x = commandButton.getWidth() - ins.right;
      // medium icon, 1-line text, 1-line extra text and action arrow
      result.iconRect.x = x - buttonIcon.getIconWidth();
      result.iconRect.y = ins.top + layoutVGap;
      result.iconRect.width = buttonIcon.getIconWidth();
      result.iconRect.height = buttonIcon.getIconHeight();

      x -= buttonIcon.getIconWidth();
      if (buttonKind == JCommandButton.CommandButtonKind.ACTION_AND_POPUP_MAIN_POPUP) {
        result.actionClickArea.x = x + layoutHGap;
        result.actionClickArea.y = 0;
        result.actionClickArea.width = width - x - layoutHGap;
        result.actionClickArea.height = height;

        result.popupClickArea.x = 0;
        result.popupClickArea.y = 0;
        result.popupClickArea.width = x + layoutHGap;
        result.popupClickArea.height = height;

        result.separatorOrientation = CommandButtonSeparatorOrientation.VERTICAL;
        result.separatorArea = new Rectangle();
        result.separatorArea.x = x + layoutHGap;
        result.separatorArea.y = 0;
        result.separatorArea.width = new JSeparator(JSeparator.VERTICAL)
            .getPreferredSize().width;
        result.separatorArea.height = height;

        result.isTextInActionArea = false;
      }
      x -= (2 * layoutHGap + jsep.getPreferredSize().width);

      TextLayoutInfo lineLayoutInfo = new TextLayoutInfo();
      lineLayoutInfo.text = commandButton.getText();
      lineLayoutInfo.textRect = new Rectangle();

      lineLayoutInfo.textRect.width = fm.stringWidth(commandButton
          .getText());
      lineLayoutInfo.textRect.x = x - lineLayoutInfo.textRect.width;
      lineLayoutInfo.textRect.y = ins.top + layoutVGap / 2;
      lineLayoutInfo.textRect.height = labelHeight;

      result.textLayoutInfoList = new ArrayList<TextLayoutInfo>();
      result.textLayoutInfoList.add(lineLayoutInfo);

      String extraText = commandButton.getExtraText();
      if ((extraText == null) || (extraText.length() == 0)) {
        lineLayoutInfo.textRect.y = (height - labelHeight) / 2;
      } else {
        AttributedString attributedDescription = new AttributedString(
            commandButton.getExtraText());
        attributedDescription.addAttribute(TextAttribute.FONT, g
            .getFont());
        LineBreakMeasurer lineBreakMeasurer = new LineBreakMeasurer(
            attributedDescription.getIterator(), ((Graphics2D) g)
                .getFontRenderContext());
        // The max width of the extra text line - need to leave
        // space for the popup arrow icon
        int maxFirstExtraLineWidth = x - ins.left - layoutHGap
            - labelHeight;
        int breakIndex = lineBreakMeasurer
            .nextOffset(maxFirstExtraLineWidth);

        TextLayoutInfo extraLineLayoutInfo1 = new TextLayoutInfo();
        extraLineLayoutInfo1.text = commandButton.getExtraText()
            .substring(0, breakIndex);
View Full Code Here

TOP

Related Classes of java.awt.font.LineBreakMeasurer

Copyright © 2018 www.massapicom. 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.