TV-Browser 3.3.3 API

util.misc
Class TextLineBreakerFontWidth

java.lang.Object
  extended by util.misc.TextLineBreakerStringWidth
      extended by util.misc.TextLineBreakerFontWidth

public class TextLineBreakerFontWidth
extends TextLineBreakerStringWidth

Breaks a text into lines using Font-Metrics.

Author:
Til Schneider, www.murfman.de

Field Summary
 
Fields inherited from class util.misc.TextLineBreakerStringWidth
ELLIPSIS
 
Constructor Summary
TextLineBreakerFontWidth(java.awt.Font font)
          Create the LineBreaker
 
Method Summary
 int getStringWidth(java.lang.String str)
          Get the width of a String
 void setFont(java.awt.Font font)
          Set the Font to use for Width-Calculation
 
Methods inherited from class util.misc.TextLineBreakerStringWidth
breakLines, breakLines, resetHyphenator, setMinusWidth, setSpaceWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextLineBreakerFontWidth

public TextLineBreakerFontWidth(java.awt.Font font)
Create the LineBreaker

Parameters:
font - Font to use for Width-Calculation
Method Detail

setFont

public void setFont(java.awt.Font font)
Set the Font to use for Width-Calculation

Parameters:
font - Font to use

getStringWidth

public int getStringWidth(java.lang.String str)
Get the width of a String

Overrides:
getStringWidth in class TextLineBreakerStringWidth
Parameters:
str - Calculate Width of this String
Returns:
Width of String

TV-Browser 3.3.3 API

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