Module Simula
Package simula.editor

Class SimulaEditor

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class SimulaEditor extends JFrame
The SimulaEditor.

Link to GitHub: Source File.

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

  • Constructor Details

    • SimulaEditor

      public SimulaEditor()
      Create a new SimulaEditor.
  • Method Details

    • main

      public static void main(String[] args)
      SimulaEditor: Main Entry for TESTING ONLY.
      Parameters:
      args - the arguments
    • getJavaVersion

      private static int getJavaVersion()
      Utility: getJavaVersion
      Returns:
      the JavaVersion
    • getJavaID

      private static String getJavaID()
      Utility: get Java ID
      Returns:
      the Java ID string
    • processWindowEvent

      protected void processWindowEvent(WindowEvent e)
      Overrides:
      processWindowEvent in class JFrame
    • doSelectWorkspace

      static void doSelectWorkspace()
      Select Workspace dialog.
    • doSelectJavaDir

      static void doSelectJavaDir()
      Select Java directory dialog.
    • doSelectOutputDir

      static void doSelectOutputDir()
      Select Output directory dialog.
    • doSelectExtLibDir

      static void doSelectExtLibDir()
      Select External Search Library dialog.
    • doCheckForNewVersion

      void doCheckForNewVersion()
      Check for new version of the Simula System.

      The Simula site at GitHub is contacted and the current Simula Release ID is checked against this vesrion. If not equal question dialog panel is poped up.

    • setSelectedTabTitle

      static void setSelectedTabTitle(String title)
      Set selected tab's title
      Parameters:
      title - the new title
    • removeSelectedTab

      static void removeSelectedTab()
      Remove selected tab.
    • doNewTabbedPanel

      static void doNewTabbedPanel(File file, SimulaEditor.Language lang)
      Create a new Tab with text generated from the given file.
      Parameters:
      file - the file
      lang - the language
    • getHexFileReader

      private static Reader getHexFileReader(File file)
      Utility: Get HexFile Reader.
      Parameters:
      file - the file to read
      Returns:
      The resulting reader
    • AppendLeadingZeroes

      private static String AppendLeadingZeroes(String s, int n)
      Utility: Append leading zeroes.
      Parameters:
      s - the input string
      n - the expected length
      Returns:
      the resulting string
    • getJarFileReader

      private static Reader getJarFileReader(File file)
      Get .jar file Reader
      Parameters:
      file - the file
      Returns:
      a .jar file Reader
    • doRunJarFile

      static void doRunJarFile(File jarFile)
      Run the given .jar file
      Parameters:
      jarFile - the file