Class EllipsisHelper
- java.lang.Object
-
- org.eclipse.birt.chart.computation.EllipsisHelper
-
public class EllipsisHelper extends java.lang.Object
Provides a helper class to shorten a string with ellipsis. EllipsisHelper
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
EllipsisHelper.ITester
ITester
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELLIPSIS_STRING
-
Constructor Summary
Constructors Constructor Description EllipsisHelper(EllipsisHelper.ITester tester_, int iMinCharToView)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkLabelEllipsis(java.lang.String sText_, java.lang.Object oPara)
static EllipsisHelper.ITester
createSimpleTester(IChartComputation cComp, IDisplayServer xs, Label la, java.lang.Double fontHeight)
static java.lang.String
ellipsisString(java.lang.String str, int iVisChar)
EllipsisHelper.ITester
getTester()
int
getVisibleCharCount()
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, java.lang.Double fontHeight)
-
-
-
Field Detail
-
ELLIPSIS_STRING
public static final java.lang.String ELLIPSIS_STRING
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EllipsisHelper
public EllipsisHelper(EllipsisHelper.ITester tester_, int iMinCharToView)
-
-
Method Detail
-
getTester
public EllipsisHelper.ITester getTester()
-
setIMinCharToView
public void setIMinCharToView(int iMinCharToView)
-
ellipsisString
public static java.lang.String ellipsisString(java.lang.String str, int iVisChar)
-
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
public boolean checkLabelEllipsis(java.lang.String sText_, java.lang.Object oPara) throws ChartException
- Throws:
ChartException
-
createSimpleTester
public static EllipsisHelper.ITester createSimpleTester(IChartComputation cComp, IDisplayServer xs, Label la, java.lang.Double fontHeight) throws ChartException
- Throws:
ChartException
-
simpleInstance
public static EllipsisHelper simpleInstance(IChartComputation cComp, IDisplayServer xs, Label la, java.lang.Double fontHeight) throws ChartException
- Throws:
ChartException
-
-