Class ScaleContext
java.lang.Object
org.eclipse.birt.chart.computation.Methods
org.eclipse.birt.chart.computation.withaxes.ScaleContext
- All Implemented Interfaces:
IConstants
Scale context for min/max computation.
-
Field Summary
Fields inherited from interface org.eclipse.birt.chart.computation.IConstants
ABOVE, ANCILLARY_AXIS, ANCILLARY_BASE, ARRAY, AUTO, AVERAGE, AXIS, BACKWARD, BASE, BASE_AXIS, BELOW, BIG_NUMBER_PRIMITIVE_ARRAY, BOOLEAN, BOTTOM, CENTER, COLLECTION, DATE_TIME, DESIGN_TIME, EMPTY_STRING, EQUAL, FORWARD, HORIZONTAL, INSIDE, LABELS, LEFT, LEGEND_ENTRY, LEGEND_GROUP_NAME, LEGEND_MINSLICE_ENTRY, LEGEND_SEPERATOR, LESS, LINE_EXPAND_DOUBLE_SIZE, LINE_EXPAND_SIZE, LINEAR, LOG_10, LOGARITHMIC, MAJOR, MAX, MIN, MINOR, MORE, NON_PRIMITIVE_ARRAY, NULL_STRING, NUMBER_PRIMITIVE_ARRAY, NUMERICAL, ONE_SPACE, ORTHOGONAL, ORTHOGONAL_AXIS, OTHER, OUTSIDE, PERCENT, POSITION_MASK, POSITION_MOVE_ABOVE, POSITION_MOVE_BELOW, POSITION_MOVE_LEFT, POSITION_MOVE_RIGHT, PRIMITIVE_ARRAY, RIGHT, RUN_TIME, SOME_NULL, TEXT, THREE_D, TICK_ABOVE, TICK_ACROSS, TICK_BELOW, TICK_LEFT, TICK_NONE, TICK_RIGHT, TICK_SIDE1, TICK_SIDE2, TICK_SIZE, TOP, TWO_5_D, TWO_D, UNDEFINED, UNDEFINED_STRING, USER_INTERFACE, VALUE, VERTICAL
-
Constructor Summary
ConstructorsConstructorDescriptionScaleContext
(int iMarginPercent, int iType) ScaleContext
(int iMarginPercent, int iType, Object oMinAuto, Object oMaxAuto, Object oStep) ScaleContext
(int iMarginPercent, int iType, Object oUnit, Object oMinValue, Object oMaxValue, Object oStep) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
computeMinMax
(boolean bAlignZero) copy()
static ScaleContext
createSimpleScale
(Object oMin, Object oMax) Creates a simple instance of scale.getMax()
Returns the maximum of the scaleReturns the maximum plus margin.getMin()
Returns the minimum of the scaleReturns the minimum plus margin.getStep()
getUnit()
boolean
void
setExpandMinmax
(boolean expandMinmax) void
setFixedStep
(boolean bStepFixed, Integer oStepNumber) void
setFixedValue
(boolean bMinimumFixed, boolean bMaximumFixed, Object oMinFixed, Object oMaxFixed) void
void
setMaxWithMargin
(Object oMaxAuto) void
void
setMinWithMargin
(Object oMinAuto) void
void
setStepNumber
(Integer oStepNumber) void
void
updateShared
(ScaleContext that) Methods inherited from class org.eclipse.birt.chart.computation.Methods
asDateTime, asDouble, asInteger, computeBox, computeBox, computeBox, computeBox, computeFontHeight, computeHeight, computeHeight, computeLabelSize, computePolygon, computePolygon, computePolygon, computeRotatedTopPoint, computeWidth, computeWidth, getLabelPosition, getLocation, getLocation, getLocation, getNormalizedLocation, getNormalizedLocation
-
Constructor Details
-
ScaleContext
public ScaleContext(int iMarginPercent, int iType) -
ScaleContext
-
ScaleContext
-
-
Method Details
-
copy
-
createSimpleScale
Creates a simple instance of scale. Note that this instance is just used to store min/max and can not be computed directly.- Parameters:
oMin
-oMax
-- Since:
- 2.3
-
setFixedValue
-
setFixedStep
-
getMin
Returns the minimum of the scale- Returns:
- the minimum of the scale
-
setMin
-
getMax
Returns the maximum of the scale- Returns:
- the maximum of the scale
-
setMax
-
getMinWithMargin
Returns the minimum plus margin. Margin means extra space for rendering and clipping. If margin is 0, or no margin needed, return null.- Returns:
- the minimum plus margin. If no margin, return null.
-
setMinWithMargin
-
getMaxWithMargin
Returns the maximum plus margin. Margin means extra space for rendering and clipping. If margin is 0, or no margin needed, return null.- Returns:
- the maximum plus margin. If no margin, return null.
-
setMaxWithMargin
-
getStep
-
setStep
-
getStepNumber
-
setStepNumber
-
computeMinMax
public void computeMinMax() -
computeMinMax
public void computeMinMax(boolean bAlignZero) -
getUnit
- Returns:
- Returns the iUnit.
-
setUnit
-
isExpandMinmax
public boolean isExpandMinmax()- Returns:
- Returns the bExpandMinmax.
-
setExpandMinmax
public void setExpandMinmax(boolean expandMinmax) - Parameters:
expandMinmax
- The bExpandMinmax to set.
-