|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.birt.chart.computation.LabelLimiter
public class LabelLimiter
Helper class to limit the size of a label by wrapping its text or shorten its text with ellipsis.
| Nested Class Summary | |
|---|---|
static class |
LabelLimiter.Option
Options used by method limitLabelSize. |
| Constructor Summary | |
|---|---|
LabelLimiter(double maxWidth,
double maxHeight,
double wrapping)
Constructor |
|
| Method Summary | |
|---|---|
double |
computeWrapping(IDisplayServer xs,
Label la)
|
static double |
computeWrapping(IDisplayServer xs,
Label la,
LabelLimiter lbLimit)
Compute the wrapping with maxWidth, maxHeight. |
BoundingBox |
getBounding(BoundingBox bb)
Returns a bounding box using maxWidth and maxHeight |
double |
getMaxHeight()
|
double |
getMaxWidth()
|
double |
getWrapping()
|
boolean |
isSuccessed()
|
LabelLimiter |
limitLabelSize(IChartComputation cComp,
IDisplayServer xs,
Label la)
modify the text of la to fit the limit size. |
LabelLimiter |
limitLabelSize(IChartComputation cComp,
IDisplayServer xs,
Label la,
java.util.EnumSet<LabelLimiter.Option> options)
modify the text of la to fit the limit size. |
static LabelLimiter |
limitLabelSize(IChartComputation cComp,
IDisplayServer xs,
Label la,
LabelLimiter lbLimit,
java.util.EnumSet<LabelLimiter.Option> options)
To compute the text of the label with a limited size, the label text will be wrapped and shortened with ellipsis if required, the size of the label bound will be returned. |
void |
setMaxHeight(double maxHeight)
|
void |
setMaxWidth(double maxWidth)
|
void |
setWrapping(double wrapping)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LabelLimiter(double maxWidth,
double maxHeight,
double wrapping)
maxWidth - maxHeight - wrapping - | Method Detail |
|---|
public double computeWrapping(IDisplayServer xs,
Label la)
public BoundingBox getBounding(BoundingBox bb)
bb - will be updated and returned if not null, otherwise a new
bounding box will be created.
public static final double computeWrapping(IDisplayServer xs,
Label la,
LabelLimiter lbLimit)
xs - la - lbLimit -
public LabelLimiter limitLabelSize(IChartComputation cComp,
IDisplayServer xs,
Label la)
throws ChartException
xs - la -
ChartException
public LabelLimiter limitLabelSize(IChartComputation cComp,
IDisplayServer xs,
Label la,
java.util.EnumSet<LabelLimiter.Option> options)
throws ChartException
xs - la - options -
ChartException
public static final LabelLimiter limitLabelSize(IChartComputation cComp,
IDisplayServer xs,
Label la,
LabelLimiter lbLimit,
java.util.EnumSet<LabelLimiter.Option> options)
throws ChartException
xs - la - maxSize - lbLimit - options -
ChartExceptionpublic final double getMaxWidth()
public final void setMaxWidth(double maxWidth)
maxWidth - The maxWidth to set.public final double getMaxHeight()
public final void setMaxHeight(double maxHeight)
maxHeight - The maxHeight to set.public final double getWrapping()
public final void setWrapping(double wrapping)
wrapping - The wrapping to set.public final boolean isSuccessed()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||