Skip to content
Snippets Groups Projects
Commit 6225cbae authored by Tim Molter's avatar Tim Molter
Browse files

rename AxisTickCalculator sub classes

parent b524bcb8
No related branches found
Tags
No related merge requests found
......@@ -350,21 +350,20 @@ public class Axis implements ChartPart {
if (getChartInternal().getChartInternalType() == ChartInternalType.Category) {
// pass in axis type instead of ChartInternal
List<?> categories = (List<?>) getChartInternal().getSeriesMap().values().iterator().next().getXData();
AxisType axisType = getChartInternal().getAxisPair().getXAxis().getAxisType();
return new AxisTickCategoryChartCalculator(getDirection(), workingSpace, categories, axisType, getChartInternal().getStyleManager());
return new AxisTickCalculator_Category(getDirection(), workingSpace, categories, axisType, getChartInternal().getStyleManager());
}
else if (getChartInternal().getChartInternalType() == ChartInternalType.XY && getAxisType() == AxisType.Date) {
return new AxisTickDateCalculator(getDirection(), workingSpace, getChartInternal().getxAxisMin(), getChartInternal().getxAxisMax(), getChartInternal().getStyleManager());
return new AxisTickCalculator_Date(getDirection(), workingSpace, getChartInternal().getxAxisMin(), getChartInternal().getxAxisMax(), getChartInternal().getStyleManager());
}
else if (getChartInternal().getStyleManager().isXAxisLogarithmic()) {
return new AxisTickLogarithmicCalculator(getDirection(), workingSpace, getChartInternal().getxAxisMin(), getChartInternal().getxAxisMax(), getChartInternal().getStyleManager());
return new AxisTickCalculator_Logarithmic(getDirection(), workingSpace, getChartInternal().getxAxisMin(), getChartInternal().getxAxisMax(), getChartInternal().getStyleManager());
}
else {
return new AxisTickNumberCalculator(getDirection(), workingSpace, getChartInternal().getxAxisMin(), getChartInternal().getxAxisMax(), getChartInternal().getStyleManager());
return new AxisTickCalculator_Number(getDirection(), workingSpace, getChartInternal().getxAxisMin(), getChartInternal().getxAxisMax(), getChartInternal().getStyleManager());
}
}
......@@ -374,10 +373,10 @@ public class Axis implements ChartPart {
if (getChartInternal().getStyleManager().isYAxisLogarithmic() && getAxisType() != AxisType.Date) {
return new AxisTickLogarithmicCalculator(getDirection(), workingSpace, getChartInternal().getyAxisMin(), getChartInternal().getyAxisMax(), getChartInternal().getStyleManager());
return new AxisTickCalculator_Logarithmic(getDirection(), workingSpace, getChartInternal().getyAxisMin(), getChartInternal().getyAxisMax(), getChartInternal().getStyleManager());
}
else {
return new AxisTickNumberCalculator(getDirection(), workingSpace, getChartInternal().getyAxisMin(), getChartInternal().getyAxisMax(), getChartInternal().getStyleManager());
return new AxisTickCalculator_Number(getDirection(), workingSpace, getChartInternal().getyAxisMin(), getChartInternal().getyAxisMax(), getChartInternal().getStyleManager());
}
}
......
......@@ -31,18 +31,18 @@ import org.knowm.xchart.internal.chartpart.Axis.Direction;
*
* @author timmolter
*/
public class AxisTickCategoryChartCalculator extends AxisTickCalculator {
public class AxisTickCalculator_Category extends AxisTickCalculator {
/**
* Constructor
*
* @param axisDirection
* @param workingSpace
* @param minValue
* @param maxValue
* @param categories
* @param axisType
* @param styleManager
*/
public AxisTickCategoryChartCalculator(Direction axisDirection, double workingSpace, List<?> categories, AxisType axisType, StyleManager styleManager) {
public AxisTickCalculator_Category(Direction axisDirection, double workingSpace, List<?> categories, AxisType axisType, StyleManager styleManager) {
super(axisDirection, workingSpace, Double.NaN, Double.NaN, styleManager);
......
......@@ -30,7 +30,7 @@ import org.knowm.xchart.internal.chartpart.Axis.Direction;
*
* @author timmolter
*/
public class AxisTickDateCalculator extends AxisTickCalculator {
public class AxisTickCalculator_Date extends AxisTickCalculator {
private static final long MILLIS_SCALE = TimeUnit.MILLISECONDS.toMillis(1L);
private static final long SEC_SCALE = TimeUnit.SECONDS.toMillis(1L);
......@@ -108,7 +108,7 @@ public class AxisTickDateCalculator extends AxisTickCalculator {
* @param maxValue
* @param styleManager
*/
public AxisTickDateCalculator(Direction axisDirection, double workingSpace, double minValue, double maxValue, StyleManager styleManager) {
public AxisTickCalculator_Date(Direction axisDirection, double workingSpace, double minValue, double maxValue, StyleManager styleManager) {
super(axisDirection, workingSpace, minValue, maxValue, styleManager);
......
......@@ -27,7 +27,7 @@ import org.knowm.xchart.internal.chartpart.Axis.Direction;
*
* @author timmolter
*/
public class AxisTickLogarithmicCalculator extends AxisTickCalculator {
public class AxisTickCalculator_Logarithmic extends AxisTickCalculator {
NumberFormatter numberFormatter = null;
......@@ -40,7 +40,7 @@ public class AxisTickLogarithmicCalculator extends AxisTickCalculator {
* @param maxValue
* @param styleManager
*/
public AxisTickLogarithmicCalculator(Direction axisDirection, double workingSpace, double minValue, double maxValue, StyleManager styleManager) {
public AxisTickCalculator_Logarithmic(Direction axisDirection, double workingSpace, double minValue, double maxValue, StyleManager styleManager) {
super(axisDirection, workingSpace, minValue, maxValue, styleManager);
numberFormatter = new NumberFormatter(styleManager);
......
......@@ -28,7 +28,7 @@ import org.knowm.xchart.internal.chartpart.Axis.Direction;
*
* @author timmolter
*/
public class AxisTickNumberCalculator extends AxisTickCalculator {
public class AxisTickCalculator_Number extends AxisTickCalculator {
NumberFormatter numberFormatter = null;
......@@ -41,7 +41,7 @@ public class AxisTickNumberCalculator extends AxisTickCalculator {
* @param maxValue
* @param styleManager
*/
public AxisTickNumberCalculator(Direction axisDirection, double workingSpace, double minValue, double maxValue, StyleManager styleManager) {
public AxisTickCalculator_Number(Direction axisDirection, double workingSpace, double minValue, double maxValue, StyleManager styleManager) {
super(axisDirection, workingSpace, minValue, maxValue, styleManager);
numberFormatter = new NumberFormatter(styleManager);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment