Class BIRTChartComputation
- java.lang.Object
-
- org.eclipse.birt.chart.computation.BIRTChartComputation
-
- All Implemented Interfaces:
IChartComputation
public class BIRTChartComputation extends java.lang.Object implements IChartComputation
-
-
Constructor Summary
Constructors Constructor Description BIRTChartComputation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyWrapping(IDisplayServer xs, Label la, double dWrapping)Apply the wrapping to a label.BoundingBoxcomputeBox(IDisplayServer xs, int iLabelLocation, Label la, double dX, double dY)Compute the bounding box ( location and size ) of a label.doublecomputeFontHeight(IDisplayServer xs, Label la)Convenient method to compute the font's height of a label.doublecomputeHeight(IDisplayServer xs, Label la)Compute the height of a label.BoundingBoxcomputeLabelSize(IDisplayServer xs, Label la, double dWrapping, java.lang.Double fontHeight)Compute the size of a label.RotatedRectanglecomputePolygon(IDisplayServer xs, int iLabelLocation, Label la, double dX, double dY, java.lang.Double fontHeight)Compute the bounding polygon of a label.doublecomputeWidth(IDisplayServer xs, Label la)Compute the width of a label.voiddispose()ITextMetricsgetTextMetrics(IDisplayServer xs, Label la, double wrapping)Returns a text metrics.voidrecycleTextMetrics(ITextMetrics itm)Dispose the text metrics.
-
-
-
Method Detail
-
computeFontHeight
public double computeFontHeight(IDisplayServer xs, Label la) throws ChartException
Description copied from interface:IChartComputationConvenient method to compute the font's height of a label. This computation is costly, but in most case we do not change the font of a label, we just change the string value, so the font height will not changed. The purpose of the method is to get the font height overhead for reusing.- Specified by:
computeFontHeightin interfaceIChartComputation- Returns:
- font height
- Throws:
ChartException
-
getTextMetrics
public ITextMetrics getTextMetrics(IDisplayServer xs, Label la, double wrapping)
Description copied from interface:IChartComputationReturns a text metrics.- Specified by:
getTextMetricsin interfaceIChartComputation- Returns:
-
computeLabelSize
public BoundingBox computeLabelSize(IDisplayServer xs, Label la, double dWrapping, java.lang.Double fontHeight) throws ChartException
Description copied from interface:IChartComputationCompute the size of a label.- Specified by:
computeLabelSizein interfaceIChartComputation- Returns:
- Throws:
ChartException
-
computeBox
public BoundingBox computeBox(IDisplayServer xs, int iLabelLocation, Label la, double dX, double dY) throws ChartException
Description copied from interface:IChartComputationCompute the bounding box ( location and size ) of a label.- Specified by:
computeBoxin interfaceIChartComputation- Returns:
- Throws:
ChartException
-
computePolygon
public RotatedRectangle computePolygon(IDisplayServer xs, int iLabelLocation, Label la, double dX, double dY, java.lang.Double fontHeight) throws ChartException
Description copied from interface:IChartComputationCompute the bounding polygon of a label.- Specified by:
computePolygonin interfaceIChartComputation- Returns:
- Throws:
ChartException
-
computeWidth
public double computeWidth(IDisplayServer xs, Label la) throws ChartException
Description copied from interface:IChartComputationCompute the width of a label.- Specified by:
computeWidthin interfaceIChartComputation- Returns:
- Throws:
ChartException
-
computeHeight
public double computeHeight(IDisplayServer xs, Label la) throws ChartException
Description copied from interface:IChartComputationCompute the height of a label.- Specified by:
computeHeightin interfaceIChartComputation- Returns:
- Throws:
ChartException
-
dispose
public void dispose()
- Specified by:
disposein interfaceIChartComputation
-
applyWrapping
public void applyWrapping(IDisplayServer xs, Label la, double dWrapping) throws ChartException
Description copied from interface:IChartComputationApply the wrapping to a label.- Specified by:
applyWrappingin interfaceIChartComputation- Throws:
ChartException
-
recycleTextMetrics
public void recycleTextMetrics(ITextMetrics itm)
Description copied from interface:IChartComputationDispose the text metrics.- Specified by:
recycleTextMetricsin interfaceIChartComputation
-
-