Class EllipsisHelper
java.lang.Object
org.eclipse.birt.chart.computation.EllipsisHelper
Provides a helper class to shorten a string with ellipsis. EllipsisHelper
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkLabelEllipsis
(String sText_, Object oPara) static EllipsisHelper.ITester
createSimpleTester
(IChartComputation cComp, IDisplayServer xs, Label la, Double fontHeight) static String
ellipsisString
(String str, int iVisChar) int
Returns the visible char count before the ellipsis, 0 if no ellipsis is used.void
setIMinCharToView
(int iMinCharToView) static EllipsisHelper
simpleInstance
(IChartComputation cComp, IDisplayServer xs, Label la, Double fontHeight)
-
Field Details
-
ELLIPSIS_STRING
- See Also:
-
-
Constructor Details
-
EllipsisHelper
-
-
Method Details
-
getTester
-
setIMinCharToView
public void setIMinCharToView(int iMinCharToView) -
ellipsisString
-
getVisibleCharCount
public int getVisibleCharCount()Returns the visible char count before the ellipsis, 0 if no ellipsis is used. e.g. if the text is "abcd..." then 4 will be returned. if the text is "abcdefg" then 0 will be returned.- Returns:
- count of visible chars.
-
checkLabelEllipsis
- Throws:
ChartException
-
createSimpleTester
public static EllipsisHelper.ITester createSimpleTester(IChartComputation cComp, IDisplayServer xs, Label la, Double fontHeight) throws ChartException - Throws:
ChartException
-
simpleInstance
public static EllipsisHelper simpleInstance(IChartComputation cComp, IDisplayServer xs, Label la, Double fontHeight) throws ChartException - Throws:
ChartException
-