diff --git a/Semester 3/Assignments/MP1_FX_CalebFontenot/nbproject/project.properties b/Semester 3/Assignments/MP1_FX_CalebFontenot/nbproject/project.properties index 5743833..0a20097 100644 --- a/Semester 3/Assignments/MP1_FX_CalebFontenot/nbproject/project.properties +++ b/Semester 3/Assignments/MP1_FX_CalebFontenot/nbproject/project.properties @@ -116,7 +116,7 @@ manifest.file=manifest.mf meta.inf.dir=${src.dir}/META-INF mkdist.disabled=false native.bundling.enabled=false -platform.active=JDK_8__System_ +platform.active=JDK_1.8 run.classpath=\ ${dist.jar}:\ ${javac.classpath}:\ diff --git a/Semester 3/Assignments/MP1_FX_CalebFontenot/src/mp1_fx_calebfontenot/PieChart.java b/Semester 3/Assignments/MP1_FX_CalebFontenot/src/mp1_fx_calebfontenot/PieChart.java index a0dcfb0..39fce31 100644 --- a/Semester 3/Assignments/MP1_FX_CalebFontenot/src/mp1_fx_calebfontenot/PieChart.java +++ b/Semester 3/Assignments/MP1_FX_CalebFontenot/src/mp1_fx_calebfontenot/PieChart.java @@ -24,18 +24,19 @@ public class PieChart extends Application { // Create pane Pane pane = new Pane(); ArrayList pie = new ArrayList(); - float[] pieValues = {0.0f, 10.0f, 20.0f, 40.0f, 30.0f}; + float[] pieValues = {20.0f, 10.0f, 20.0f, 40.0f, 30.0f}; // First value controls the initial angle int j = 1; - float angle = 0.0f; + float startAngle = 0.0f; + final float PIE_SIZE = 200.0f; for (int i = 0; i < 4; i++) { - angle = angle + toDegrees(pieValues[j]); + startAngle = startAngle + toDegrees(pieValues[i]); System.out.println("i:" + toDegrees(pieValues[i]) + " j: " + toDegrees(pieValues[j])); Arc pieSlice = new Arc(); - pieSlice.setCenterX(100.0f); - pieSlice.setCenterY(100.0f); - pieSlice.setRadiusX(100.0f); - pieSlice.setRadiusY(100.0f); - pieSlice.setStartAngle(toDegrees(pieValues[i])); //toDegrees(pieValues[i]) + pieSlice.setCenterX(PIE_SIZE); + pieSlice.setCenterY(PIE_SIZE); + pieSlice.setRadiusX(PIE_SIZE); + pieSlice.setRadiusY(PIE_SIZE); + pieSlice.setStartAngle(startAngle); //toDegrees(pieValues[i]) pieSlice.setLength(toDegrees(pieValues[j++])); pieSlice.setType(ArcType.ROUND); pie.add(pieSlice);