Class DeltaTickProvider<TDeltaCalculator>
Defines a base tick provider class which uses IDeltaCalculator for tick calculations
Inheritance
Inherited Members
Namespace:
Assembly: .dll
Syntax
public abstract class DeltaTickProvider<TDeltaCalculator> extends tickProviders.TickProvider
Type Parameters
Name | Description |
---|---|
TDeltaCalculator |
Constructors
DeltaTickProvider(TDeltaCalculator deltaCalculator)
Creates a new instance of DeltaTickProvider class
Declaration
protected DeltaTickProvider(TDeltaCalculator deltaCalculator)
Parameters
Type | Name | Description |
---|---|---|
TDeltaCalculator | deltaCalculator | The IDeltaCalculator to use with this tick provider |
Fields
MIN_MINOR_DELTA_VALUE
Declaration
protected static final double MIN_MINOR_DELTA_VALUE
Field Value
Type | Description |
---|---|
double |
currentMajorDelta
Declaration
protected double currentMajorDelta
Field Value
Type | Description |
---|---|
double |
currentMinorDelta
Declaration
protected double currentMinorDelta
Field Value
Type | Description |
---|---|
double |
currentVisibleRangeMax
Declaration
protected double currentVisibleRangeMax
Field Value
Type | Description |
---|---|
double |
currentVisibleRangeMin
Declaration
protected double currentVisibleRangeMin
Field Value
Type | Description |
---|---|
double |
Methods
calculateLabelCullingPriority(double tick)
Declaration
protected int calculateLabelCullingPriority(double tick)
Parameters
Type | Name | Description |
---|---|---|
double | tick |
Returns
Type | Description |
---|---|
int |
getDeltaFromRange(TDeltaCalculator deltaCalculator, Comparable<?> min, Comparable<?> max, int minorsPerMajor, int maxAutoTicks)
Given an absolute Axis Min and Max, returns a IAxisDelta instance containing sensible MinorDelta and MajorDelta values
Declaration
protected deltaCalculators.IAxisDelta<?> getDeltaFromRange(TDeltaCalculator deltaCalculator, Comparable<?> min, Comparable<?> max, int minorsPerMajor, int maxAutoTicks)
Parameters
Type | Name | Description |
---|---|---|
TDeltaCalculator | deltaCalculator | |
Comparable<?> | min | The axis VisibleRange min value |
Comparable<?> | max | The axis VisibleRange max value |
int | minorsPerMajor | The number of Minor Delta ticks per Major Tick |
int | maxAutoTicks | The max ticks |
Returns
Type | Description |
---|---|
IAxisDelta<?> | The IAxisDelta instance |
getMajorTickIndex(double tick)
Gets the index of specified major axis tick
Declaration
protected int getMajorTickIndex(double tick)
Parameters
Type | Name | Description |
---|---|---|
double | tick | The major axis tick |
Returns
Type | Description |
---|---|
int | The index of major axis tick |
guardDeltaValues(IRange tickRange, Comparable minorDelta, Comparable majorDelta)
Guards that the tickRange, minor and major delta values are valid. Throws an exception if some of the values is invalid.
Declaration
protected final void guardDeltaValues(IRange tickRange, Comparable minorDelta, Comparable majorDelta)
Parameters
Type | Name | Description |
---|---|---|
IRange | tickRange | The Axis Visible Range |
Comparable | minorDelta | The minor delta value |
Comparable | majorDelta | The major delta value |
isFirstMajorTickEven(DoubleValues majorTicks)
Gets the value indicating whether the first major tick is even
Declaration
protected boolean isFirstMajorTickEven(DoubleValues majorTicks)
Parameters
Type | Name | Description |
---|---|---|
DoubleValues | majorTicks |
Returns
Type | Description |
---|---|
boolean |
Overrides
isParamsValid(IRange tickRange, Comparable minorDelta, Comparable majorDelta)
Checks whether provided parameters are valid for this tick provider
Declaration
protected boolean isParamsValid(IRange tickRange, Comparable minorDelta, Comparable majorDelta)
Parameters
Type | Name | Description |
---|---|---|
IRange | tickRange | The Axis Visible Range |
Comparable | minorDelta | The minor delta value |
Comparable | majorDelta | The major delta value |
Returns
Type | Description |
---|---|
boolean | True if params are valid for this tick provider |
updateCullingPriorities(IntegerValues cullingPriorities, DoubleValues majorTicks)
Updates major tick culling priorities which are used during culling of axis tick labels
Declaration
protected void updateCullingPriorities(IntegerValues cullingPriorities, DoubleValues majorTicks)
Parameters
Type | Name | Description |
---|---|---|
IntegerValues | cullingPriorities | |
DoubleValues | majorTicks |
Overrides
updateInternal()
Updates tick provider
Declaration
public void updateInternal()