Class FontMetricsBuffer


  • public class FontMetricsBuffer
    extends Object
    Font metrics buffer (using Flyweight/Singleton pattern) Creation date: (25.12.2000 11:51:01)
    Author:
    Matej Sekoranja
    • Constructor Detail

      • FontMetricsBuffer

        protected FontMetricsBuffer​(Graphics g)
        FontMetricsBuffer constructor comment.
        Parameters:
        g - java.awt.Graphics
    • Method Detail

      • createInstance

        public static void createInstance​(Graphics g)
        Insert the method's description here. Creation date: (25.12.2000 12:28:19)
        Parameters:
        g - java.awt.Graphics
      • getAppropriateFont

        public Font getAppropriateFont​(String fontName,
                                       int style,
                                       String str,
                                       int maxWidth,
                                       int maxHeight)
        Insert the method's description here. Creation date: (25.12.2000 12:47:03)
        Parameters:
        fontName - java.lang.String
        style - int
        str - java.lang.String
        maxWidth - int
        maxHeight - int
        Returns:
        java.awt.Font
      • getAppropriateFont

        public Font getAppropriateFont​(String fontName,
                                       int style,
                                       String str,
                                       int maxWidth,
                                       int maxHeight,
                                       int maxSize)
        Insert the method's description here. Creation date: (25.12.2000 12:47:03)
        Parameters:
        maxSize - maxSize
        fontName - java.lang.String
        style - int
        str - java.lang.String
        maxWidth - int
        maxHeight - int
        Returns:
        java.awt.Font
      • getFont

        public Font getFont​(String name,
                            int size,
                            int style)
        Insert the method's description here. Creation date: (25.12.2000 12:34:08)
        Parameters:
        name - java.lang.String
        size - int
        style - int
        Returns:
        java.awt.Font
      • getFontMetrics

        public FontMetrics getFontMetrics​(Font font)
        Insert the method's description here. Creation date: (25.12.2000 12:32:57)
        Parameters:
        font - font
        Returns:
        java.awt.FontMetrics
      • getInstance

        public static FontMetricsBuffer getInstance()
        Must be initialized with createInstance(java.awt.Graphics) Creation date: (25.12.2000 11:54:36)
        Returns:
        com.cosylab.vdct.graphics.FontMetricsBuffer
      • setInstance

        public static void setInstance​(FontMetricsBuffer fmb)
        Parameters:
        fmb - fmb