Package 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
Modifier and TypeMethodDescriptionvoid
dispose()
Perform a cleanup when this object is not required anymoredouble
Returns the descent of a single line of text using the font defined in the contained labeldouble
Returns the full height of all lines of text using the font defined in the contained labeldouble
getFullHeight
(double fontHeight) double
Returns the max width of the widest line of text using the font defined in the contained labeldouble
Returns the height of a single line of text using the font defined in the contained labelgetLine
(int iIndex) The text associated with a line index for multi-line textint
Returns the number of lines of text associated with the label to be renderedDeprecated.com.ibm.icu.util.ULocale
Returns the locale associated with the text metrics implementerdouble
getWidth
(int iIndex) The text's width of associated with a line index.void
Permits reuse of the text metrics instance for a new label with new attributes.void
Permits reuse of the text metrics instance for a new label with new attributes and a forcing wrapping size.
-
Method Details
-
reuse
Permits reuse of the text metrics instance for a new label with new attributes. -
reuse
Permits reuse of the text metrics instance for a new label with new attributes and a forcing wrapping size.- Since:
- 2.1
-
getHeight
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
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
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
-
getFullHeight
double getFullHeight(double fontHeight) -
getFullWidth
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
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
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)
-
getWidth
double getWidth(int iIndex) The text's width of associated with a line index.- Parameters:
iIndex
-- Returns:
-
dispose
void dispose()Perform a cleanup when this object is not required anymore -
getLocale
Deprecated.usegetULocale()
instead.Returns the locale associated with the text metrics implementer- Returns:
- The locale
-
getULocale
com.ibm.icu.util.ULocale getULocale()Returns the locale associated with the text metrics implementer- Returns:
- The locale
- Since:
- 2.1
-
getULocale()
instead.