Bugfixes
This commit is contained in:
+5
-14
@@ -1,4 +1,4 @@
|
||||
package weerstation;
|
||||
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -11,28 +11,19 @@ public class GraadDagen extends Grootheid{
|
||||
public GraadDagen(Measurement measurement1, ArrayList<Measurement> measurement2){
|
||||
list = new ArrayList<Double>();
|
||||
graadDagen = 0;
|
||||
updateRecent(measurement1);
|
||||
updatePeriod(measurement2);
|
||||
}
|
||||
|
||||
|
||||
public void updateRecent(Measurement measurement1){
|
||||
setCurrent(measurement1.getOutsideTemp());
|
||||
}
|
||||
public void updatePeriod(ArrayList<Measurement> measurement2){
|
||||
createList(measurement2);
|
||||
|
||||
createList(measurement2);
|
||||
graadDagen = StatisticsCalculator.graadDagen(list);
|
||||
}
|
||||
|
||||
public void display(){
|
||||
GUIboard.writePageToMatrix("Aantal Graaddagen", graadDagen + "", "", true, true);
|
||||
public void display(String periode, boolean knop1, boolean knop2){
|
||||
GUIboard.writePageToMatrix("Aantal Graaddagen", graadDagen + "", periode, knop1, knop2);
|
||||
}
|
||||
|
||||
public void displayGraph()
|
||||
{
|
||||
display();
|
||||
}
|
||||
public void displayGraph(){}
|
||||
|
||||
private void createList(ArrayList<Measurement> measurement2)
|
||||
{
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
package weerstation;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -124,7 +124,7 @@ public class Grootheid
|
||||
|
||||
}
|
||||
|
||||
public void display(String periodname, Boolean p, Boolean s){
|
||||
public void display(String periodname, boolean p, boolean s){
|
||||
GUIboard.clearLeft();
|
||||
GUIboard.clearRight();
|
||||
GUIboard.clearTop();
|
||||
@@ -148,7 +148,7 @@ public class Grootheid
|
||||
GUIboard.writePageToMatrix(getName(), period.toString(), periodname, p, s);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void displayGraph()
|
||||
{
|
||||
GUIboard.writeGraphToMatrix(list, getMin(), getMax());
|
||||
|
||||
@@ -12,8 +12,5 @@ public class LangsteHittegolfPeriode extends Grootheid{
|
||||
setPeriod(StatisticsCalculator.langsteHittegolfPeriode(list));
|
||||
}
|
||||
|
||||
public void displayGraph()
|
||||
{
|
||||
}
|
||||
|
||||
public void displayGraph(){}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package weerstation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class LangsteRegenPeriode extends Grootheid{
|
||||
@@ -9,30 +9,21 @@ public class LangsteRegenPeriode extends Grootheid{
|
||||
public LangsteRegenPeriode(Measurement measurement1, ArrayList<Measurement> measurement2){
|
||||
list = new ArrayList<Double>();
|
||||
regenPeriode = new Periode("Regen");
|
||||
updateRecent(measurement1);
|
||||
update24Hour(measurement2);
|
||||
}
|
||||
|
||||
|
||||
public void updateRecent(Measurement measurement1){
|
||||
setCurrent(measurement1.getOutsideTemp());
|
||||
}
|
||||
public void update24Hour(ArrayList<Measurement> measurement2){
|
||||
createList(measurement2);
|
||||
|
||||
int[] index = StatisticsCalculator.langsteRegenPeriode(list);
|
||||
regenPeriode = Calculator.timeStampToPeriode( measurement2.get(index[0]).getDateStamp(), measurement2.get(index[1]).getDateStamp());
|
||||
}
|
||||
|
||||
public void display()
|
||||
public void display(String periode, boolean knop1, boolean knop2)
|
||||
{
|
||||
GUIboard.writePageToMatrix("Langste Regen Periode", regenPeriode.toString(), "", true, true);
|
||||
GUIboard.writePageToMatrix("Langste Regen Periode", regenPeriode.toString(), periode, knop1, knop2);
|
||||
}
|
||||
|
||||
public void displayGraph()
|
||||
{
|
||||
display();
|
||||
}
|
||||
public void displayGraph(){}
|
||||
|
||||
private void createList(ArrayList<Measurement> measurement2)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package weerstation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class LangsteTempStijgingPeriode extends Grootheid
|
||||
@@ -11,21 +11,13 @@ public class LangsteTempStijgingPeriode extends Grootheid
|
||||
{
|
||||
list = new ArrayList<Double>();
|
||||
StijgingPeriode = new Periode("TempStijgingsperiode");
|
||||
updateRecent(measurement1);
|
||||
updatePeriod(measurement2);
|
||||
}
|
||||
|
||||
|
||||
public void updateRecent(Measurement measurement1)
|
||||
{
|
||||
setCurrent(measurement1.getOutsideTemp());
|
||||
}
|
||||
|
||||
public void updatePeriod(ArrayList<Measurement> measurement2)
|
||||
{
|
||||
createList(measurement2);
|
||||
|
||||
|
||||
int[] index = StatisticsCalculator.langsteTempStijgingPeriode(list);
|
||||
StijgingPeriode= Calculator.timeStampToPeriode( measurement2.get(index[0]).getDateStamp(), measurement2.get(index[1]).getDateStamp());
|
||||
}
|
||||
@@ -35,10 +27,7 @@ public class LangsteTempStijgingPeriode extends Grootheid
|
||||
GUIboard.writePageToMatrix("Langste temp.stijging", StijgingPeriode.toString(), "", true, true);
|
||||
}
|
||||
|
||||
public void displayGraph()
|
||||
{
|
||||
display();
|
||||
}
|
||||
public void displayGraph(){}
|
||||
|
||||
private void createList(ArrayList<Measurement> measurement2)
|
||||
{
|
||||
|
||||
@@ -5,19 +5,17 @@ public class LangsteZomerPeriode extends Grootheid{
|
||||
|
||||
//constructor
|
||||
public LangsteZomerPeriode(Measurement measurement1, ArrayList<Measurement> measurement2){
|
||||
setName("Langste zomerse periode");
|
||||
setName("Zomerse periode");
|
||||
updatePeriod(measurement2);
|
||||
}
|
||||
|
||||
public void updatePeriod(ArrayList<Measurement> measurement2){
|
||||
createList(measurement2);
|
||||
int[] index = StatisticsCalculator.langsteDroogstePeriode(list);
|
||||
int[] index = StatisticsCalculator.langsteZomersePeriode(list);
|
||||
setPeriod(Calculator.timeStampToPeriode( measurement2.get(index[0]).getDateStamp(), measurement2.get(index[1]).getDateStamp()));
|
||||
}
|
||||
|
||||
public void displayGraph()
|
||||
{
|
||||
}
|
||||
public void displayGraph(){}
|
||||
|
||||
private void createList(ArrayList<Measurement> measurement2)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package weerstation1;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class MaximaleRegenPeriode extends Grootheid{
|
||||
@@ -14,11 +14,7 @@ public class MaximaleRegenPeriode extends Grootheid{
|
||||
setCustom(StatisticsCalculator.maximaleRegenPeriode(list) + " ");
|
||||
}
|
||||
|
||||
|
||||
public void displayGraph()
|
||||
{
|
||||
}
|
||||
|
||||
public void displayGraph(){}
|
||||
|
||||
private void createList(ArrayList<Measurement> measurement2)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user