//4.regularMenu.java
/*
* 2007/03/26
*
* REGULAR TOOL
* regularMenu.java
*/
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
/**
* @author suxq126
*/
public class regularMenu {
// Create the menu bar.
private JMenuBar menuBar = new JMenuBar();
private JMenu fileMenu = new JMenu( "File ");;
private JMenu editMenu = new JMenu( "Edit ");
private JMenu comMenu = new JMenu( "Common Regular ");
private JMenu helpMenu = new JMenu( "Help ");
// File MenuItem
private JMenuItem openMenuItem = new JMenuItem( "Open File ");
private JMenuItem saveMenuItem = new JMenuItem( "Save Result ");
private JMenuItem exitMenuItem = new JMenuItem( "Exit ");
// Common Regular MenuItem
private JMenuItem intMenuItem = new JMenuItem( "Integer Number ");
private JMenuItem floatMenuItem = new JMenuItem( "Real Number ");
private JMenuItem phoneNumberMenuItem = new JMenuItem( "Phone_Number ");
private JMenuItem emailMenuItem = new JMenuItem( "Email_Address ");
private JMenuItem htmlTagMenuItem = new JMenuItem( "HTML_Tag ");
// Help MenuItem
private JMenuItem helpMenuItem = new JMenuItem( "Help Contents ");
private JMenuItem aboutMenuItem = new JMenuItem( "About Regular Tool ");
/**
* @return menuBar
*/
public JMenuBar initMenu() {
// File MenuItem
fileMenu.add(openMenuItem);
fileMenu.add(saveMenuItem);
fileMenu.addSeparator();
fileMenu.add(exitMenuItem);
// Common Regular MenuItem
comMenu.add(intMenuItem);