|
@@ -17,21 +17,24 @@ public class StatisticGraph extends JPanel {
|
|
private static final long serialVersionUID = 1L;
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
|
// Maximum y Value
|
|
// Maximum y Value
|
|
- float maximum = 0;
|
|
|
|
|
|
+ private float maximum = 0;
|
|
|
|
|
|
// is the Simulation running?
|
|
// is the Simulation running?
|
|
// private boolean isSimRunning;
|
|
// private boolean isSimRunning;
|
|
- GeneralPath path = new GeneralPath();
|
|
|
|
|
|
+ private GeneralPath path = new GeneralPath();
|
|
// model and controller
|
|
// model and controller
|
|
private Model model;
|
|
private Model model;
|
|
private Control controller;
|
|
private Control controller;
|
|
// Graphics2D
|
|
// Graphics2D
|
|
private Graphics2D g2;
|
|
private Graphics2D g2;
|
|
|
|
+
|
|
// Data
|
|
// Data
|
|
private ArrayList<TrackedDataSet> dataSets = new ArrayList<>();
|
|
private ArrayList<TrackedDataSet> dataSets = new ArrayList<>();
|
|
|
|
|
|
private boolean showGrid = true;
|
|
private boolean showGrid = true;
|
|
|
|
|
|
|
|
+ private float DISTANCE_IN_GRAPH = 1.0f;
|
|
|
|
+
|
|
// private JTable table = new JTable();
|
|
// private JTable table = new JTable();
|
|
// private ArrayList<Line2D> gridLines = new ArrayList<>();
|
|
// private ArrayList<Line2D> gridLines = new ArrayList<>();
|
|
|
|
|
|
@@ -41,7 +44,7 @@ public class StatisticGraph extends JPanel {
|
|
* @param model the Model
|
|
* @param model the Model
|
|
* @param control the Controller
|
|
* @param control the Controller
|
|
*/
|
|
*/
|
|
- public StatisticGraph(final Model model, Control control) {
|
|
|
|
|
|
+ StatisticGraph(final Model model, Control control) {
|
|
this.controller = control;
|
|
this.controller = control;
|
|
this.model = model;
|
|
this.model = model;
|
|
this.setBackground(Color.WHITE);
|
|
this.setBackground(Color.WHITE);
|
|
@@ -90,6 +93,7 @@ public class StatisticGraph extends JPanel {
|
|
case TrackedDataSet.ACTIVATED_ELEMENTS:
|
|
case TrackedDataSet.ACTIVATED_ELEMENTS:
|
|
case TrackedDataSet.TOTAL_PRODUCTION:
|
|
case TrackedDataSet.TOTAL_PRODUCTION:
|
|
case TrackedDataSet.TOTAL_CONSUMPTION:
|
|
case TrackedDataSet.TOTAL_CONSUMPTION:
|
|
|
|
+ case TrackedDataSet.WASTED_ENERGY:
|
|
case TrackedDataSet.AMOUNT_HOLONS:
|
|
case TrackedDataSet.AMOUNT_HOLONS:
|
|
case TrackedDataSet.GROUP_CONSUMPTION:
|
|
case TrackedDataSet.GROUP_CONSUMPTION:
|
|
case TrackedDataSet.GROUP_PRODUCTION:
|
|
case TrackedDataSet.GROUP_PRODUCTION:
|
|
@@ -147,7 +151,7 @@ public class StatisticGraph extends JPanel {
|
|
* @param d the number to convert
|
|
* @param d the number to convert
|
|
* @return the converted number
|
|
* @return the converted number
|
|
*/
|
|
*/
|
|
- public double convertToCanvasY(float d) {
|
|
|
|
|
|
+ private double convertToCanvasY(float d) {
|
|
return Math.abs((this.getHeight() - (d * (this.getHeight() / maximum))));
|
|
return Math.abs((this.getHeight() - (d * (this.getHeight() / maximum))));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -170,7 +174,7 @@ public class StatisticGraph extends JPanel {
|
|
/**
|
|
/**
|
|
* Calculate the Max Value of the Graph
|
|
* Calculate the Max Value of the Graph
|
|
*/
|
|
*/
|
|
- public void calcMaximum() {
|
|
|
|
|
|
+ void calcMaximum() {
|
|
maximum = 0;
|
|
maximum = 0;
|
|
for (TrackedDataSet set : dataSets) {
|
|
for (TrackedDataSet set : dataSets) {
|
|
float val = 0;
|
|
float val = 0;
|
|
@@ -205,6 +209,9 @@ public class StatisticGraph extends JPanel {
|
|
val = getMaxTotalConsumption(model.getObjectsOnCanvas());
|
|
val = getMaxTotalConsumption(model.getObjectsOnCanvas());
|
|
val *= -1;
|
|
val *= -1;
|
|
break;
|
|
break;
|
|
|
|
+ case TrackedDataSet.WASTED_ENERGY:
|
|
|
|
+ val = getMaxWastedEnergy(model.getObjectsOnCanvas());
|
|
|
|
+ break;
|
|
case TrackedDataSet.PERCENT_SUPPLIED:
|
|
case TrackedDataSet.PERCENT_SUPPLIED:
|
|
case TrackedDataSet.PERCENT_NOT_SUPPLIED:
|
|
case TrackedDataSet.PERCENT_NOT_SUPPLIED:
|
|
case TrackedDataSet.PERCENT_PARTIAL_SUPPLIED:
|
|
case TrackedDataSet.PERCENT_PARTIAL_SUPPLIED:
|
|
@@ -258,7 +265,7 @@ public class StatisticGraph extends JPanel {
|
|
break;
|
|
break;
|
|
case TrackedDataSet.AVG_CONSUMED_ENERGY_IN_HOLONS:
|
|
case TrackedDataSet.AVG_CONSUMED_ENERGY_IN_HOLONS:
|
|
for (SubNet sub : controller.getSimManager().getSubNets()) {
|
|
for (SubNet sub : controller.getSimManager().getSubNets()) {
|
|
- float tempVal = -getMaxTotalConsumption(new ArrayList<AbstractCpsObject>(sub.getObjects()));
|
|
|
|
|
|
+ float tempVal = -getMaxTotalConsumption(new ArrayList<>(sub.getObjects()));
|
|
if (val < tempVal) {
|
|
if (val < tempVal) {
|
|
val = tempVal;
|
|
val = tempVal;
|
|
}
|
|
}
|
|
@@ -266,7 +273,7 @@ public class StatisticGraph extends JPanel {
|
|
break;
|
|
break;
|
|
case TrackedDataSet.AVG_WASTED_ENERGY_IN_HOLONS:
|
|
case TrackedDataSet.AVG_WASTED_ENERGY_IN_HOLONS:
|
|
for (SubNet sub : controller.getSimManager().getSubNets()) {
|
|
for (SubNet sub : controller.getSimManager().getSubNets()) {
|
|
- float tempVal = getMaxTotalProduction(new ArrayList<AbstractCpsObject>(sub.getObjects()));
|
|
|
|
|
|
+ float tempVal = getMaxTotalProduction(new ArrayList<>(sub.getObjects()));
|
|
if (val < tempVal) {
|
|
if (val < tempVal) {
|
|
val = tempVal;
|
|
val = tempVal;
|
|
}
|
|
}
|
|
@@ -290,7 +297,7 @@ public class StatisticGraph extends JPanel {
|
|
break;
|
|
break;
|
|
case TrackedDataSet.AVG_PRODUCED_ENERGY_IN_HOLONS:
|
|
case TrackedDataSet.AVG_PRODUCED_ENERGY_IN_HOLONS:
|
|
for (SubNet sub : controller.getSimManager().getSubNets()) {
|
|
for (SubNet sub : controller.getSimManager().getSubNets()) {
|
|
- float tempVal = getMaxTotalProduction(new ArrayList<AbstractCpsObject>(sub.getObjects()));
|
|
|
|
|
|
+ float tempVal = getMaxTotalProduction(new ArrayList<>(sub.getObjects()));
|
|
if (val < tempVal) {
|
|
if (val < tempVal) {
|
|
val = tempVal;
|
|
val = tempVal;
|
|
}
|
|
}
|
|
@@ -310,7 +317,7 @@ public class StatisticGraph extends JPanel {
|
|
/**
|
|
/**
|
|
* Add the Current Values to each set
|
|
* Add the Current Values to each set
|
|
*/
|
|
*/
|
|
- public void addValues() {
|
|
|
|
|
|
+ void addValues() {
|
|
for (TrackedDataSet set : dataSets) {
|
|
for (TrackedDataSet set : dataSets) {
|
|
float val = 0;
|
|
float val = 0;
|
|
switch (set.getProperty()) {
|
|
switch (set.getProperty()) {
|
|
@@ -362,6 +369,10 @@ public class StatisticGraph extends JPanel {
|
|
set.setValAt(-getTotalConsumptionAt(model.getObjectsOnCanvas(), model.getCurIteration()),
|
|
set.setValAt(-getTotalConsumptionAt(model.getObjectsOnCanvas(), model.getCurIteration()),
|
|
model.getCurIteration());
|
|
model.getCurIteration());
|
|
break;
|
|
break;
|
|
|
|
+ case TrackedDataSet.WASTED_ENERGY:
|
|
|
|
+ float wasted = getTotalWastedEnergyAt(model.getObjectsOnCanvas(), model.getCurIteration());
|
|
|
|
+ set.setValAt(wasted, model.getCurIteration());
|
|
|
|
+ break;
|
|
case TrackedDataSet.PERCENT_SUPPLIED:
|
|
case TrackedDataSet.PERCENT_SUPPLIED:
|
|
set.setValAt(getPercentState(model.getObjectsOnCanvas(), HolonObject.SUPPLIED),
|
|
set.setValAt(getPercentState(model.getObjectsOnCanvas(), HolonObject.SUPPLIED),
|
|
model.getCurIteration());
|
|
model.getCurIteration());
|
|
@@ -424,7 +435,7 @@ public class StatisticGraph extends JPanel {
|
|
break;
|
|
break;
|
|
case TrackedDataSet.AVG_CONSUMED_ENERGY_IN_HOLONS:
|
|
case TrackedDataSet.AVG_CONSUMED_ENERGY_IN_HOLONS:
|
|
for (SubNet sub : controller.getSimManager().getSubNets()) {
|
|
for (SubNet sub : controller.getSimManager().getSubNets()) {
|
|
- val += -getTotalConsumptionAt(new ArrayList<AbstractCpsObject>(sub.getObjects()),
|
|
|
|
|
|
+ val += -getTotalConsumptionAt(new ArrayList<>(sub.getObjects()),
|
|
model.getCurIteration());
|
|
model.getCurIteration());
|
|
}
|
|
}
|
|
val /= controller.getSimManager().getSubNets().size();
|
|
val /= controller.getSimManager().getSubNets().size();
|
|
@@ -432,9 +443,9 @@ public class StatisticGraph extends JPanel {
|
|
break;
|
|
break;
|
|
case TrackedDataSet.AVG_WASTED_ENERGY_IN_HOLONS:
|
|
case TrackedDataSet.AVG_WASTED_ENERGY_IN_HOLONS:
|
|
for (SubNet sub : controller.getSimManager().getSubNets()) {
|
|
for (SubNet sub : controller.getSimManager().getSubNets()) {
|
|
- val += (getTotalProductionAt(new ArrayList<AbstractCpsObject>(sub.getObjects()),
|
|
|
|
|
|
+ val += (getTotalProductionAt(new ArrayList<>(sub.getObjects()),
|
|
model.getCurIteration())
|
|
model.getCurIteration())
|
|
- + getTotalConsumptionAt(new ArrayList<AbstractCpsObject>(sub.getObjects()),
|
|
|
|
|
|
+ + getTotalConsumptionAt(new ArrayList<>(sub.getObjects()),
|
|
model.getCurIteration()));
|
|
model.getCurIteration()));
|
|
}
|
|
}
|
|
val /= controller.getSimManager().getSubNets().size();
|
|
val /= controller.getSimManager().getSubNets().size();
|
|
@@ -500,7 +511,7 @@ public class StatisticGraph extends JPanel {
|
|
break;
|
|
break;
|
|
case TrackedDataSet.AVG_PRODUCED_ENERGY_IN_HOLONS:
|
|
case TrackedDataSet.AVG_PRODUCED_ENERGY_IN_HOLONS:
|
|
for (SubNet sub : controller.getSimManager().getSubNets()) {
|
|
for (SubNet sub : controller.getSimManager().getSubNets()) {
|
|
- val += getTotalProductionAt(new ArrayList<AbstractCpsObject>(sub.getObjects()),
|
|
|
|
|
|
+ val += getTotalProductionAt(new ArrayList<>(sub.getObjects()),
|
|
model.getCurIteration());
|
|
model.getCurIteration());
|
|
}
|
|
}
|
|
val /= controller.getSimManager().getSubNets().size();
|
|
val /= controller.getSimManager().getSubNets().size();
|
|
@@ -515,7 +526,7 @@ public class StatisticGraph extends JPanel {
|
|
/**
|
|
/**
|
|
* create Path with floats
|
|
* create Path with floats
|
|
*
|
|
*
|
|
- * @param set
|
|
|
|
|
|
+ * @param set tracked data
|
|
*/
|
|
*/
|
|
private void createPathFloats(TrackedDataSet set) {
|
|
private void createPathFloats(TrackedDataSet set) {
|
|
int range = model.getCurIteration(); //to which iteration
|
|
int range = model.getCurIteration(); //to which iteration
|
|
@@ -525,7 +536,7 @@ public class StatisticGraph extends JPanel {
|
|
if (set.getValues()[0] != -1) {
|
|
if (set.getValues()[0] != -1) {
|
|
path.moveTo(0, convertToCanvasY(set.getValues()[0]));
|
|
path.moveTo(0, convertToCanvasY(set.getValues()[0]));
|
|
} else {
|
|
} else {
|
|
- path.moveTo(1 * this.getWidth() / model.getIterations(), convertToCanvasY(set.getValues()[1]));
|
|
|
|
|
|
+ path.moveTo(DISTANCE_IN_GRAPH * this.getWidth() / model.getIterations(), convertToCanvasY(set.getValues()[1]));
|
|
}
|
|
}
|
|
for (int i = 0; i < range; i++) {
|
|
for (int i = 0; i < range; i++) {
|
|
if (set.getValues()[i + 1] != -1) {
|
|
if (set.getValues()[i + 1] != -1) {
|
|
@@ -543,24 +554,24 @@ public class StatisticGraph extends JPanel {
|
|
/**
|
|
/**
|
|
* create Path with booleans(0 and 1)
|
|
* create Path with booleans(0 and 1)
|
|
*
|
|
*
|
|
- * @param set
|
|
|
|
|
|
+ * @param set tracked data
|
|
*/
|
|
*/
|
|
private void createPathBooleans(TrackedDataSet set) {
|
|
private void createPathBooleans(TrackedDataSet set) {
|
|
if (set.getValues()[0] != -1) {
|
|
if (set.getValues()[0] != -1) {
|
|
- path.moveTo(0, convertToCanvasY((float) (set.getValues()[0] * (maximum / 3 * 2)) + (maximum / 6)));
|
|
|
|
|
|
+ path.moveTo(0, convertToCanvasY((set.getValues()[0] * (maximum / 3 * 2)) + (maximum / 6)));
|
|
} else {
|
|
} else {
|
|
- path.moveTo(1 * this.getWidth() / model.getIterations(),
|
|
|
|
- convertToCanvasY((float) (set.getValues()[1] * (maximum / 3 * 2)) + (maximum / 6)));
|
|
|
|
|
|
+ path.moveTo(DISTANCE_IN_GRAPH * this.getWidth() / model.getIterations(),
|
|
|
|
+ convertToCanvasY((set.getValues()[1] * (maximum / 3 * 2)) + (maximum / 6)));
|
|
}
|
|
}
|
|
for (int i = 0; i < model.getCurIteration(); i++) {
|
|
for (int i = 0; i < model.getCurIteration(); i++) {
|
|
controller.addTextToConsole(set.getValues()[i] + "");
|
|
controller.addTextToConsole(set.getValues()[i] + "");
|
|
if (set.getValues()[i + 1] != -1) {
|
|
if (set.getValues()[i + 1] != -1) {
|
|
path.lineTo((i + 1) * this.getWidth() / model.getIterations(),
|
|
path.lineTo((i + 1) * this.getWidth() / model.getIterations(),
|
|
- convertToCanvasY((float) (set.getValues()[i + 1] * (maximum / 3 * 2)) + (maximum / 6)));
|
|
|
|
|
|
+ convertToCanvasY((set.getValues()[i + 1] * (maximum / 3 * 2)) + (maximum / 6)));
|
|
} else {
|
|
} else {
|
|
if (i + 2 < model.getCurIteration()) {
|
|
if (i + 2 < model.getCurIteration()) {
|
|
path.moveTo((i + 2) * this.getWidth() / model.getIterations(),
|
|
path.moveTo((i + 2) * this.getWidth() / model.getIterations(),
|
|
- convertToCanvasY((float) (set.getValues()[i + 2] * (maximum / 3 * 2)) + (maximum / 6)));
|
|
|
|
|
|
+ convertToCanvasY((set.getValues()[i + 2] * (maximum / 3 * 2)) + (maximum / 6)));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -569,13 +580,13 @@ public class StatisticGraph extends JPanel {
|
|
/**
|
|
/**
|
|
* create Path for percent values
|
|
* create Path for percent values
|
|
*
|
|
*
|
|
- * @param set
|
|
|
|
|
|
+ * @param set tracked data
|
|
*/
|
|
*/
|
|
private void createPathPercent(TrackedDataSet set) {
|
|
private void createPathPercent(TrackedDataSet set) {
|
|
if (set.getValues()[0] != -1) {
|
|
if (set.getValues()[0] != -1) {
|
|
path.moveTo(0, convertToCanvasY(set.getValues()[0] * maximum));
|
|
path.moveTo(0, convertToCanvasY(set.getValues()[0] * maximum));
|
|
} else {
|
|
} else {
|
|
- path.moveTo(1 * this.getWidth() / model.getIterations(), convertToCanvasY(set.getValues()[1] * maximum));
|
|
|
|
|
|
+ path.moveTo(DISTANCE_IN_GRAPH * this.getWidth() / model.getIterations(), convertToCanvasY(set.getValues()[1] * maximum));
|
|
}
|
|
}
|
|
for (int i = 0; i < model.getCurIteration(); i++) {
|
|
for (int i = 0; i < model.getCurIteration(); i++) {
|
|
if (set.getValues()[i + 1] != -1) {
|
|
if (set.getValues()[i + 1] != -1) {
|
|
@@ -593,8 +604,6 @@ public class StatisticGraph extends JPanel {
|
|
|
|
|
|
/**
|
|
/**
|
|
* get the max total production of the given Objects
|
|
* get the max total production of the given Objects
|
|
- *
|
|
|
|
- * @param objects List of Objects
|
|
|
|
*/
|
|
*/
|
|
private float getMaxTotalProduction(ArrayList<AbstractCpsObject> objects) {
|
|
private float getMaxTotalProduction(ArrayList<AbstractCpsObject> objects) {
|
|
float val = 0;
|
|
float val = 0;
|
|
@@ -615,8 +624,6 @@ public class StatisticGraph extends JPanel {
|
|
|
|
|
|
/**
|
|
/**
|
|
* get the max total consumption of the given Objects
|
|
* get the max total consumption of the given Objects
|
|
- *
|
|
|
|
- * @param objects List of Objects
|
|
|
|
*/
|
|
*/
|
|
private float getMaxTotalConsumption(ArrayList<AbstractCpsObject> objects) {
|
|
private float getMaxTotalConsumption(ArrayList<AbstractCpsObject> objects) {
|
|
float val = 0;
|
|
float val = 0;
|
|
@@ -635,11 +642,30 @@ public class StatisticGraph extends JPanel {
|
|
return val;
|
|
return val;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
- * get the max total production of the given Objects
|
|
|
|
- *
|
|
|
|
- * @param objects List of Objects
|
|
|
|
- * @param tStep
|
|
|
|
|
|
+ * get the max total wasted energy of the given Objects
|
|
|
|
+ * if it is smaller than 0, return 0
|
|
|
|
+ */
|
|
|
|
+ private float getMaxWastedEnergy(ArrayList<AbstractCpsObject> objects) {
|
|
|
|
+ float val = 0;
|
|
|
|
+
|
|
|
|
+ for (AbstractCpsObject obj : objects) {
|
|
|
|
+ if (obj instanceof HolonObject) {
|
|
|
|
+ for (HolonElement ele : ((HolonObject) obj).getElements()) {
|
|
|
|
+ val += (ele.getEnergy() + ele.getFlexibility()) * ele.getAmount();
|
|
|
|
+ }
|
|
|
|
+ } else if (obj instanceof CpsUpperNode) {
|
|
|
|
+ val += getMaxWastedEnergy(((CpsUpperNode) obj).getNodes());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return val < 0 ? 0 : val;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * get the max total production of the given objects at the given timestep
|
|
*/
|
|
*/
|
|
private float getTotalProductionAt(ArrayList<AbstractCpsObject> objects, int tStep) {
|
|
private float getTotalProductionAt(ArrayList<AbstractCpsObject> objects, int tStep) {
|
|
float val = 0;
|
|
float val = 0;
|
|
@@ -659,10 +685,7 @@ public class StatisticGraph extends JPanel {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * get the total consumption of the given Objects at the given timestep
|
|
|
|
- *
|
|
|
|
- * @param objects List of Objects
|
|
|
|
- * @param tStep
|
|
|
|
|
|
+ * get the total consumption of the given objects at the given timestep
|
|
*/
|
|
*/
|
|
private float getTotalConsumptionAt(ArrayList<AbstractCpsObject> objects, int tStep) {
|
|
private float getTotalConsumptionAt(ArrayList<AbstractCpsObject> objects, int tStep) {
|
|
float val = 0;
|
|
float val = 0;
|
|
@@ -681,6 +704,28 @@ public class StatisticGraph extends JPanel {
|
|
return val;
|
|
return val;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * get the total wasted energy of the given objects at the given timestep
|
|
|
|
+ */
|
|
|
|
+ private float getTotalWastedEnergyAt(ArrayList<AbstractCpsObject> objects, int tStep) {
|
|
|
|
+ float val = 0;
|
|
|
|
+
|
|
|
|
+ for (AbstractCpsObject obj : objects) {
|
|
|
|
+ if (obj instanceof HolonObject) {
|
|
|
|
+ for (HolonElement ele : ((HolonObject) obj).getElements()) {
|
|
|
|
+ if (ele.getActive()) {
|
|
|
|
+ val += ele.getTotalEnergyAtTimeStep(tStep);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else if (obj instanceof CpsUpperNode) {
|
|
|
|
+ val += getTotalWastedEnergyAt(((CpsUpperNode) obj).getNodes(), tStep);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return val;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* get the Percentage of how many objects with the given state are in the
|
|
* get the Percentage of how many objects with the given state are in the
|
|
* given List
|
|
* given List
|
|
@@ -706,13 +751,13 @@ public class StatisticGraph extends JPanel {
|
|
/**
|
|
/**
|
|
* Reset the Graph. Delete all calculated values.
|
|
* Reset the Graph. Delete all calculated values.
|
|
*/
|
|
*/
|
|
- public void resetGraph() {
|
|
|
|
|
|
+ void resetGraph() {
|
|
for (TrackedDataSet s : dataSets) {
|
|
for (TrackedDataSet s : dataSets) {
|
|
s.resetValues();
|
|
s.resetValues();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- protected void hideGrid() {
|
|
|
|
|
|
+ void hideGrid() {
|
|
Graphics g = this.getGraphics();
|
|
Graphics g = this.getGraphics();
|
|
showGrid = false;
|
|
showGrid = false;
|
|
// clear the area
|
|
// clear the area
|
|
@@ -720,7 +765,7 @@ public class StatisticGraph extends JPanel {
|
|
paintComponent(g);
|
|
paintComponent(g);
|
|
}
|
|
}
|
|
|
|
|
|
- protected void showGrid() {
|
|
|
|
|
|
+ void showGrid() {
|
|
Graphics g = this.getGraphics();
|
|
Graphics g = this.getGraphics();
|
|
showGrid = true;
|
|
showGrid = true;
|
|
paintComponent(g);
|
|
paintComponent(g);
|