Browse Source

Code tidy (GUI).

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@2007 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 16 years ago
parent
commit
fca4ce844e
  1. 1206
      prism/src/userinterface/properties/GUIMultiProperties.java
  2. 369
      prism/src/userinterface/properties/GUIPropertiesList.java
  3. 249
      prism/src/userinterface/properties/GUIProperty.java
  4. 8
      prism/src/userinterface/properties/computation/ModelCheckThread.java

1206
prism/src/userinterface/properties/GUIMultiProperties.java
File diff suppressed because it is too large
View File

369
prism/src/userinterface/properties/GUIPropertiesList.java

@ -44,224 +44,264 @@ import prism.*;
public class GUIPropertiesList extends JList implements KeyListener
{
//STATICS
private static int counter = 0;
//ATTRIBUTES
private Prism prism;
private GUIMultiProperties parent;
private DefaultListModel listModel;
private PictureCellRenderer rend;
//CONSTRUCTORS
/** Creates a new instance of GUIPropertiesList */
public GUIPropertiesList(Prism prism, GUIMultiProperties parent)
{
this.prism = prism;
this.parent = parent;
listModel = new DefaultListModel();
setModel(listModel);
rend = new PictureCellRenderer();
setCellRenderer(rend);
addKeyListener(this);
setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK), "none");
}
/** Override set font to update row heights at same time */
public void setFont(Font font)
{
super.setFont(font);
// Note: minimum of 20 since icons are 16x16
if (font != null) setFixedCellHeight(Math.max(20, getFontMetrics(font).getHeight() + 4));
if (font != null)
setFixedCellHeight(Math.max(20, getFontMetrics(font).getHeight() + 4));
}
//ACCESS METHODS
public int getNumProperties()
{
return listModel.size();
}
public GUIProperty getProperty(int index)
/**
* Get the ith property in the list.
*/
public GUIProperty getProperty(int i)
{
return (GUIProperty)listModel.getElementAt(index);
return (GUIProperty) listModel.getElementAt(i);
}
public int getNumValidProperties()
/**
* Check that all properties in the list are valid.
*/
public boolean allPropertiesAreValid()
{
int total = 0;
for(int i = 0; i < getNumProperties(); i++)
{
GUIProperty gp = getProperty(i);
if(gp.isValid()) total++;
for (int i = 0; i < getNumProperties(); i++) {
if (!getProperty(i).isValid())
return false;
}
return total;
return true;
}
/**
* Get the number of properties currently selected in the list.
*/
public int getNumSelectedProperties()
{
return getSelectedIndices().length;
}
public ArrayList getSelectedProperties()
/**
* Get a list of the properties currently selected in the list.
*/
public ArrayList<GUIProperty> getSelectedProperties()
{
ArrayList<GUIProperty> gps = new ArrayList<GUIProperty>();
int[] ind = getSelectedIndices();
ArrayList ps = new ArrayList();
for(int i = 0; i < ind.length; i++)
ps.add(getProperty(ind[i]));
return ps;
for (int i = 0; i < ind.length; i++) {
gps.add(getProperty(ind[i]));
}
return gps;
}
public ArrayList getValidSelectedProperties()
/**
* Check if there are any valid properties currently selected in the list.
*/
public boolean existsValidSelectedProperties()
{
ArrayList gps = new ArrayList();
ArrayList prs = getSelectedProperties();
for(int i = 0; i < prs.size(); i++)
{
GUIProperty gp = (GUIProperty)prs.get(i);
if(gp.isValid())
{
gps.add(gp);
if (parent.getParsedModel() == null)
return false;
int[] ind = getSelectedIndices();
for (int i = 0; i < ind.length; i++) {
if (getProperty(ind[i]).isValid()) {
return true;
}
}
return gps;
return false;
}
public ArrayList getValidSimulatableSelectedProperties()
/**
* Get a list of the valid properties currently selected in the list.
*/
public ArrayList<GUIProperty> getValidSelectedProperties()
{
ArrayList gps = new ArrayList();
if(parent.getParsedModel() == null) return gps;
ArrayList prs = getSelectedProperties();
for(int i = 0; i < prs.size(); i++)
{
GUIProperty gp = (GUIProperty)prs.get(i);
if(gp.isValidForSimulation())
{
ArrayList<GUIProperty> gps = new ArrayList<GUIProperty>();
if (parent.getParsedModel() == null)
return gps;
int[] ind = getSelectedIndices();
for (int i = 0; i < ind.length; i++) {
GUIProperty gp = getProperty(ind[i]);
if (gp.isValid()) {
gps.add(gp);
}
}
}
return gps;
}
/**
* Get a string comprising concatenation of all valid properties currently selected in the list.
*/
public String getValidSelectedString()
{
String str = "";
ArrayList prs = getValidSelectedProperties();
for(int i = 0; i < prs.size(); i++)
{
str += ((GUIProperty)prs.get(i)).getPropString()+"\n";
ArrayList<GUIProperty> gps = getValidSelectedProperties();
for (GUIProperty gp : gps) {
str += gp.getPropString() + "\n";
}
return str;
}
/**
* Check if there are any valid and simulate-able properties currently selected in the list.
*/
public boolean existsValidSimulatableSelectedProperties()
{
if (parent.getParsedModel() == null)
return false;
int[] ind = getSelectedIndices();
for (int i = 0; i < ind.length; i++) {
if (getProperty(ind[i]).isValidForSimulation()) {
return true;
}
}
return false;
}
/**
* Get a list of the valid and simulate-able properties currently selected in the list.
*/
public ArrayList<GUIProperty> getValidSimulatableSelectedProperties()
{
ArrayList<GUIProperty> gps = new ArrayList<GUIProperty>();
if (parent.getParsedModel() == null)
return gps;
int[] ind = getSelectedIndices();
for (int i = 0; i < ind.length; i++) {
GUIProperty gp = getProperty(ind[i]);
if (gp.isValidForSimulation()) {
gps.add(gp);
}
}
return gps;
}
public int getIndexOf(String id)
{
int index = -1;
for(int i = 0; i < getNumProperties(); i++)
{
for (int i = 0; i < getNumProperties(); i++) {
String str = getProperty(i).getID();
if(id.equals(str))
{
if (id.equals(str)) {
index = i;
break;
}
}
return index;
}
//Used for cut and copy
public String getClipboardString()
{
int[]ind = getSelectedIndices();
int[] ind = getSelectedIndices();
String str = "";
for(int i = 0 ; i < ind.length; i++)
{
for (int i = 0; i < ind.length; i++) {
GUIProperty gp = getProperty(i);
str+=gp.getPropString();
if(i != ind.length-1) str+="\n";
str += gp.getPropString();
if (i != ind.length - 1)
str += "\n";
}
return str;
}
/* UPDATE METHODS */
public void addProperty(String propString, String comment)
{
counter++;
GUIProperty gp = new GUIProperty(prism, "PROPERTY"+counter, propString, comment);
GUIProperty gp = new GUIProperty(prism, "PROPERTY" + counter, propString, comment);
gp.parse(parent.getParsedModel(), parent.getConstantsString(), parent.getLabelsString());
listModel.addElement(gp);
}
public void setProperty(int index, String propString, String comment)
{
counter++;
GUIProperty gp = new GUIProperty(prism, "PROPERTY"+counter, propString, comment);
GUIProperty gp = new GUIProperty(prism, "PROPERTY" + counter, propString, comment);
gp.parse(parent.getParsedModel(), parent.getConstantsString(), parent.getLabelsString());
listModel.setElementAt(gp, index);
}
/** Used for pasting */
public void pastePropertiesString(String str)
{
StringTokenizer sto = new StringTokenizer(str, "\n");
while(sto.hasMoreTokens())
{
while (sto.hasMoreTokens()) {
String token = sto.nextToken();
// Make sure it isn't comment we are pasting
if (token.indexOf("//") != 0)
addProperty(token, "");
}
}
public void addPropertiesFile(PropertiesFile pf)
{
for(int i = 0; i < pf.getNumProperties(); i++)
{
for (int i = 0; i < pf.getNumProperties(); i++) {
String str = pf.getProperty(i).toString();
String com = pf.getPropertyComment(i);
addProperty(str, com);
}
}
public boolean deleteProperty(int index)
{
GUIProperty gp = getProperty(index);
if(!gp.isBeingEdited())
{
if (!gp.isBeingEdited()) {
listModel.removeElementAt(index);
return true;
}
else return false;
} else
return false;
}
public void deleteSelected()
{
while(!isSelectionEmpty())
{
while (!isSelectionEmpty()) {
boolean deleted = deleteProperty(getSelectedIndex());
if(!deleted)
{
if (!deleted) {
//if not deleted, unselect, so the rest can!!
int[]ind = getSelectedIndices();
int[]newInd = new int[ind.length-1];
int[] ind = getSelectedIndices();
int[] newInd = new int[ind.length - 1];
int c = 0;
for(int i = 0; i < ind.length; i++)
{
if(ind[i] != getSelectedIndex())
{
for (int i = 0; i < ind.length; i++) {
if (ind[i] != getSelectedIndex()) {
newInd[c] = ind[i];
c++;
}
@ -270,43 +310,41 @@ public class GUIPropertiesList extends JList implements KeyListener
}
}
}
public void deleteAll()
{
selectAll();
deleteSelected();
}
public void selectAll()
{
if(getNumProperties() > 0)
{
setSelectionInterval(0, getNumProperties()-1);
if (getNumProperties() > 0) {
setSelectionInterval(0, getNumProperties() - 1);
}
}
/** Validate all the properties in the list
NB: Don't call it "validate()" to avoid overwriting Swing methods */
public void validateProperties()
{
for(int i = 0; i < getNumProperties(); i++)
{
for (int i = 0; i < getNumProperties(); i++) {
GUIProperty p = getProperty(i);
p.parse(parent.getParsedModel(), parent.getConstantsString(), parent.getLabelsString());
}
// Force repaint because we modified a GUIProperty directly
repaint();
}
// convert to string which can be written to a file
public String toFileString(File f, GUIPropConstantList consList, GUIPropLabelList labList)
{
int numProp;
String s, s2[];
int i, j;
String s;
int i;
s = "";
if (consList.getNumConstants() > 0) {
s += consList.getConstantsString() + "\n";
@ -315,135 +353,116 @@ public class GUIPropertiesList extends JList implements KeyListener
s += labList.getLabelsString() + "\n";
}
numProp = getNumProperties();
for(i = 0; i < numProp; i++)
{
for (i = 0; i < numProp; i++) {
GUIProperty gp = getProperty(i);
if (gp.getComment().length()>0)
if (gp.getComment().length() > 0)
s += PrismParser.slashCommentBlock(gp.getComment());
s += gp.getPropString() + "\n\n";
}
return s;
}
//REQUIRED TO IMPLEMENT KEYLISTENER
public void keyPressed(KeyEvent e)
{
if(e.getModifiers() == KeyEvent.CTRL_MASK)
{
if(e.getKeyCode() == KeyEvent.VK_C)
{
parent.a_copy();
}
else if(e.getKeyCode() == KeyEvent.VK_V)
{
parent.a_paste();
}
else if(e.getKeyCode() == KeyEvent.VK_X)
{
parent.a_cut();
}
else if(e.getKeyCode() == KeyEvent.VK_D)
{
parent.a_delete();
}
else if(e.getKeyCode() == KeyEvent.VK_A)
{
if (e.getModifiers() == KeyEvent.CTRL_MASK) {
if (e.getKeyCode() == KeyEvent.VK_C) {
parent.a_copy();
} else if (e.getKeyCode() == KeyEvent.VK_V) {
parent.a_paste();
} else if (e.getKeyCode() == KeyEvent.VK_X) {
parent.a_cut();
} else if (e.getKeyCode() == KeyEvent.VK_D) {
parent.a_delete();
} else if (e.getKeyCode() == KeyEvent.VK_A) {
parent.a_selectAll();
}
}
}
if(e.getKeyCode() == KeyEvent.VK_DELETE)
{
parent.a_delete();
if (e.getKeyCode() == KeyEvent.VK_DELETE) {
parent.a_delete();
}
}
public void keyReleased(KeyEvent e)
{
}
public void keyTyped(KeyEvent e)
{
}
//RENDERERS
class PictureCellRenderer extends JLabel implements ListCellRenderer
{
String toolTip;
public PictureCellRenderer()
{
toolTip = "";
setOpaque(true);
}
public String getToolTipText()
{
return toolTip;
}
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
{
setBorder(new BottomBorder());
GUIProperty p = getProperty(index);
// tooltip
toolTip = p.getToolTipText();
// text
setText(p.getPropString());
// icon
setIcon(p.getImage());
// foreground/background colours
if(isSelected)
{
if (isSelected) {
setBackground(parent.getSelectionColor());
setForeground(p.isValid() ? Color.black : Color.red);
}
else
{
if(!p.isValid())
{
} else {
if (!p.isValid()) {
setBackground(parent.getWarningColor());
setForeground(Color.red);
}
else
{
} else {
setBackground(Color.white);
setForeground(Color.black);
}
}
if(p.isBeingEdited())
{
if (p.isBeingEdited()) {
setBackground(Color.lightGray);
}
return this;
}
}
class BottomBorder implements javax.swing.border.Border
{
public Insets getBorderInsets(Component c)
{
return new Insets(0,0,0,0);
return new Insets(0, 0, 0, 0);
}
public boolean isBorderOpaque()
{
return true;
}
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
{
g.setColor(Color.lightGray);
g.drawLine(x,(y+height-1), (x+width), (y+height-1));
g.drawLine(x, (y + height - 1), (x + width), (y + height - 1));
}
}
}

249
prism/src/userinterface/properties/GUIProperty.java

@ -27,20 +27,21 @@
//==============================================================================
package userinterface.properties;
import javax.swing.*;
import userinterface.GUIPrism;
import parser.*;
import parser.ast.*;
import prism.*;
import javax.swing.*;
/**
*
* @author ug60axh
* Encapsulates a property in the list in the GUI "Properties" tab.
*/
public class GUIProperty
{
//Constants
/** A property state constant image */
public static final ImageIcon IMAGE_NOT_DONE = GUIPrism.getIconFromImage("smallFilePrism.png");
/** A property state constant image */
@ -55,7 +56,7 @@ public class GUIProperty
public static final ImageIcon IMAGE_INVALID = GUIPrism.getIconFromImage("smallWarning.png");
/** A property state constant image */
public static final ImageIcon IMAGE_NUMBER = GUIPrism.getIconFromImage("smallCompute.png");
/** Property status */
public static final int STATUS_NOT_DONE = 0;
/** Property status */
@ -70,284 +71,284 @@ public class GUIProperty
public static final int STATUS_RESULT_FALSE = 5;
/** Property status */
public static final int STATUS_RESULT_NUMBER = 6;
//ATTRIBUTES
private Prism prism; // Required for parsing
private String id; // Unique ID
private int status; // Status - see constants above
private ImageIcon doingImage; // Image when in DOING state - can be modified externally for animations
private boolean beingEdited; // Is this property currently being edited?
private String propString; // String representing the property
private Expression expr; // The parsed property
private String comment; // The property's comment
private Result result; // Result of model checking etc. (if done, null if not)
private String parseError; // Parse error (if property is invalid)
private String method; // Method used (verification, simulation)
private String constantsString; // Constant values used
private Prism prism; // Required for parsing
private String id; // Unique ID
private int status; // Status - see constants above
private ImageIcon doingImage; // Image when in DOING state - can be modified externally for animations
private boolean beingEdited; // Is this property currently being edited?
private String propString; // String representing the property
private Expression expr; // The parsed property (null if invalid)
private String comment; // The property's comment
private Result result; // Result of model checking etc. (if done, null if not)
private String parseError; // Parse error (if property is invalid)
private String method; // Method used (verification, simulation)
private String constantsString; // Constant values used
/** Creates a new instance of GUIProperty */
public GUIProperty(Prism prism, String id, String propString, String comment)
{
this.prism = prism;
this.id = id;
status = STATUS_NOT_DONE;
doingImage = IMAGE_DOING;
beingEdited = false;
this.propString = propString;
expr = null;
this.comment = comment;
result = null;
parseError = "";
method = "<none>";
constantsString = "<none>";
}
//ACCESS METHODS
public String getID()
{
return id;
}
public int getStatus()
{
return status;
}
public ImageIcon getImage()
{
switch (status) {
case STATUS_NOT_DONE: return IMAGE_NOT_DONE;
case STATUS_DOING: return doingImage;
case STATUS_PARSE_ERROR: return IMAGE_INVALID;
case STATUS_RESULT_ERROR: return IMAGE_ERROR;
case STATUS_RESULT_TRUE: return IMAGE_TICK;
case STATUS_RESULT_FALSE: return IMAGE_CROSS;
case STATUS_RESULT_NUMBER: return IMAGE_NUMBER;
default: return IMAGE_NOT_DONE;
case STATUS_NOT_DONE:
return IMAGE_NOT_DONE;
case STATUS_DOING:
return doingImage;
case STATUS_PARSE_ERROR:
return IMAGE_INVALID;
case STATUS_RESULT_ERROR:
return IMAGE_ERROR;
case STATUS_RESULT_TRUE:
return IMAGE_TICK;
case STATUS_RESULT_FALSE:
return IMAGE_CROSS;
case STATUS_RESULT_NUMBER:
return IMAGE_NUMBER;
default:
return IMAGE_NOT_DONE;
}
}
public boolean isBeingEdited()
{
return beingEdited;
}
public String getPropString()
{
return propString;
}
public Expression getProperty()
{
return expr;
}
public String getComment()
{
return comment;
}
/**
* Is this property valid? i.e. Did it parse OK last time it was parsed?
*/
public boolean isValid()
{
return expr != null;
}
// just a basic check - see if it's a P=? or R=? property
/**
* Is this property both valid (i.e. parsed OK last time it was checked)
* and suitable approximate verification through simulation?
*/
public boolean isValidForSimulation()
{
boolean b = isValid() && (expr instanceof ExpressionProb || expr instanceof ExpressionReward);
if(b)
{
if(expr instanceof ExpressionProb)
{
if ((((ExpressionProb)expr).getProb() != null))
{
if (b) {
if (expr instanceof ExpressionProb) {
if ((((ExpressionProb) expr).getProb() != null)) {
return false;
}
}
else if(expr instanceof ExpressionReward)
{
if ((((ExpressionReward)expr).getReward() != null))
{
} else if (expr instanceof ExpressionReward) {
if ((((ExpressionReward) expr).getReward() != null)) {
return false;
}
}
return true;
}
else return false;
} else
return false;
}
public Result getResult()
{
return result;
}
public String getResultString()
{
return result == null ? "Unknown" : result.getResultString();
}
public String getToolTipText()
{
switch (status) {
case STATUS_DOING: return "In progress...";
case STATUS_PARSE_ERROR: return "Invalid property: " + parseError;
case STATUS_RESULT_ERROR: return getResultString();
default: return "Result: " + getResultString();
case STATUS_DOING:
return "In progress...";
case STATUS_PARSE_ERROR:
return "Invalid property: " + parseError;
case STATUS_RESULT_ERROR:
return getResultString();
default:
return "Result: " + getResultString();
}
}
public String getConstantsString()
{
return constantsString;
}
public String getMethodString()
{
return method;
}
public String toString()
{
return propString;
}
//UPDATE METHODS
public void setStatus(int status)
{
this.status = status;
}
public void setDoingImage(ImageIcon image)
{
doingImage = image;
}
public void setPropString(String propString, ModulesFile m, String constantsString, String labelString)
{
this.propString = propString;
setStatus(STATUS_NOT_DONE);
parse(m, constantsString, labelString);
}
public void setComment(String comment)
{
this.comment = comment;
}
public void setBeingEdited(boolean beingEdited)
{
this.beingEdited = beingEdited;
}
public void setResult(Result res)
{
result = res;
if (result.getResult() instanceof Boolean)
{
if (((Boolean)result.getResult()).booleanValue()) {
if (result.getResult() instanceof Boolean) {
if (((Boolean) result.getResult()).booleanValue()) {
setStatus(STATUS_RESULT_TRUE);
} else {
setStatus(STATUS_RESULT_FALSE);
}
}
else if (result.getResult() instanceof Double)
{
} else if (result.getResult() instanceof Double) {
setStatus(STATUS_RESULT_NUMBER);
}
else if (result.getResult() instanceof Exception)
{
} else if (result.getResult() instanceof Exception) {
setStatus(STATUS_RESULT_ERROR);
}
else
{
} else {
setStatus(STATUS_NOT_DONE);
result = null;
}
}
public void setMethodString(String method)
{
this.method = (method == null) ? "<none>" : method;
}
public void setConstants(Values mfConstants, Values pfConstants)
{
if (mfConstants != null && mfConstants.getNumValues() > 0) {
constantsString = mfConstants.toString();
if (pfConstants != null && pfConstants.getNumValues() > 0)
constantsString += ", " + pfConstants.toString();
}
else if (pfConstants != null && pfConstants.getNumValues() > 0) {
} else if (pfConstants != null && pfConstants.getNumValues() > 0) {
constantsString = pfConstants.toString();
}
else {
} else {
constantsString = "<none>";
}
}
public void parse(ModulesFile m, String constantsString, String labelString)
{
if(propString == null || constantsString == null || labelString == null)
{
if (propString == null || constantsString == null || labelString == null) {
expr = null;
setStatus(STATUS_PARSE_ERROR);
parseError = "(Unexpected) Properties, constants or labels are null";
return;
}
try
{
try {
//Parse constants and labels
boolean couldBeNoConstantsOrLabels = false;
PropertiesFile fConLab = null;
try
{
fConLab = prism.parsePropertiesString(m, constantsString+"\n"+labelString);
}
catch(PrismException e)
{
try {
fConLab = prism.parsePropertiesString(m, constantsString + "\n" + labelString);
} catch (PrismException e) {
couldBeNoConstantsOrLabels = true;
}
//Parse all together
String withConsLabs = constantsString+"\n"+labelString+"\n"+propString;
String withConsLabs = constantsString + "\n" + labelString + "\n" + propString;
PropertiesFile ff = prism.parsePropertiesString(m, withConsLabs);
//Validation of number of properties
if(ff.getNumProperties() == 0) throw new PrismException("Empty Property");
else if(ff.getNumProperties() > 1) throw new PrismException("Contains Multiple Properties");
if (ff.getNumProperties() == 0)
throw new PrismException("Empty Property");
else if (ff.getNumProperties() > 1)
throw new PrismException("Contains Multiple Properties");
//Validation of constants and labels
if(!couldBeNoConstantsOrLabels)
{
if(ff.getConstantList().size() != fConLab.getConstantList().size()) throw new PrismException("Contains constants");
if(ff.getLabelList().size() != fConLab.getLabelList().size()) throw new PrismException("Contains labels");
}
else
{
if(ff.getConstantList().size() != 0) throw new PrismException("Contains constants");
if(ff.getLabelList().size() != 0) throw new PrismException("Contains labels");
if (!couldBeNoConstantsOrLabels) {
if (ff.getConstantList().size() != fConLab.getConstantList().size())
throw new PrismException("Contains constants");
if (ff.getLabelList().size() != fConLab.getLabelList().size())
throw new PrismException("Contains labels");
} else {
if (ff.getConstantList().size() != 0)
throw new PrismException("Contains constants");
if (ff.getLabelList().size() != 0)
throw new PrismException("Contains labels");
}
//Now set the property
expr = ff.getProperty(0);
parseError = "(Unexpected) no error!";
// if status was previously a parse error, reset status.
// otherwise, don't set status - reparse doesn't mean existing results should be lost
if (getStatus() == STATUS_PARSE_ERROR) setStatus(STATUS_NOT_DONE);
}
catch(PrismException ex)
{
if (getStatus() == STATUS_PARSE_ERROR)
setStatus(STATUS_NOT_DONE);
} catch (PrismException ex) {
expr = null;
setStatus(STATUS_PARSE_ERROR);
parseError = ex.getMessage();

8
prism/src/userinterface/properties/computation/ModelCheckThread.java

@ -46,12 +46,12 @@ public class ModelCheckThread extends GUIComputationThread
private GUIMultiProperties parent;
private Model m;
private PropertiesFile prFi;
private ArrayList guiProps;
private ArrayList<GUIProperty> guiProps;
private Values definedMFConstants;
private Values definedPFConstants;
/** Creates a new instance of ModelCheckThread */
public ModelCheckThread(GUIMultiProperties parent, Model m, PropertiesFile prFi, ArrayList guiProps, Values definedMFConstants, Values definedPFConstants)
public ModelCheckThread(GUIMultiProperties parent, Model m, PropertiesFile prFi, ArrayList<GUIProperty> guiProps, Values definedMFConstants, Values definedPFConstants)
{
super(parent);
this.parent = parent;
@ -82,7 +82,7 @@ public class ModelCheckThread extends GUIComputationThread
//Set icon for all properties to be verified to a clock
for(int i = 0; i < guiProps.size(); i++)
{
GUIProperty gp = (GUIProperty)guiProps.get(i);
GUIProperty gp = guiProps.get(i);
gp.setStatus(GUIProperty.STATUS_DOING);
parent.repaintList();
}
@ -92,7 +92,7 @@ public class ModelCheckThread extends GUIComputationThread
for(int i = 0; i < prFi.getNumProperties(); i++)
{
// get property
GUIProperty gp = (GUIProperty)guiProps.get(i);
GUIProperty gp = guiProps.get(i);
// animate it's clock icon
ic = new IconThread(gp);
ic.start();

Loading…
Cancel
Save