Commit 59730259 authored by Edoardo Putti's avatar Edoardo Putti Committed by Mart Lubbers

remove preference menu

parent 6a7c1fdb
......@@ -129,7 +129,8 @@ public class SSMRunner extends JFrame
JButton tbNewButton = new JButton();
JButton tbLoadButton = new JButton();
JButton tbReloadButton = new JButton();
javax.swing.JButton tbSaveButton = new javax.swing.JButton();
javax.swing.JButton tbSaveButton = new JButton();
JButton tbStep1ForwardButton = new JButton();
JButton tbStep1BackButton = new JButton();
JButton tbStartBackButton = new JButton();
......@@ -154,11 +155,7 @@ public class SSMRunner extends JFrame
private JMenuItem jMenuRunnerOneStepBack = new JMenuItem();
private JMenu jMenuLookAndFeel = new JMenu() ;
private JMenu jMenuPrefs = new JMenu() ;
public SSMRunner( Runner runner )
{
public SSMRunner( Runner runner ) {
setupState = SETUP_BUSY ;
machineState = new MachineState( 5000, 2000, this ) ; // TBD: automatic increase with reasonable increments
machine = new Machine( machineState, this ) ;
......@@ -537,41 +534,6 @@ public class SSMRunner extends JFrame
BoundedRangeModel codeScrollPaneScrollBarModel = codeScrollPaneScrollBar.getModel() ;
codeTableModel.setScrollBarModel( codeScrollPaneScrollBarModel ) ;
// Preferences
jMenuPrefs.setText( "Preferences" ) ;
JMenuBar.add( jMenuPrefs ) ;
// Look and Feel
final UIManager.LookAndFeelInfo lookAndFeels[] = UIManager.getInstalledLookAndFeels() ;
final JMenuItem lookAndFeelMenuItems[] = new JMenuItem[ lookAndFeels.length ] ;
MouseAdapter lfl =
new MouseAdapter() {
public void mouseReleased( MouseEvent e )
{
int mItem = Arrays.asList( lookAndFeelMenuItems ).indexOf( e.getSource() ) ;
if ( mItem >= 0 )
try
{
UIManager.setLookAndFeel( lookAndFeels[mItem].getClassName() ) ;
SwingUtilities.updateComponentTreeUI( getContentPane() ) ;
pack() ;
}
catch( Exception ex )
{
println( "Failed to switch look&feel: " + ex.toString() ) ;
}
}
} ;
for ( int i = 0 ; i < lookAndFeels.length ; i++ )
{
JMenuItem it = new JMenuItem( lookAndFeels[i].getName() ) ;
jMenuLookAndFeel.add( it ) ;
lookAndFeelMenuItems[ i ] = it ;
it.addMouseListener( lfl ) ;
}
jMenuLookAndFeel.setText( "Look & Feel" ) ;
jMenuPrefs.add( jMenuLookAndFeel ) ;
// Key, focus listening
addKeyListener( new SSMKeyListener() ) ;
hasFocus = false ;
......
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