Q
- The pixel colour representationpublic abstract class AxisRenderer<Q> extends Object
Modifier and Type | Field and Description |
---|---|
protected AxisConfig<Q> |
config
The axis configuration
|
Constructor and Description |
---|
AxisRenderer() |
Modifier and Type | Method and Description |
---|---|
abstract void |
drawAxis(AxisConfig<Q> config)
Draw the major axis
|
abstract void |
drawAxisLabel(AxisConfig<Q> config)
Draw the axis label
|
abstract void |
drawMajorTick(double location,
AxisConfig<Q> config)
Draw a tick on the axis at the given location
|
abstract void |
drawMajorTickGridline(double location,
AxisConfig<Q> config)
Draw a major grid line on the vis
|
abstract void |
drawMinorTick(double location,
AxisConfig<Q> config)
Draw a minor tick on the axis
|
abstract void |
drawMinorTickGridline(double location,
AxisConfig<Q> config)
Draw a minor grid on the vis
|
AxisConfig<Q> |
getConfig() |
double |
nearestHigherMajorTick(double value)
Find the nearest higher major tick mark to the given value.
|
double |
nearestLowerMajorTick(double value)
Find the nearest lower major tick mark to the given value.
|
void |
precalc()
Perform any precalculations that will allow the axes to
be drawn faster, or to allow the data transformer to work.
|
void |
renderAxis() |
void |
setConfig(AxisConfig<Q> config) |
protected AxisConfig<Q> config
public AxisRenderer()
public abstract void drawAxis(AxisConfig<Q> config)
config
- The axis configurationpublic abstract void drawAxisLabel(AxisConfig<Q> config)
config
- The axis configurationpublic abstract void drawMajorTick(double location, AxisConfig<Q> config)
location
- The location (in data units)config
- The configpublic abstract void drawMajorTickGridline(double location, AxisConfig<Q> config)
location
- The location (in data units)config
- The configpublic abstract void drawMinorTick(double location, AxisConfig<Q> config)
location
- The location (in data units)config
- The configurationpublic abstract void drawMinorTickGridline(double location, AxisConfig<Q> config)
location
- The location (in data units)config
- The axis configurationpublic double nearestLowerMajorTick(double value)
value
- The given valuepublic double nearestHigherMajorTick(double value)
value
- The given valuepublic void precalc()
public void renderAxis()
public AxisConfig<Q> getConfig()
public void setConfig(AxisConfig<Q> config)
config
- the config to set