util.misc

## Class TextLineBreakerStringWidth

- java.lang.Object
- - util.misc.TextLineBreakerStringWidth

- Direct Known Subclasses:
    TextLineBreakerFontWidth

      public class TextLineBreakerStringWidth
      extends java.lang.Object

  Breaks a text into lines.
  Author:
    Til Schneider, www.murfman.de

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ELLIPSIS` ellipsis used for shortened titles and descriptions unicode character representing "..."

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TextLineBreakerStringWidth()` Create the LineBreaker

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String[]` | `breakLines(java.io.Reader textReader, int width)` Break a Text into separate Lines
    `java.lang.String[]` | `breakLines(java.io.Reader textReader, int width, int maxLines)` Break a Text into separate Lines
    `int` | `getStringWidth(java.lang.String str)` Get the Width of a String
    `static void` | `resetHyphenator()` to be used by Settings.handleChangedSettings()
    `void` | `setMinusWidth(int minusWidth)` Set the Width of a Minus Character
    `void` | `setSpaceWidth(int spaceWidth)` Set the Width of a Space Character

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ELLIPSIS

          public static final java.lang.String ELLIPSIS

      ellipsis used for shortened titles and descriptions
      unicode character representing "..."
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TextLineBreakerStringWidth

          public TextLineBreakerStringWidth()

      Create the LineBreaker

  - ### Method Detail

    - #### setSpaceWidth

          public void setSpaceWidth(int spaceWidth)

      Set the Width of a Space Character
      Parameters:
        `spaceWidth` - new Space-Width

    - #### setMinusWidth

          public void setMinusWidth(int minusWidth)

      Set the Width of a Minus Character
      Parameters:
        `minusWidth` - new Minus-Width

    - #### breakLines

          public java.lang.String[] breakLines(java.io.Reader textReader,
                                      int width)
                                        throws java.io.IOException

      Break a Text into separate Lines
      Parameters:
        `textReader` - Text to separate
        `width` - Max-Width of each Line
      Returns:
        Text split in separate Lines
      Throws:
        `java.io.IOException`

    - #### breakLines

          public java.lang.String[] breakLines(java.io.Reader textReader,
                                      int width,
                                      int maxLines)
                                        throws java.io.IOException

      Break a Text into separate Lines
      Parameters:
        `textReader` - Text to separate
        `width` - Max-Width of each Line
        `maxLines` - Max. amount of Lines
      Returns:
        Text split in separate Lines
      Throws:
        `java.io.IOException`

    - #### getStringWidth

          public int getStringWidth(java.lang.String str)

      Get the Width of a String
      Parameters:
        `str` - get Width of this String
      Returns:
        Width of this String

    - #### resetHyphenator

          public static void resetHyphenator()

      to be used by Settings.handleChangedSettings()

TV-Browser 3.4.3, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)