Commit b2e61b6d authored by Atze Dijkstra's avatar Atze Dijkstra

fixes for java 8

parent 2cfbde22
......@@ -9,13 +9,14 @@
package nl.uu.cs.ssm ;
import java.util.Enumeration;
import java.util.EventListener;
abstract class AbstractMemoryCellModel extends Model
implements MemoryCellModel
{
protected void fireCellChange( MemoryCellModel m, MemoryCellEvent ev )
{
for( Enumeration e = getListeners() ; e.hasMoreElements() ; )
for( Enumeration<EventListener> e = getListeners() ; e.hasMoreElements() ; )
{
MemoryCellListener l = (MemoryCellListener)e.nextElement() ;
l.cellChanged( ev ) ;
......
......@@ -14,6 +14,7 @@ import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.EventListener;
public class MachineState extends Model
{
......@@ -46,7 +47,7 @@ public class MachineState extends Model
protected void fireStateChange( MachineStateEvent ev )
{
for( Enumeration e = getListeners() ; e.hasMoreElements() ; )
for( Enumeration<EventListener> e = getListeners() ; e.hasMoreElements() ; )
{
MachineStateListener l = (MachineStateListener)e.nextElement() ;
l.stateChanged( ev ) ;
......
......@@ -26,7 +26,7 @@ public class Model
listeners.removeElement( l ) ;
}
protected Enumeration getListeners()
protected Enumeration<EventListener> getListeners()
{
return listeners.elements() ;
}
......
......@@ -173,7 +173,7 @@ public class Utils
{
private Vector<Object> extensions = new Vector<Object>() ;
public ExtensionFileFilter( Enumeration exts )
public ExtensionFileFilter( Enumeration<Object> exts )
{
while ( exts.hasMoreElements() )
addExtension( (String)exts.nextElement() ) ;
......
......@@ -362,7 +362,7 @@ public class CodeTableModel extends AbstractTableModel
return columnNames[ column ] ;
}
public Class getColumnClass( int column )
public Class<?> getColumnClass( int column )
{
if ( column == C_PC || column == C_BP )
return ImageIcon.class ;
......
......@@ -104,7 +104,7 @@ public class HeapTableModel extends AbstractTableModel implements MemoryCellList
return columnNames[column] ;
}
public Class getColumnClass(int column) {
public Class<?> getColumnClass(int column) {
if (column == C_ANNOTE)
return ColoredText.class;
......
......@@ -62,7 +62,7 @@ public class HelpFromProp
if ( topics == null )
{
Hashtable<String,String> ts = new Hashtable<String,String>() ;
for ( Enumeration ps = props.propertyNames() ; ps.hasMoreElements() ; )
for ( Enumeration<?> ps = props.propertyNames() ; ps.hasMoreElements() ; )
{
String s = (String)ps.nextElement() ;
if ( doForInstr )
......
......@@ -51,7 +51,7 @@ public class SSMAbout extends JFrame
versionLabel.setFont(null);
versionLabel.setSize(new java.awt.Dimension(80, 20));
authorLabel.setText("Author & :");
authorLabel.setText("Copyright:");
authorLabel.setLocation(new java.awt.Point(10, 50));
authorLabel.setVisible(true);
authorLabel.setFont(null);
......
......@@ -44,7 +44,7 @@ public class SSMHelp extends JFrame
javax.swing.JButton findButton = new javax.swing.JButton();
javax.swing.JButton allTopicsButton = new javax.swing.JButton();
javax.swing.JScrollPane foundTopicsScrollPane = new javax.swing.JScrollPane();
javax.swing.JList foundTopicsList = new javax.swing.JList();
javax.swing.JList<HelpTopic> foundTopicsList = new javax.swing.JList<HelpTopic>();
// END GENERATED CODE
public SSMHelp( Help h )
......@@ -324,7 +324,7 @@ public class SSMHelp extends JFrame
public void foundTopicsListMouseReleased(java.awt.event.MouseEvent e)
{
HelpTopic helpTopic = (HelpTopic)foundTopicsList.getSelectedValue() ;
HelpTopic helpTopic = foundTopicsList.getSelectedValue() ;
if ( helpTopic != null )
displayOneSelectedHelp( helpTopic ) ;
}
......
......@@ -62,7 +62,7 @@ public class SSMRunner extends JFrame
public final static int SETUP_READY = 1 ;
public static Class tableModelColumnClass ;
public static Class<?> tableModelColumnClass ;
static
{
......
......@@ -145,7 +145,7 @@ public class StackTableModel extends AbstractTableModel
return columnNames[ column ] ;
}
public Class getColumnClass( int column )
public Class<?> getColumnClass( int column )
{
if ( column == C_ANNOTE )
return ColoredText.class ;
......
......@@ -104,7 +104,7 @@ public class StatusTableModel extends AbstractTableModel
return column == C_SR ? "SR" : Registers.getRegNAliasName( column ) ;
}
public Class getColumnClass( int column )
public Class<?> getColumnClass( int column )
{
return SSMRunner.tableModelColumnClass ;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment