Module Simula
Package simula.editor

Class EditorMenues

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, MenuElement

public class EditorMenues extends JMenuBar
The editor's menues.

Link to GitHub: Source File.

Author:
Øystein Myhre Andersen
See Also:
  • Field Details

    • fileMenu

      private JMenu fileMenu
      Menu
    • newFile

      private JMenuItem newFile
      Menu item
    • openFile

      private JMenuItem openFile
      Menu item
    • saveFile

      private JMenuItem saveFile
      Menu item
    • saveAs

      private JMenuItem saveAs
      Menu item
    • close

      private JMenuItem close
      Menu item
    • closeAll

      private JMenuItem closeAll
      Menu item
    • exit

      private JMenuItem exit
      Menu item
    • editMenu

      private JMenu editMenu
      Menu
    • refresh

      JMenuItem refresh
      Refresh item.
    • cut

      private JMenuItem cut
      Menu item
    • copy

      private JMenuItem copy
      Menu item
    • paste

      private JMenuItem paste
      Menu item
    • undo

      private JMenuItem undo
      Menu item
    • runMenu

      private JMenu runMenu
      Menu
    • run

      private JMenuItem run
      Menu item
    • debug

      private JMenuItem debug
      Menu item
    • settings

      private JMenu settings
      Menu
    • autoRefresh

      private JCheckBox autoRefresh
      CheckBox
    • setWorkSpace

      private JMenuItem setWorkSpace
      Menu item
    • setJavaDir

      private JMenuItem setJavaDir
      Menu item
    • setOutputDir

      private JMenuItem setOutputDir
      Menu item
    • setExtLibDir

      private JMenuItem setExtLibDir
      Menu item
    • workSpaces

      private JMenuItem workSpaces
      Menu item
    • compilerOption

      private JMenuItem compilerOption
      Menu item
    • runtimeOption

      private JMenuItem runtimeOption
      Menu item
    • helpMenu

      private JMenu helpMenu
      Menu
    • about

      private JMenuItem about
      Menu item
    • more

      private JMenuItem more
      Menu item
    • popupMenu

      JPopupMenu popupMenu
      The popup menu.
    • newFile2

      private JMenuItem newFile2
      Popup Menu item
    • openFile2

      private JMenuItem openFile2
      Popup Menu item
    • saveFile2

      private JMenuItem saveFile2
      Popup Menu item
    • saveAs2

      private JMenuItem saveAs2
      Popup Menu item
    • close2

      private JMenuItem close2
      Popup Menu item
    • closeAll2

      private JMenuItem closeAll2
      Popup Menu item
    • exit2

      private JMenuItem exit2
      Popup Menu item
    • refresh2

      private JMenuItem refresh2
      Popup Menu item
    • cut2

      private JMenuItem cut2
      Popup Menu item
    • copy2

      private JMenuItem copy2
      Popup Menu item
    • paste2

      private JMenuItem paste2
      Popup Menu item
    • undo2

      private JMenuItem undo2
      Popup Menu item
    • run2

      private JMenuItem run2
      Popup Menu item
    • debug2

      private JMenuItem debug2
      Popup Menu item
    • autoRefresh2

      private JCheckBox autoRefresh2
      Popup Menu item
    • setWorkSpace2

      private JMenuItem setWorkSpace2
      Popup Menu item
    • setJavaDir2

      private JMenuItem setJavaDir2
      Popup Menu item
    • setOutputDir2

      private JMenuItem setOutputDir2
      Popup Menu item
    • setExtLibDir2

      private JMenuItem setExtLibDir2
      Popup Menu item
    • workSpaces2

      private JMenuItem workSpaces2
      Popup Menu item
    • compilerOption2

      private JMenuItem compilerOption2
      Popup Menu item
    • runtimeOption2

      private JMenuItem runtimeOption2
      Popup Menu item
    • about2

      private JMenuItem about2
      Popup Menu item
    • more2

      private JMenuItem more2
      Popup Menu item
    • actionListener

      ActionListener actionListener
      the ActionListener
  • Constructor Details

    • EditorMenues

      EditorMenues()
      Create a new instance of EditorMenues.
  • Method Details

    • defJMenuItem

      private JMenuItem defJMenuItem(String ident, String toolTipText)
      Define a Menu item with toolTip.
      Parameters:
      ident - item identifier
      toolTipText - the tooltip text
      Returns:
      the resulting MenuItem
    • setAccelerators

      private void setAccelerators()
      HelpMenu: setAccelerators
    • addPopupMenuItems

      private void addPopupMenuItems()
      Add popup menu items,
    • updateMenuItems

      void updateMenuItems()
      Update menu items.
    • doOpenFileAction

      private void doOpenFileAction()
      Open file acation
    • isTextFile

      private boolean isTextFile(String lowName)
      Test if a file is a text file
      Parameters:
      lowName - the ident after .
      Returns:
      true if it is a text file
    • doSaveCurrentFile

      void doSaveCurrentFile(boolean saveAs)
      Do save current source file.
      Parameters:
      saveAs - true if a file chooser is wanted
    • doCloseCurrentFileAction

      private void doCloseCurrentFileAction()
      Close current file acation.
    • doCloseAllAction

      void doCloseAllAction()
      Close action.
    • doExitAction

      void doExitAction()
      Exit action.
    • maybeSaveCurrentFile

      void maybeSaveCurrentFile()
      Maybe save current source file.

      Also used by RunMeny[Run]

    • overwriteDialog

      private int overwriteDialog(File file)
      Popup a warning: The file: 'name' Already exists - Do you want to overwrite it ?
      Parameters:
      file - the file
      Returns:
      an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
    • noSimTypeDialog

      private int noSimTypeDialog(File file)
      Popup a warning: The file 'name' Does not end with the recomended .sim
      Parameters:
      file - the file
      Returns:
      an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
    • saveDialog

      private int saveDialog(File file)
      Save file dialog
      Parameters:
      file - the file
      Returns:
      an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
    • undoAction

      private void undoAction()
      The undo action
    • doRunAction

      private void doRunAction()
      The run action
    • doDebugAction

      private void doDebugAction()
      The debug action
    • doStartRunning

      private void doStartRunning()
      Utility: Start running current Simula program.
    • selectWorkspaceAction

      private void selectWorkspaceAction()
      Select Workspace action.
    • selectJavaDirAction

      private void selectJavaDirAction()
      Select Java directory action.
    • selectOutputDirAction

      private void selectOutputDirAction()
      Select output directory action.
    • selectExtLibDirAction

      private void selectExtLibDirAction()
      Select ExtLibDir action.
    • removeWorkspacesAction

      private void removeWorkspacesAction()
      Remove Workspace action.
    • doAboutAction

      private void doAboutAction()
      About action
    • doMoreAction

      private void doMoreAction()
      More action