From 1c86a3afa83fe76d3716cce0550afba9c05e13f5 Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Sun, 20 Nov 2011 21:42:00 +0000 Subject: [PATCH] Small tidies and warning fixes. git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@4179 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/src/userinterface/GUIComputationThread.java | 13 ++++++------- prism/src/userinterface/GUIPlugin.java | 2 ++ .../src/userinterface/properties/GUIExperiment.java | 6 ++---- .../properties/GUIExperimentTable.java | 7 +++++-- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/prism/src/userinterface/GUIComputationThread.java b/prism/src/userinterface/GUIComputationThread.java index 5a8b09cc..4dbde8a8 100644 --- a/prism/src/userinterface/GUIComputationThread.java +++ b/prism/src/userinterface/GUIComputationThread.java @@ -28,8 +28,9 @@ package userinterface; import prism.*; -// provides a few convenience methods for the various computation/*Thread classes - +/** + * Class providing a few convenience methods for the various computation/*Thread classes. + */ public class GUIComputationThread extends Thread { protected GUIPlugin plug; @@ -42,14 +43,14 @@ public class GUIComputationThread extends Thread prism = plug.getPrism(); } - // report an error (in log and popup dialog) + /** Report an error (in log and popup dialog) */ public void error(String s) { errorLog(s); errorDialog(s); } - // report an error (in log) + /** Report an error (in log) */ public void errorLog(String s) { logln("\nError: " + s + "."); @@ -73,11 +74,9 @@ public class GUIComputationThread extends Thread public void logln(boolean b) { plug.logln(b); } public void logWarning(String s) { plug.logWarning(s); } - // pop up an error dialog + /** pop up an error dialog */ public void errorDialog(String s) { plug.error(s); } } - - diff --git a/prism/src/userinterface/GUIPlugin.java b/prism/src/userinterface/GUIPlugin.java index c88cc51b..f5f6cc17 100644 --- a/prism/src/userinterface/GUIPlugin.java +++ b/prism/src/userinterface/GUIPlugin.java @@ -66,6 +66,8 @@ import userinterface.util.*; */ public abstract class GUIPlugin extends JPanel implements GUIEventListener, PrismSettingsListener { + private static final long serialVersionUID = 1L; + //ATTRIBUTES private GUIPrism gui; private Prism prism; diff --git a/prism/src/userinterface/properties/GUIExperiment.java b/prism/src/userinterface/properties/GUIExperiment.java index b3c47a63..7ae14c39 100644 --- a/prism/src/userinterface/properties/GUIExperiment.java +++ b/prism/src/userinterface/properties/GUIExperiment.java @@ -45,7 +45,6 @@ public class GUIExperiment private GUIMultiProperties guiProp; private GUIExperimentTable table; private prism.ResultsCollection results; - private String modString; private boolean finished = false; private ModulesFile mod; @@ -63,7 +62,7 @@ public class GUIExperiment private Result res; /** Creates a new instance of GUIExperiment */ - public GUIExperiment(GUIExperimentTable table, GUIMultiProperties guiProp, PropertiesFile prop, UndefinedConstants cons, ModulesFile mod, String modString, + public GUIExperiment(GUIExperimentTable table, GUIMultiProperties guiProp, PropertiesFile prop, UndefinedConstants cons, ModulesFile mod, boolean useSimulation) { this.table = table; @@ -71,7 +70,6 @@ public class GUIExperiment this.prop = prop; this.cons = cons; this.mod = mod; - this.modString = modString; this.useSimulation = useSimulation; results = new prism.ResultsCollection(cons, prop.getProperty(0).getResultName()); @@ -89,7 +87,7 @@ public class GUIExperiment return results.getCurrentIteration(); } - public Vector getRangingConstants() + public Vector getRangingConstants() { return cons.getRangingConstants(); } diff --git a/prism/src/userinterface/properties/GUIExperimentTable.java b/prism/src/userinterface/properties/GUIExperimentTable.java index 17bc62f4..4e081625 100644 --- a/prism/src/userinterface/properties/GUIExperimentTable.java +++ b/prism/src/userinterface/properties/GUIExperimentTable.java @@ -37,6 +37,8 @@ import prism.*; public class GUIExperimentTable extends JTable { + private static final long serialVersionUID = 1L; + private ExperimentTableModel expModel; private GUIMultiProperties guiProps; @@ -67,11 +69,10 @@ public class GUIExperimentTable extends JTable removeExperiment(row); } } - public int newExperiment(PropertiesFile propFile, UndefinedConstants cons, ModulesFile mf, boolean useSimulation)//propFile only contains 1 con { - GUIExperiment ge = new GUIExperiment(this, guiProps, propFile, cons, mf, "", useSimulation); + GUIExperiment ge = new GUIExperiment(this, guiProps, propFile, cons, mf, useSimulation); return expModel.addExperiment(ge); } @@ -115,6 +116,8 @@ public class GUIExperimentTable extends JTable class ExperimentTableModel extends AbstractTableModel { + private static final long serialVersionUID = 1L; + ArrayList experiments; public ExperimentTableModel()