org.eclipse.birt.chart.device
Interface ITextMetrics

All Known Implementing Classes:
TextAdapter

public interface ITextMetrics

Provides a layer of abstraction for text metrics retrieval via display server dependent implementations.


Method Summary
 void dispose()
          Perform a cleanup when this object is not required anymore
 double getDescent()
          Returns the descent of a single line of text using the font defined in the contained label
 double getFullHeight()
          Returns the full height of all lines of text using the font defined in the contained label
 double getFullWidth()
          Returns the max width of the widest line of text using the font defined in the contained label
 double getHeight()
          Returns the height of a single line of text using the font defined in the contained label
 java.lang.String getLine(int iIndex)
          The text associated with a line index for multi-line text
 int getLineCount()
          Returns the number of lines of text associated with the label to be rendered
 java.util.Locale getLocale()
          Deprecated. use getULocale() instead.
 com.ibm.icu.util.ULocale getULocale()
          Returns the locale associated with the text metrics implementer
 void reuse(Label la)
          Permits reuse of the text metrics instance for a new label with new attributes.
 void reuse(Label la, double forceWrappingSize)
          Permits reuse of the text metrics instance for a new label with new attributes and a forcing wrapping size.
 

Method Detail

reuse

public void reuse(Label la)
Permits reuse of the text metrics instance for a new label with new attributes.


reuse

public void reuse(Label la,
                  double forceWrappingSize)
Permits reuse of the text metrics instance for a new label with new attributes and a forcing wrapping size.

Since:
2.1

getHeight

public double getHeight()
Returns the height of a single line of text using the font defined in the contained label

Returns:
The height of a single line of text using the font defined in the contained label

getDescent

public double getDescent()
Returns the descent of a single line of text using the font defined in the contained label

Returns:
The descent of a single line of text using the font defined in the contained label

getFullHeight

public double getFullHeight()
Returns the full height of all lines of text using the font defined in the contained label

Returns:
The full height of all lines of text using the font defined in the contained label

getFullWidth

public double getFullWidth()
Returns the max width of the widest line of text using the font defined in the contained label

Returns:
The max width of the widest line of text using the font defined in the contained label

getLineCount

public int getLineCount()
Returns the number of lines of text associated with the label to be rendered

Returns:
The number of lines of text associated with the label to be rendered

getLine

public java.lang.String getLine(int iIndex)
The text associated with a line index for multi-line text

Parameters:
iIndex - The line to be retrieved from multi-line text
Returns:
A line of text (subset)

dispose

public void dispose()
Perform a cleanup when this object is not required anymore


getLocale

public java.util.Locale getLocale()
Deprecated. use getULocale() instead.

Returns the locale associated with the text metrics implementer

Returns:
The locale

getULocale

public com.ibm.icu.util.ULocale getULocale()
Returns the locale associated with the text metrics implementer

Returns:
The locale
Since:
2.1


Copyright © 2005-2007 Actuate Corp. All rights reserved.