Browse Source

GUISimPathFormulaeList: fix some warnings

master
Joachim Klein 7 years ago
parent
commit
cbdcde36cb
  1. 12
      prism/src/userinterface/simulator/GUISimPathFormulaeList.java

12
prism/src/userinterface/simulator/GUISimPathFormulaeList.java

@ -35,19 +35,20 @@ import prism.PrismException;
import userinterface.properties.*; import userinterface.properties.*;
import simulator.*; import simulator.*;
public class GUISimPathFormulaeList extends JList
@SuppressWarnings("serial")
public class GUISimPathFormulaeList extends JList<GUISimPathFormulaeList.SimPathFormula>
{ {
private GUISimulator guiSim; private GUISimulator guiSim;
private SimulatorEngine engine; private SimulatorEngine engine;
private DefaultListModel listModel;
private DefaultListModel<SimPathFormula> listModel;
/** Creates a new instance of GUISimPathFormulaeList */ /** Creates a new instance of GUISimPathFormulaeList */
public GUISimPathFormulaeList(GUISimulator guiSim) public GUISimPathFormulaeList(GUISimulator guiSim)
{ {
this.guiSim = guiSim; this.guiSim = guiSim;
this.engine = guiSim.getPrism().getSimulator(); this.engine = guiSim.getPrism().getSimulator();
listModel = new DefaultListModel();
listModel = new DefaultListModel<>();
setModel(listModel); setModel(listModel);
setCellRenderer(new SimPathFormulaRenderer()); setCellRenderer(new SimPathFormulaRenderer());
@ -126,7 +127,8 @@ public class GUISimPathFormulaeList extends JList
// RENDERERS // RENDERERS
class SimPathFormulaRenderer extends JLabel implements ListCellRenderer
@SuppressWarnings("serial")
class SimPathFormulaRenderer extends JLabel implements ListCellRenderer<SimPathFormula>
{ {
String lastText; String lastText;
@ -141,7 +143,7 @@ public class GUISimPathFormulaeList extends JList
return lastText; return lastText;
} }
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
public Component getListCellRendererComponent(JList<? extends SimPathFormula> list, SimPathFormula value, int index, boolean isSelected,
boolean cellHasFocus) boolean cellHasFocus)
{ {
setBorder(new BottomBorder()); setBorder(new BottomBorder());

Loading…
Cancel
Save