Package org.eclipse.birt.chart.device
Class TextAdapter
java.lang.Object
org.eclipse.birt.chart.device.TextAdapter
- All Implemented Interfaces:
ITextMetrics
A no-op adapter implementation for the
ITextMetrics
interface definition.-
Constructor Summary
Constructors -
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 renderedfinal Locale
Returns the locale associated with the text metrics implementerfinal 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.final void
setLocale
(com.ibm.icu.util.ULocale lcl) Sets current locale.
-
Constructor Details
-
TextAdapter
public TextAdapter()
-
-
Method Details
-
reuse
Description copied from interface:ITextMetrics
Permits reuse of the text metrics instance for a new label with new attributes.- Specified by:
reuse
in interfaceITextMetrics
-
reuse
Description copied from interface:ITextMetrics
Permits reuse of the text metrics instance for a new label with new attributes and a forcing wrapping size.- Specified by:
reuse
in interfaceITextMetrics
-
getHeight
public double getHeight()Description copied from interface:ITextMetrics
Returns the height of a single line of text using the font defined in the contained label- Specified by:
getHeight
in interfaceITextMetrics
- Returns:
- The height of a single line of text using the font defined in the contained label
-
getDescent
public double getDescent()Description copied from interface:ITextMetrics
Returns the descent of a single line of text using the font defined in the contained label- Specified by:
getDescent
in interfaceITextMetrics
- Returns:
- The descent of a single line of text using the font defined in the contained label
-
getFullHeight
public double getFullHeight()Description copied from interface:ITextMetrics
Returns the full height of all lines of text using the font defined in the contained label- Specified by:
getFullHeight
in interfaceITextMetrics
- Returns:
- The full height of all lines of text using the font defined in the contained label
-
getFullWidth
public double getFullWidth()Description copied from interface:ITextMetrics
Returns the max width of the widest line of text using the font defined in the contained label- Specified by:
getFullWidth
in interfaceITextMetrics
- Returns:
- The max width of the widest line of text using the font defined in the contained label
-
getLineCount
public int getLineCount()Description copied from interface:ITextMetrics
Returns the number of lines of text associated with the label to be rendered- Specified by:
getLineCount
in interfaceITextMetrics
- Returns:
- The number of lines of text associated with the label to be rendered
-
getLine
Description copied from interface:ITextMetrics
The text associated with a line index for multi-line text- Specified by:
getLine
in interfaceITextMetrics
- Parameters:
iIndex
- The line to be retrieved from multi-line text- Returns:
- A line of text (subset)
-
dispose
public void dispose()Description copied from interface:ITextMetrics
Perform a cleanup when this object is not required anymore- Specified by:
dispose
in interfaceITextMetrics
-
getLocale
Description copied from interface:ITextMetrics
Returns the locale associated with the text metrics implementer- Specified by:
getLocale
in interfaceITextMetrics
- Returns:
- The locale
-
getULocale
public final com.ibm.icu.util.ULocale getULocale()Description copied from interface:ITextMetrics
Returns the locale associated with the text metrics implementer- Specified by:
getULocale
in interfaceITextMetrics
- Returns:
- The locale
-
setLocale
public final void setLocale(com.ibm.icu.util.ULocale lcl) Sets current locale.- Parameters:
lcl
-
-
getFullHeight
public double getFullHeight(double fontHeight) - Specified by:
getFullHeight
in interfaceITextMetrics
-
getWidth
public double getWidth(int iIndex) Description copied from interface:ITextMetrics
The text's width of associated with a line index.- Specified by:
getWidth
in interfaceITextMetrics
- Returns:
-