Package org.eclipse.birt.chart.computation

# Class EllipsisHelper

java.lang.Object
org.eclipse.birt.chart.computation.EllipsisHelper

public class EllipsisHelper extends 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 final String`
`ELLIPSIS_STRING`

## Constructor Summary

Constructors
Constructor
Description
`EllipsisHelper(EllipsisHelper.ITester tester_, int iMinCharToView)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`checkLabelEllipsis(String sText_, Object oPara)`
`static EllipsisHelper.ITester`
`createSimpleTester(IChartComputation cComp, IDisplayServer xs, Label la, Double fontHeight)`
`static String`
`ellipsisString(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, Double fontHeight)`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### ELLIPSIS_STRING

public static final String ELLIPSIS_STRING

See Also:
  - Constant Field Values

## Constructor Details

### EllipsisHelper

public EllipsisHelper(EllipsisHelper.ITester tester_, int iMinCharToView)

## Method Details

### getTester

public EllipsisHelper.ITester getTester()

### setIMinCharToView

public void setIMinCharToView(int iMinCharToView)

### ellipsisString

public static String ellipsisString(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(String sText_, Object oPara) throws ChartException

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`