Commit b2e61b6d authored by Atze Dijkstra's avatar Atze Dijkstra

fixes for java 8

parent 2cfbde22
...@@ -9,13 +9,14 @@ ...@@ -9,13 +9,14 @@
package nl.uu.cs.ssm ; package nl.uu.cs.ssm ;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.EventListener;
abstract class AbstractMemoryCellModel extends Model abstract class AbstractMemoryCellModel extends Model
implements MemoryCellModel implements MemoryCellModel
{ {
protected void fireCellChange( MemoryCellModel m, MemoryCellEvent ev ) 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() ; MemoryCellListener l = (MemoryCellListener)e.nextElement() ;
l.cellChanged( ev ) ; l.cellChanged( ev ) ;
...@@ -42,4 +43,4 @@ abstract class AbstractMemoryCellModel extends Model ...@@ -42,4 +43,4 @@ abstract class AbstractMemoryCellModel extends Model
removeListener( l ) ; removeListener( l ) ;
} }
} }
\ No newline at end of file
...@@ -14,6 +14,7 @@ import java.io.FileWriter; ...@@ -14,6 +14,7 @@ import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.EventListener;
public class MachineState extends Model public class MachineState extends Model
{ {
...@@ -46,7 +47,7 @@ public class MachineState extends Model ...@@ -46,7 +47,7 @@ public class MachineState extends Model
protected void fireStateChange( MachineStateEvent ev ) protected void fireStateChange( MachineStateEvent ev )
{ {
for( Enumeration e = getListeners() ; e.hasMoreElements() ; ) for( Enumeration<EventListener> e = getListeners() ; e.hasMoreElements() ; )
{ {
MachineStateListener l = (MachineStateListener)e.nextElement() ; MachineStateListener l = (MachineStateListener)e.nextElement() ;
l.stateChanged( ev ) ; l.stateChanged( ev ) ;
...@@ -245,4 +246,4 @@ public class MachineState extends Model ...@@ -245,4 +246,4 @@ public class MachineState extends Model
// cannot remove from filePtrs, as that messes up index // cannot remove from filePtrs, as that messes up index
filePtrs.set(index, null); filePtrs.set(index, null);
} }
} }
\ No newline at end of file
...@@ -26,7 +26,7 @@ public class Model ...@@ -26,7 +26,7 @@ public class Model
listeners.removeElement( l ) ; listeners.removeElement( l ) ;
} }
protected Enumeration getListeners() protected Enumeration<EventListener> getListeners()
{ {
return listeners.elements() ; return listeners.elements() ;
} }
......
...@@ -173,7 +173,7 @@ public class Utils ...@@ -173,7 +173,7 @@ public class Utils
{ {
private Vector<Object> extensions = new Vector<Object>() ; private Vector<Object> extensions = new Vector<Object>() ;
public ExtensionFileFilter( Enumeration exts ) public ExtensionFileFilter( Enumeration<Object> exts )
{ {
while ( exts.hasMoreElements() ) while ( exts.hasMoreElements() )
addExtension( (String)exts.nextElement() ) ; addExtension( (String)exts.nextElement() ) ;
......
...@@ -362,7 +362,7 @@ public class CodeTableModel extends AbstractTableModel ...@@ -362,7 +362,7 @@ public class CodeTableModel extends AbstractTableModel
return columnNames[ column ] ; return columnNames[ column ] ;
} }
public Class getColumnClass( int column ) public Class<?> getColumnClass( int column )
{ {
if ( column == C_PC || column == C_BP ) if ( column == C_PC || column == C_BP )
return ImageIcon.class ; return ImageIcon.class ;
......
...@@ -104,7 +104,7 @@ public class HeapTableModel extends AbstractTableModel implements MemoryCellList ...@@ -104,7 +104,7 @@ public class HeapTableModel extends AbstractTableModel implements MemoryCellList
return columnNames[column] ; return columnNames[column] ;
} }
public Class getColumnClass(int column) { public Class<?> getColumnClass(int column) {
if (column == C_ANNOTE) if (column == C_ANNOTE)
return ColoredText.class; return ColoredText.class;
...@@ -116,4 +116,4 @@ public class HeapTableModel extends AbstractTableModel implements MemoryCellList ...@@ -116,4 +116,4 @@ public class HeapTableModel extends AbstractTableModel implements MemoryCellList
fireTableDataChanged(); fireTableDataChanged();
} }
} }
\ No newline at end of file
...@@ -62,7 +62,7 @@ public class HelpFromProp ...@@ -62,7 +62,7 @@ public class HelpFromProp
if ( topics == null ) if ( topics == null )
{ {
Hashtable<String,String> ts = new Hashtable<String,String>() ; 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() ; String s = (String)ps.nextElement() ;
if ( doForInstr ) if ( doForInstr )
......
...@@ -51,7 +51,7 @@ public class SSMAbout extends JFrame ...@@ -51,7 +51,7 @@ public class SSMAbout extends JFrame
versionLabel.setFont(null); versionLabel.setFont(null);
versionLabel.setSize(new java.awt.Dimension(80, 20)); versionLabel.setSize(new java.awt.Dimension(80, 20));
authorLabel.setText("Author & :"); authorLabel.setText("Copyright:");
authorLabel.setLocation(new java.awt.Point(10, 50)); authorLabel.setLocation(new java.awt.Point(10, 50));
authorLabel.setVisible(true); authorLabel.setVisible(true);
authorLabel.setFont(null); authorLabel.setFont(null);
......
...@@ -44,7 +44,7 @@ public class SSMHelp extends JFrame ...@@ -44,7 +44,7 @@ public class SSMHelp extends JFrame
javax.swing.JButton findButton = new javax.swing.JButton(); javax.swing.JButton findButton = new javax.swing.JButton();
javax.swing.JButton allTopicsButton = new javax.swing.JButton(); javax.swing.JButton allTopicsButton = new javax.swing.JButton();
javax.swing.JScrollPane foundTopicsScrollPane = new javax.swing.JScrollPane(); 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 // END GENERATED CODE
public SSMHelp( Help h ) public SSMHelp( Help h )
...@@ -324,7 +324,7 @@ public class SSMHelp extends JFrame ...@@ -324,7 +324,7 @@ public class SSMHelp extends JFrame
public void foundTopicsListMouseReleased(java.awt.event.MouseEvent e) public void foundTopicsListMouseReleased(java.awt.event.MouseEvent e)
{ {
HelpTopic helpTopic = (HelpTopic)foundTopicsList.getSelectedValue() ; HelpTopic helpTopic = foundTopicsList.getSelectedValue() ;
if ( helpTopic != null ) if ( helpTopic != null )
displayOneSelectedHelp( helpTopic ) ; displayOneSelectedHelp( helpTopic ) ;
} }
......
...@@ -62,7 +62,7 @@ public class SSMRunner extends JFrame ...@@ -62,7 +62,7 @@ public class SSMRunner extends JFrame
public final static int SETUP_READY = 1 ; public final static int SETUP_READY = 1 ;
public static Class tableModelColumnClass ; public static Class<?> tableModelColumnClass ;
static static
{ {
......
...@@ -145,7 +145,7 @@ public class StackTableModel extends AbstractTableModel ...@@ -145,7 +145,7 @@ public class StackTableModel extends AbstractTableModel
return columnNames[ column ] ; return columnNames[ column ] ;
} }
public Class getColumnClass( int column ) public Class<?> getColumnClass( int column )
{ {
if ( column == C_ANNOTE ) if ( column == C_ANNOTE )
return ColoredText.class ; return ColoredText.class ;
......
...@@ -104,7 +104,7 @@ public class StatusTableModel extends AbstractTableModel ...@@ -104,7 +104,7 @@ public class StatusTableModel extends AbstractTableModel
return column == C_SR ? "SR" : Registers.getRegNAliasName( column ) ; return column == C_SR ? "SR" : Registers.getRegNAliasName( column ) ;
} }
public Class getColumnClass( int column ) public Class<?> getColumnClass( int column )
{ {
return SSMRunner.tableModelColumnClass ; 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