Package com.cosylab.vdct.graphics
Class FontMetricsBuffer
- java.lang.Object
-
- com.cosylab.vdct.graphics.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 Summary
Constructors Modifier Constructor Description protected
FontMetricsBuffer(Graphics g)
FontMetricsBuffer constructor comment.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
createInstance(Graphics g)
Insert the method's description here.Font
getAppropriateFont(String fontName, int style, String str, int maxWidth, int maxHeight)
Insert the method's description here.Font
getAppropriateFont(String fontName, int style, String str, int maxWidth, int maxHeight, int maxSize)
Insert the method's description here.Font
getFont(String name, int size, int style)
Insert the method's description here.FontMetrics
getFontMetrics(Font font)
Insert the method's description here.static FontMetricsBuffer
getInstance()
Must be initialized with createInstance(java.awt.Graphics) Creation date: (25.12.2000 11:54:36)static void
setInstance(FontMetricsBuffer fmb)
-
-
-
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.Stringstyle
- intstr
- java.lang.StringmaxWidth
- intmaxHeight
- 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
- maxSizefontName
- java.lang.Stringstyle
- intstr
- java.lang.StringmaxWidth
- intmaxHeight
- 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.Stringsize
- intstyle
- 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
-
-