org.acm.seguin.uml.line
Class LabelSizeComputation

java.lang.Object
  extended by org.acm.seguin.uml.line.LabelSizeComputation

public class LabelSizeComputation
extends java.lang.Object

Class responsible for computing the size of a label

Author:
Chris Seguin

Method Summary
 org.acm.seguin.uml.line.TextInfo compute(java.lang.String text, java.awt.Font font)
          Computes the size of a piece of text given a font
 int computeHeight(java.lang.String text, java.awt.Font font)
          Computes the size of a piece of text given a font
static LabelSizeComputation get()
          Factory method for this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compute

public org.acm.seguin.uml.line.TextInfo compute(java.lang.String text,
                                                java.awt.Font font)
Computes the size of a piece of text given a font

Parameters:
text - the text
font - the font
Returns:
information about the size of the text

computeHeight

public int computeHeight(java.lang.String text,
                         java.awt.Font font)
Computes the size of a piece of text given a font

Parameters:
text - the text
font - the font
Returns:
information about the size of the text

get

public static LabelSizeComputation get()
Factory method for this object

Returns:
Creates a single instance of this object