|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.mapper.AbstractAxisMapper
lt.monarch.chart.mapper.AnalogAxisMapper<LogMathRange>
lt.monarch.chart.mapper.LogAxisMapper
public class LogAxisMapper extends AnalogAxisMapper<LogMathRange>
Axis mapper for logarithmic scaling. This mapper allows axis to be subdivided logarithmically. This feature is useful when displaying values that differ significantly. The user can use logarithmic scaling to make the grid lines of the axis equidistant but have values that may increase or decrease exponentially. Here is an example of LogAxisMapper usage on x axis:


| Modifier and Type | Field and Description |
|---|---|
protected AxisMapperRange |
mapperRange
the axis mapper range |
protected LogMathRange |
range
the visible range |
protected LogMathRange |
totalRange
Mapping range. |
| Modifier | Constructor and Description |
|---|---|
|
LogAxisMapper()
Creates a new LogAxisMapper. |
|
LogAxisMapper(double min,
double max)
Creates a new logarithmic axis mapper with the specified mapping rage. |
|
LogAxisMapper(double min,
double max,
AxisMapperRange mapperRange)
Creates a new logarithmic axis mapper with the specified initial visible range. |
protected |
LogAxisMapper(LogMathRange totalRange,
AxisMapperRange mapperRange)
Constructs a new LogAxisMapper with the specified mapping range and the
specified visible range. |
| Modifier and Type | Method and Description |
|---|---|
protected LogMathRange |
createRange(double min,
double max)
|
protected AxisScale |
createScale()
Creates LogAxisScale. |
java.lang.String |
formatKey(java.lang.Object key)
Provides text representation of the coordinate value. |
java.text.NumberFormat |
getCustomNumberFormat()
Gets custom the number format if used |
int |
getElementCount()
Returns element count. |
protected java.text.Format[] |
getFormats()
Gets axis mapper formats. |
AxisNumberFormat |
getNumberFormat()
Gets predefined number format |
LogMathRange |
getRange()
Returns the mapping range of this LogAxisMapper object. |
AxisScale |
getScale()
Returns the logrithmic scale for axis. |
AxisMapperRange |
getViewRange()
Gets an AxisMapperRange object representing visible axis range. |
LogMathRange |
getVisibleRange()
Gets visible range of the mapper. |
double |
map(double key)
Finds the position for the coordinate value. |
double |
map(java.lang.Object key)
Finds the position for the Number value. |
java.lang.Object |
mapBack(double pos)
Converts the position on the coordinate axis to the Double value. |
void |
setBase(double base)
Sets base value for mapper. |
void |
setCustomNumberFormat(java.text.NumberFormat nf)
Assigns number format used to format labels in logarithmic scale. |
void |
setDrawSubScale(boolean drawSubScale)
Sets if the subscale on the axis should be drawn. |
void |
setNumberFormat(AxisNumberFormat nf)
Assigns predefined number format used to format labels in logarithmic scale. |
void |
setRange(double min,
double max)
Sets the mapping range for this mapper object. |
void |
setVisibleRange(double min,
double max)
Sets the visible range for this mapper. |
void |
updateRange(double value)
Updates the mapping range so that specified value will be in the mapping
range. |
| Methods inherited from class lt.monarch.chart.mapper.AnalogAxisMapper |
|---|
getPreferredHeight, getPreferredWidth |
| Methods inherited from class lt.monarch.chart.mapper.AbstractAxisMapper |
|---|
addListener, fireMappingChanged, getProjectionRange, removeListener, setProjectionRange |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final LogMathRange totalRange
protected final AxisMapperRange mapperRange
protected final LogMathRange range
| Constructor Detail |
|---|
public LogAxisMapper()
LogAxisMapper.
public LogAxisMapper(double min,
double max)
min - The beginning of the mapping rangemax - The end of the mapping rangejava.lang.IllegalArgumentException - if min >= max or min <= 0.
public LogAxisMapper(double min,
double max,
AxisMapperRange mapperRange)
min - The beginning of the mapping rangemax - The end of the mapping rangemapperRange - the axis mapper range object representing visible range partjava.lang.IllegalArgumentException - if min >= max or min <= 0.
protected LogAxisMapper(LogMathRange totalRange,
AxisMapperRange mapperRange)
LogAxisMapper with the specified mapping range and the
specified visible range.
totalRange - the mapping rangemapperRange - the axis mapper range object representing visible range part| Method Detail |
|---|
protected LogMathRange createRange(double min,
double max)
public void setCustomNumberFormat(java.text.NumberFormat nf)
nf - the number formatpublic void setNumberFormat(AxisNumberFormat nf)
nf - A constant indicating the format in witch axis labels will be represented. Can be
either AxisNumberFormat.EXPONENTIAL (to display numbers in exponential format) or
AxisNumberFormat.DECIMAL (to display numbers in decimal format).
public void setRange(double min,
double max)
min - The beginning of the mapping rangemax - The end of the mapping rangejava.lang.IllegalArgumentException - if min >= max or
min <= 0.public LogMathRange getRange()
getRange in class AnalogAxisMapper<LogMathRange>public AxisScale getScale()
public void setDrawSubScale(boolean drawSubScale)
drawSubScale - True if to draw subscalepublic double map(double key)
key - The value in some coordinate spacejava.lang.IllegalArgumentException - if Double.isNaN(key) or
Double.isInfinite(key)public java.lang.Object mapBack(double pos)
mapBack in interface AxisMappermapBack in class AbstractAxisMapperpos - The position in range [0,1]java.lang.IllegalArgumentException - if Double.isNaN(key) or
Double.isInfinite(key).AxisMapper.mapBack(double)public double map(java.lang.Object key)
key - The Number value to mappublic void updateRange(double value)
value will be in the mapping
range. value must be greater than 0.
value - the positive double valuejava.lang.IllegalArgumentException - if value <= 0public java.lang.String formatKey(java.lang.Object key)
key - The value to be formatedprotected AxisScale createScale()
LogAxisScale.
public int getElementCount()
public void setBase(double base)
base - - logarithm basejava.lang.IllegalArgumentException - if base <= 0 or base == 1java.lang.IllegalArgumentException - if Double.isNaN(base) or Double.isInfinite(base)public AxisMapperRange getViewRange()
AxisMapperAxisMapperRange object representing visible axis range. The object can
be used to set visible axis range. Returns normalized value from [0..1]
public void setVisibleRange(double min,
double max)
min - start of the visible rangemax - end of the visible rangepublic LogMathRange getVisibleRange()
getVisibleRange in class AnalogAxisMapper<LogMathRange>MathRange object representing current visible rangepublic AxisNumberFormat getNumberFormat()
public java.text.NumberFormat getCustomNumberFormat()
protected java.text.Format[] getFormats()
AnalogAxisMapper
getFormats in class AnalogAxisMapper<LogMathRange>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||