- java.lang.Object
-
- util.misc.TextLineBreakerStringWidth
-
- 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
Constructors Constructor Description TextLineBreakerFontWidth(java.awt.Font font)
Create the LineBreaker
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getStringWidth(java.lang.String str)
Get the width of a Stringvoid
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
-
-
-
-
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 classTextLineBreakerStringWidth
- Parameters:
str
- Calculate Width of this String- Returns:
- Width of String
-
-