Examples of breakLines()


Examples of util.misc.TextLineBreakerFontWidth.breakLines()

    // A normal line break   
    String text = "Es ging der Stiefel und sein Knecht von Kniggeb\u00fchl "
      + "nach Entenbrecht.";
    StringReader reader = new StringReader(text);
    String[] lineArr = breaker.breakLines(reader, 100, 3);
    assertEquals(lineArr.length, 3);
   
    // A long word break with good breaking chars
    text = "Da ist die Teta-Graphen-Hypernations-Maschine";
    reader = new StringReader(text);
View Full Code Here

Examples of util.misc.TextLineBreakerFontWidth.breakLines()

    assertEquals(lineArr.length, 3);
   
    // A long word break with good breaking chars
    text = "Da ist die Teta-Graphen-Hypernations-Maschine";
    reader = new StringReader(text);
    lineArr = breaker.breakLines(reader, 100, 4);
    assertEquals(lineArr.length, 4);
   
    // A long word break without good breaking chars
    text = "Parabailarlabambaparabailarlabambasenecesitaunacopadicracia";
    reader = new StringReader(text);
View Full Code Here

Examples of util.misc.TextLineBreakerFontWidth.breakLines()

    assertEquals(lineArr.length, 4);
   
    // A long word break without good breaking chars
    text = "Parabailarlabambaparabailarlabambasenecesitaunacopadicracia";
    reader = new StringReader(text);
    lineArr = breaker.breakLines(reader, 100, 4);
    assertEquals(lineArr.length, 4);
   
    // Word break at slash
    text = "Das sind die Varianten Eins/Zwei/Drei/Vier/Fuenf/Sechs/Sieben";
    reader = new StringReader(text);
View Full Code Here

Examples of util.misc.TextLineBreakerFontWidth.breakLines()

    assertEquals(lineArr.length, 4);
   
    // Word break at slash
    text = "Das sind die Varianten Eins/Zwei/Drei/Vier/Fuenf/Sechs/Sieben";
    reader = new StringReader(text);
    lineArr = breaker.breakLines(reader, 100, 4);
    assertEquals(lineArr.length, 4);
    assert(lineArr[1].equals("Varianten Eins/"));
    assert(lineArr[2].equals("Zwei/Drei/Vier/"));
   
    /*
 
View Full Code Here

Examples of util.misc.TextLineBreakerFontWidth.breakLines()

  public void setText(Reader textReader) throws IOException {
    if (textReader == null) {
      mTextLineArr = null;
    } else {
      TextLineBreakerFontWidth breaker = new TextLineBreakerFontWidth(mFont);
      mTextLineArr = breaker.breakLines(textReader, mWidth, mMaxLineCount);
    }
  }
 
 
  // implements Icon
View Full Code Here

Examples of util.misc.TextLineBreakerStringWidth.breakLines()

      TextLineBreakerStringWidth breaker = new TextLineBreakerStringWidth();

      StringBuilder result = new StringBuilder();

      try {
        String[] lines = breaker.breakLines(new StringReader(params[0]), num);

        for (String line : lines) {
          result.append(line);
          result.append('\n');
        }
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.