M
- the data type of the axisV
- the variable type of axispublic abstract class CartesianAxis<M,V> extends Axis<M,V>
Modifier and Type | Field and Description |
---|---|
protected int |
minorTickSteps
The number of small ticks between two major ticks.
|
protected Chart.Position |
position |
protected List<PrecisePoint> |
ticks |
axisConfig, bbox, chart, displayGrid, from, hidden, labelConfig, labelNames, labelProvider, labels, lastIndex, lines, steps, titleConfig, titleSprite, to, toolTip, toolTipConfig, x, y
Constructor and Description |
---|
CartesianAxis()
Create a Cartesian axis.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
applyData()
Applies the field data to the labels of the axis.
|
void |
clear()
Removes all the sprites of the axis from the surface.
|
protected abstract void |
createLabels()
Creates the list of labels to display.
|
void |
drawAxis(boolean init)
Renders the axis into the screen and updates it's position.
|
void |
drawLabels()
Renders the labels in the axes.
|
int |
getDashSize()
Returns the dash size of the axis.
|
double |
getDepth()
Returns the depth of the axis.
|
PathSprite |
getGridDefaultConfig()
Returns the config for the default axis grid.
|
PathSprite |
getGridEvenConfig()
Returns the config for the grid on the even indices.
|
PathSprite |
getGridOddConfig()
Returns the config for the grid on the odd indices.
|
double |
getHeight()
Returns the height of the axis.
|
int |
getLabelStepRatio()
Returns the number of tick marks per label.
|
double |
getLabelTolerance()
Returns the intersection tolerance of labels on the axis.
|
double |
getLength()
Returns the length of the axis.
|
int |
getMinorTickSteps()
Returns the number of ticks between major ticks.
|
Chart.Position |
getPosition()
Returns the
Chart.Position of the axis. |
int |
getTextLabelPadding()
Returns the padding between labels on the axis.
|
double |
getWidth()
Returns the width of the axis.
|
boolean |
isLabelOverlapHiding()
Returns whether or not the axis uses label hiding.
|
void |
setDashSize(int dashSize)
Sets the dash size of the axis.
|
void |
setDepth(double depth)
Sets the depth of the axis.
|
void |
setGridDefaultConfig(PathSprite defaultGridConfig)
Sets the config for the default axis grid.
|
void |
setGridEvenConfig(PathSprite gridEvenConfig)
Sets the config for the grid on the even indices.
|
void |
setGridOddConfig(PathSprite gridOddConfig)
Sets the config for the grid on the odd indices.
|
void |
setHeight(double height)
Sets the height of the axis.
|
void |
setLabelOverlapHiding(boolean labelOverlapHiding)
Sets whether or not the axis uses label hiding.
|
void |
setLabelPadding(int textLabelPadding)
Sets the padding between labels on the axis.
|
void |
setLabelStepRatio(int labelStepRatio)
Sets the number of tick marks per label.
|
void |
setLabelTolerance(double labelTolerance)
Sets the intersection tolerance of labels on the axis.
|
void |
setLength(double length)
Sets the length of the axis.
|
void |
setMinorTickSteps(int minorTickSteps)
Sets the number of ticks between major ticks.
|
void |
setPosition(Chart.Position position)
Sets the
Chart.Position of the axis. |
void |
setWidth(double width)
Sets the width of the axis.
|
addAxisHandler, addAxisItemOutHandler, addAxisItemOverHandler, addAxisItemUpHandler, addAxisSelectionHandler, ensureHandlers, getAxisConfig, getBBox, getChart, getFrom, getLabelConfig, getLabelProvider, getTitleConfig, getTo, getX, getY, isDisplayGrid, isHidden, onMouseDown, onMouseMove, onMouseOut, onMouseUp, removeToolTip, setAxisConfig, setChart, setDisplayGrid, setHidden, setLabelConfig, setLabelProvider, setTitleConfig, setToolTipConfig, setX, setY
protected Chart.Position position
protected int minorTickSteps
protected List<PrecisePoint> ticks
public void clear()
Axis
public void drawAxis(boolean init)
Axis
public void drawLabels()
Axis
drawLabels
in class Axis<M,V>
public int getDashSize()
public double getDepth()
public PathSprite getGridDefaultConfig()
public PathSprite getGridEvenConfig()
public PathSprite getGridOddConfig()
public double getHeight()
public int getLabelStepRatio()
public double getLabelTolerance()
public double getLength()
public int getMinorTickSteps()
public Chart.Position getPosition()
Axis
Chart.Position
of the axis.getPosition
in class Axis<M,V>
public int getTextLabelPadding()
public double getWidth()
public boolean isLabelOverlapHiding()
public void setDashSize(int dashSize)
dashSize
- the dash size of the axispublic void setDepth(double depth)
depth
- the depth of the axispublic void setGridDefaultConfig(PathSprite defaultGridConfig)
defaultGridConfig
- the config for the default axis gridpublic void setGridEvenConfig(PathSprite gridEvenConfig)
gridEvenConfig
- the config for the grid on the even indicespublic void setGridOddConfig(PathSprite gridOddConfig)
gridOddConfig
- the config for the grid on the odd indicespublic void setHeight(double height)
height
- the height of the axispublic void setLabelOverlapHiding(boolean labelOverlapHiding)
labelOverlapHiding
- whether or not the axis uses label hidingpublic void setLabelPadding(int textLabelPadding)
textLabelPadding
- the padding between labels on the axispublic void setLabelStepRatio(int labelStepRatio)
labelStepRatio
- the number of tick marks per labelpublic void setLabelTolerance(double labelTolerance)
labelTolerance
- the intersection tolerance of labels on the axispublic void setLength(double length)
length
- the length of the axispublic void setMinorTickSteps(int minorTickSteps)
minorTickSteps
- the number of ticks between major tickspublic void setPosition(Chart.Position position)
Chart.Position
of the axis.position
- the position of the axispublic void setWidth(double width)
width
- the width of the axisprotected abstract void applyData()
protected abstract void createLabels()
Copyright © 2018. All rights reserved.