Interface IChartComputation
-
- All Known Implementing Classes:
BIRTChartComputation
public interface IChartComputation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
applyWrapping(IDisplayServer xs, Label la, double dWapping)
Apply the wrapping to a label.BoundingBox
computeBox(IDisplayServer xs, int iLabelLocation, Label la, double dX, double dY)
Compute the bounding box ( location and size ) of a label.double
computeFontHeight(IDisplayServer xs, Label la)
Convenient method to compute the font's height of a label.double
computeHeight(IDisplayServer xs, Label la)
Compute the height of a label.BoundingBox
computeLabelSize(IDisplayServer xs, Label la, double dWrapping, java.lang.Double fontHeight)
Compute the size of a label.RotatedRectangle
computePolygon(IDisplayServer xs, int iLabelLocation, Label la, double dX, double dY, java.lang.Double fontHeight)
Compute the bounding polygon of a label.double
computeWidth(IDisplayServer xs, Label la)
Compute the width of a label.void
dispose()
ITextMetrics
getTextMetrics(IDisplayServer xs, Label la, double wrapping)
Returns a text metrics.void
recycleTextMetrics(ITextMetrics itm)
Dispose the text metrics.
-
-
-
Method Detail
-
dispose
void dispose()
-
getTextMetrics
ITextMetrics getTextMetrics(IDisplayServer xs, Label la, double wrapping)
Returns a text metrics.- Parameters:
xs
-la
-wrapping
-- Returns:
-
recycleTextMetrics
void recycleTextMetrics(ITextMetrics itm)
Dispose the text metrics.- Parameters:
itm
-
-
computeFontHeight
double computeFontHeight(IDisplayServer xs, Label la) throws ChartException
Convenient 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.- Parameters:
xs
-la
-- Returns:
- font height
- Throws:
ChartException
-
computeLabelSize
BoundingBox computeLabelSize(IDisplayServer xs, Label la, double dWrapping, java.lang.Double fontHeight) throws ChartException
Compute the size of a label.- Parameters:
xs
-la
-dWrapping
-fontHeight
-- Returns:
- Throws:
ChartException
-
computeBox
BoundingBox computeBox(IDisplayServer xs, int iLabelLocation, Label la, double dX, double dY) throws ChartException
Compute the bounding box ( location and size ) of a label.- Parameters:
xs
-iLabelLocation
-la
-dX
-dY
-- Returns:
- Throws:
ChartException
-
computePolygon
RotatedRectangle computePolygon(IDisplayServer xs, int iLabelLocation, Label la, double dX, double dY, java.lang.Double fontHeight) throws ChartException
Compute the bounding polygon of a label.- Parameters:
xs
-iLabelLocation
-la
-dX
-dY
-fontHeight
-- Returns:
- Throws:
ChartException
-
computeWidth
double computeWidth(IDisplayServer xs, Label la) throws ChartException
Compute the width of a label.- Parameters:
xs
-la
-- Returns:
- Throws:
ChartException
-
computeHeight
double computeHeight(IDisplayServer xs, Label la) throws ChartException
Compute the height of a label.- Parameters:
xs
-la
-- Returns:
- Throws:
ChartException
-
applyWrapping
void applyWrapping(IDisplayServer xs, Label la, double dWapping) throws ChartException
Apply the wrapping to a label.- Parameters:
xs
-la
-dWapping
-- Throws:
ChartException
-
-