Method Summary |
|
public void | bind(Element el) Binds this TextMetrics instance to an element from which to copy existing
CSS styles that can affect the size of the rendered text. |
public static TextMetrics | get() Returns the singleton instance. |
public int | getHeight(String text) Returns the measured height of the specified text. |
public Size | getSize(String text) Returns the size of the specified text based on the internal element's
style and width properties. |
public int | getWidth(String text) Returns the measured width of the specified text. |
public void | setFixedWidth(int width) Sets a fixed width on the internal measurement element. |