Module tvbrowser
Package util.misc

Class TextLineBreakerFontWidth


  • public class TextLineBreakerFontWidth
    extends TextLineBreakerStringWidth
    Breaks a text into lines using Font-Metrics.
    Author:
    Til Schneider, www.murfman.de
    • 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