Package com.ibm.icu.text

Examples of com.ibm.icu.text.BreakIterator.first()


        int saved = 0;
        int last = 0;
        int y = bounds.y;
        int width = bounds.width;

        for (int loc = wb.first(); loc != BreakIterator.DONE; loc = wb.next()) {
            String line = text.substring(saved, loc);
            Point extent = gc.textExtent(line);

            if (extent.x > width) {
                // overflow
View Full Code Here


      return;
    ArrayList list = new ArrayList();
    BreakIterator wb = BreakIterator.getLineInstance();
    wb.setText(getText());
    int cursor = 0;
    for (int loc = wb.first(); loc != BreakIterator.DONE; loc = wb.next()) {
      if (loc == 0)
        continue;
      String word = text.substring(cursor, loc);
      Point extent = gc.textExtent(word);
      list.add(new TextFragment((short) loc, (short) extent.x));
View Full Code Here

    wb.setText(text);
    int last = 0;

    int width = 0;

    for (int loc = wb.first(); loc != BreakIterator.DONE; loc = wb.next()) {
      String word = text.substring(last, loc);
      Point extent = gc.textExtent(word);
      width = Math.max(width, extent.x);
      last = loc;
    }
View Full Code Here

    int saved = 0;
    int last = 0;
    int height = lineHeight;
    int maxWidth = 0;

    for (int loc = wb.first(); loc != BreakIterator.DONE; loc = wb.next()) {
      String word = text.substring(saved, loc);
      Point extent = gc.textExtent(word);
      if (extent.x > wHint) {
        // overflow
        saved = last;
View Full Code Here

    int saved = 0;
    int last = 0;
    int y = bounds.y;
    int width = bounds.width;

    for (int loc = wb.first(); loc != BreakIterator.DONE; loc = wb.next()) {
      String line = text.substring(saved, loc);
      Point extent = gc.textExtent(line);

      if (extent.x > width) {
        // overflow
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.