public class LabelLimiter
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LabelLimiter.Option
Options used by method limitLabelSize.
|
Constructor and Description |
---|
LabelLimiter(double maxWidth,
double maxHeight,
double wrapping)
Constructor
|
Modifier and Type | Method and Description |
---|---|
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) |
public LabelLimiter(double maxWidth, double maxHeight, double wrapping)
maxWidth
- maxHeight
- wrapping
- 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
- ChartException
public 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()
Copyright © 2005-2014 OpenText Corp. All rights reserved.