Browse Source

Small tidies and warning fixes.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@4179 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 15 years ago
parent
commit
1c86a3afa8
  1. 13
      prism/src/userinterface/GUIComputationThread.java
  2. 2
      prism/src/userinterface/GUIPlugin.java
  3. 6
      prism/src/userinterface/properties/GUIExperiment.java
  4. 7
      prism/src/userinterface/properties/GUIExperimentTable.java

13
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);
}
}

2
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;

6
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<DefinedConstant> getRangingConstants()
{
return cons.getRangingConstants();
}

7
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<GUIExperiment> experiments;
public ExperimentTableModel()

Loading…
Cancel
Save