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

refactor some names

parent 057c1849
Branches
No related tags found
No related merge requests found
......@@ -29,10 +29,10 @@ public class Styler_Pie extends Styler {
private ChartPieSeriesRenderStyle chartPieSeriesRenderStyle;
private double pieFillPercentage;
private double pieSize;
private boolean isCircular;
private double startAngleInDegrees;
private Font pieFont;
private Font annotationFont;
private double annotationDistance;
/**
......@@ -48,9 +48,9 @@ public class Styler_Pie extends Styler {
protected void setAllStyles() {
chartPieSeriesRenderStyle = ChartPieSeriesRenderStyle.Pie; // set default to pie, donut may be a future one
pieFillPercentage = theme.getPieFillPercentage();
pieSize = theme.getPieSize();
isCircular = theme.isCircular();
pieFont = theme.getPieFont();
annotationFont = theme.getPieFont();
annotationDistance = theme.getAnnotationDistance();
}
......@@ -69,19 +69,19 @@ public class Styler_Pie extends Styler {
this.chartPieSeriesRenderStyle = chartPieSeriesRenderStyle;
}
public double getPieFillPercentage() {
public double getPieSize() {
return pieFillPercentage;
return pieSize;
}
/**
* Sets the amount of space that the pie chart fills. Full fill is 100%, i.e. 1.0
*
* @param pieFillPercentage
* @param pieSize
*/
public void setPieFillPercentage(double pieFillPercentage) {
public void setPieSize(double pieSize) {
this.pieFillPercentage = pieFillPercentage;
this.pieSize = pieSize;
}
public boolean isCircular() {
......@@ -114,9 +114,9 @@ public class Styler_Pie extends Styler {
this.startAngleInDegrees = startAngleInDegrees;
}
public Font getPieFont() {
public Font getAnnotationFont() {
return pieFont;
return annotationFont;
}
/**
......@@ -124,9 +124,9 @@ public class Styler_Pie extends Styler {
*
* @param pieFont
*/
public void setPieFont(Font pieFont) {
public void setAnnotationFont(Font pieFont) {
this.pieFont = pieFont;
this.annotationFont = pieFont;
}
public double getAnnotationDistance() {
......
......@@ -72,7 +72,7 @@ public class PlotContent_Pie<ST extends Styler, S extends Series> extends PlotCo
g.setClip(bounds.createIntersection(rectangle));
// pie bounds
double pieFillPercentage = stylerPie.getPieFillPercentage();
double pieFillPercentage = stylerPie.getPieSize();
// if (stylerPie.isCircular()) {
//
......@@ -127,7 +127,7 @@ public class PlotContent_Pie<ST extends Styler, S extends Series> extends PlotCo
// draw percentage on slice
double percentage = y.doubleValue() / total * 100;
TextLayout textLayout = new TextLayout(df.format(percentage) + "%", stylerPie.getPieFont(), new FontRenderContext(null, true, false));
TextLayout textLayout = new TextLayout(df.format(percentage) + "%", stylerPie.getAnnotationFont(), new FontRenderContext(null, true, false));
Rectangle2D percentageRectangle = textLayout.getBounds();
double xCenter = pieBounds.getX() + pieBounds.getWidth() / 2 - percentageRectangle.getWidth() / 2;
......
......@@ -134,7 +134,7 @@ public interface Theme_ extends SeriesMarkers, SeriesLines, SeriesColors {
// Pie Charts ///////////////////////////////
public double getPieFillPercentage();
public double getPieSize();
public boolean isCircular();
......
......@@ -337,7 +337,7 @@ public class Theme_GGPlot2 implements Theme_ {
// Pie Charts ///////////////////////////////
@Override
public double getPieFillPercentage() {
public double getPieSize() {
return .90;
}
......
......@@ -341,7 +341,7 @@ public class Theme_Matlab implements Theme_ {
// Pie Charts ///////////////////////////////
@Override
public double getPieFillPercentage() {
public double getPieSize() {
return .90;
}
......
......@@ -337,7 +337,7 @@ public class Theme_XChart implements Theme_ {
// Pie Charts ///////////////////////////////
@Override
public double getPieFillPercentage() {
public double getPieSize() {
return .90;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment