View Javadoc

    1   /*
    2    * @(#) HelpMenu.java Nov 5, 2003
    3    *
    4    * Copyright (c) 2002-2005 Delft University of Technology Jaffalaan 5, 2628 BX
    5    * Delft, the Netherlands. All rights reserved.
    6    *
    7    * This software is proprietary information of Delft University of Technology
    8    * The code is published under the Lesser General Public License
    9    */
    10  package nl.tudelft.simulation.dsol.gui.menu;
    11
    12  import javax.swing.JMenu;
    13  import javax.swing.JMenuItem;
    14  import javax.swing.JSeparator;
    15
    16  import nl.tudelft.simulation.dsol.gui.DSOLApplicationInterface;
    17  import nl.tudelft.simulation.dsol.gui.menu.actions.OpenRecentAction;
    18
    19  /***
    20   * The HelpMenu <br>
    21   * (c) copyright 2002-2005 <a href="http://www.simulation.tudelft.nl">Delft
    22   * University of Technology </a>, the Netherlands. <br>
    23   * See for project information <a
    24   * href="http://www.simulation.tudelft.nl">www.simulation.tudelft.nl </a> <br>
    25   * License of use: <a href="http://www.gnu.org/copyleft/lesser.html">Lesser
    26   * General Public License (LGPL) </a>, no warranty.
    27   *
    28   * @version $Revision$ $Date$
    29   * @author <a href="http://www.tbm.tudelft.nl/webstaf/peterja">Peter Jacobs </a>
    30   */
    31  public class HelpMenu extends JMenu
    32  {
    33  	/*** application the application */
    34  	private DSOLApplicationInterface application = null;
    35
    36  	/***
    37  	 * constructs a new FileMenu
    38  	 *
    39  	 * @param application the application
    40  	 */
    41  	public HelpMenu(final DSOLApplicationInterface application)
    42  	{
    43  		super("Help");
    44  		this.application = application;
    45  		this.setMnemonic('H');
    46  		this.initialize();
    47  	}
    48
    49  	/***
    50  	 * initializes the menu
    51  	 */
    52  	private void initialize()
    53  	{
    54  		JMenuItem welcomeItem = new JMenuItem("Welcome");
    55  		welcomeItem.setMnemonic('W');
    56  		welcomeItem.setEnabled(false);
    57  		this.add(welcomeItem);
    58
    59  		JMenu tutorial = new JMenu("Tutorial");
    60
    61  		JMenuItem tutorial1 = new JMenuItem(
    62  				new OpenRecentAction(this.application,
    63  						"http://www.simulation.tudelft.nl/dsol/tutorial/160/section24.xml"));
    64  		tutorial.add(tutorial1);
    65
    66  		JMenuItem tutorial2 = new JMenuItem(
    67  				new OpenRecentAction(this.application,
    68  						"http://www.simulation.tudelft.nl/dsol/tutorial/160/section41.xml"));
    69  		tutorial.add(tutorial2);
    70
    71  		JMenuItem tutorial3 = new JMenuItem(
    72  				new OpenRecentAction(this.application,
    73  						"http://www.simulation.tudelft.nl/dsol/tutorial/160/section42.xml"));
    74  		tutorial.add(tutorial3);
    75
    76  		JMenuItem tutorial4 = new JMenuItem(
    77  				new OpenRecentAction(this.application,
    78  						"http://www.simulation.tudelft.nl/dsol/tutorial/160/section43.xml"));
    79  		tutorial.add(tutorial4);
    80
    81  		JMenuItem tutorial5 = new JMenuItem(
    82  				new OpenRecentAction(this.application,
    83  						"http://www.simulation.tudelft.nl/dsol/tutorial/160/section44.xml"));
    84  		tutorial.add(tutorial5);
    85
    86  		JMenuItem tutorial6 = new JMenuItem(
    87  				new OpenRecentAction(this.application,
    88  						"http://www.simulation.tudelft.nl/dsol/tutorial/160/section45.xml"));
    89  		tutorial.add(tutorial6);
    90
    91  		this.add(tutorial);
    92
    93  		this.add(new JSeparator());
    94
    95  		JMenuItem aboutItem = new JMenuItem("About DSOL");
    96  		aboutItem.setMnemonic('A');
    97  		aboutItem.setEnabled(false);
    98  		this.add(aboutItem);
    99  	}
    100 }