|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.chart.AbstractAutoRanger
public abstract class AbstractAutoRanger
This class now also supports the idea of concrete maxima and minima. These are optional parameters that can be set to replace infinite upper and lower bounds on a range. For example, when a chart model contains only NaN values, then the computed range will be [-Infinity, +Infinity]. Although this is mathematically correct, it means that the range can no longer be subdivided neatly into sub-regions and it is therefore no longer possible to paint ticks on the axis. From a user's point of view this behaviour may be disturbing and the user might even perceive that there is a bug in the system. The absolute maxima and minima have been introduced to address this problem.
Constructor Summary | |
---|---|
protected |
AbstractAutoRanger()
|
protected |
AbstractAutoRanger(Double fixMinX,
Double fixMinY,
Double fixMaxX,
Double fixMaxY)
|
Method Summary | |
---|---|
protected Pair<Range<?>,Range<?>> |
applyRangeConstraints(Axis xAxis,
Axis yAxis,
double minX,
double minY,
double maxX,
double maxY)
Post-processes the ranges of the supplied x and y axes to apply the minimum and maximum values |
protected Range<?> |
applyXRangeConstraints(Axis xAxis,
double minX,
double maxX)
|
protected Range<?> |
applyYRangeConstraints(Axis yAxis,
double minY,
double maxY)
|
Double |
getAbsoluteMaxX()
Returns the concrete maximum value for x |
Double |
getAbsoluteMaxY()
Returns the concrete maximum value for y |
Double |
getAbsoluteMinX()
Returns the concrete minimum value for x |
Double |
getAbsoluteMinY()
Returns the concrete minimum value for y |
double |
getLeadingXMarginProportion()
|
double |
getLeadingYMarginProportion()
|
Pair<Range<?>,Range<?>> |
getRanges(ChartModel model)
Returns the x and y ranges for the supplied chart model |
Pair<Range<?>,Range<?>> |
getStackedRanges(Chart chart)
Returns the x and y range when plotting a stacked bar chart. |
double |
getTrailingXMarginProportion()
|
double |
getTrailingYMarginProportion()
|
boolean |
isAllowXMarginToCrossZero()
|
boolean |
isAllowYMarginToCrossZero()
|
void |
setAbsoluteMaxX(Double absoluteMaxX)
Specify a concrete maximum value for x if it would otherwise be +Infinity |
void |
setAbsoluteMaxY(Double absoluteMaxY)
Specify a concrete maximum value for y if it would otherwise be +Infinity |
void |
setAbsoluteMinX(Double absoluteMinX)
Specify a concrete minimum value for x if it would otherwise be -Infinity |
void |
setAbsoluteMinY(Double absoluteMinY)
Specify a concrete minimum value for y if it would otherwise be -Infinity |
void |
setAllowXMarginToCrossZero(boolean allowXMarginToCrossZero)
|
void |
setAllowYMarginToCrossZero(boolean allowYMarginToCrossZero)
Specify whether the increase to the range by applying the margin is allowed to extend the range by crossing from the positive region into the negative region, or vice versa. |
void |
setLeadingXMarginProportion(double leadingXMarginProportion)
|
void |
setLeadingYMarginProportion(double leadingYMarginProportion)
|
void |
setMarginProportions(double top,
double left,
double bottom,
double right)
Sets the margin proportions to apply to ranges when calculating minima and maxima. |
void |
setTrailingXMarginProportion(double trailingXMarginProportion)
|
void |
setTrailingYMarginProportion(double trailingYMarginProportion)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.jidesoft.chart.AutoRanger |
---|
getRanges |
Constructor Detail |
---|
protected AbstractAutoRanger()
protected AbstractAutoRanger(Double fixMinX, Double fixMinY, Double fixMaxX, Double fixMaxY)
Method Detail |
---|
public void setMarginProportions(double top, double left, double bottom, double right)
top
- the trailing y margin proportionleft
- the leading x margin proportionbottom
- the leading y margin proportionright
- the trailing x margin proportionpublic double getLeadingXMarginProportion()
public void setLeadingXMarginProportion(double leadingXMarginProportion)
public double getLeadingYMarginProportion()
public void setLeadingYMarginProportion(double leadingYMarginProportion)
public double getTrailingXMarginProportion()
public void setTrailingXMarginProportion(double trailingXMarginProportion)
public double getTrailingYMarginProportion()
public boolean isAllowXMarginToCrossZero()
public void setAllowXMarginToCrossZero(boolean allowXMarginToCrossZero)
public void setTrailingYMarginProportion(double trailingYMarginProportion)
public boolean isAllowYMarginToCrossZero()
public Double getAbsoluteMaxX()
public void setAbsoluteMaxX(Double absoluteMaxX)
absoluteMaxX
- a maximum value for xpublic Double getAbsoluteMaxY()
public void setAbsoluteMaxY(Double absoluteMaxY)
absoluteMaxY
- a maximum value for ypublic Double getAbsoluteMinX()
public void setAbsoluteMinX(Double absoluteMinX)
absoluteMinX
- a minimum value for xpublic Double getAbsoluteMinY()
public void setAbsoluteMinY(Double absoluteMinY)
absoluteMinY
- a minimum value for ypublic void setAllowYMarginToCrossZero(boolean allowYMarginToCrossZero)
allowYMarginToCrossZero
- specify whether allowed to cross from positive to negative (or vice versa) when
extending the range.public Pair<Range<?>,Range<?>> getRanges(ChartModel model)
model
- the chart model whose x and y ranges we need to discover
protected Pair<Range<?>,Range<?>> applyRangeConstraints(Axis xAxis, Axis yAxis, double minX, double minY, double maxX, double maxY)
protected Range<?> applyXRangeConstraints(Axis xAxis, double minX, double maxX)
protected Range<?> applyYRangeConstraints(Axis yAxis, double minY, double maxY)
public Pair<Range<?>,Range<?>> getStackedRanges(Chart chart)
chart
- the chart for which we are computing the stacked ranges
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |