Package mars.venus

Class VenusUI

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

public class VenusUI extends JFrame
Top level container for Venus GUI.
Author:
Sanderson and Team JSpim
See Also:
Serialized Form
  • Field Details

  • Constructor Details

    • VenusUI

      public VenusUI(String s)
      Constructor for the Class. Sets up a window object for the UI
      Parameters:
      s - Name of the window to be created.
  • Method Details

    • getMenuState

      public static int getMenuState()
      Get current menu state. State values are constants in FileStatus class. DPS 23 July 2008
      Returns:
      current menu state.
    • setReset

      public static void setReset(boolean b)
      To set whether the register values are reset.
      Parameters:
      b - Boolean true if the register values have been reset.
    • setStarted

      public static void setStarted(boolean b)
      To set whether MIPS program execution has started.
      Parameters:
      b - true if the MIPS program execution has started.
    • getReset

      public static boolean getReset()
      To find out whether the register values are reset.
      Returns:
      Boolean true if the register values have been reset.
    • getStarted

      public static boolean getStarted()
      To find out whether MIPS program is currently executing.
      Returns:
      true if MIPS program is currently executing.
    • getEditor

      public Editor getEditor()
      Get reference to Editor object associated with this GUI.
      Returns:
      Editor for the GUI.
    • getMainPane

      public MainPane getMainPane()
      Get reference to messages pane associated with this GUI.
      Returns:
      MessagesPane object associated with the GUI.
    • getMessagesPane

      public MessagesPane getMessagesPane()
      Get reference to messages pane associated with this GUI.
      Returns:
      MessagesPane object associated with the GUI.
    • getRegistersPane

      public RegistersPane getRegistersPane()
      Get reference to registers pane associated with this GUI.
      Returns:
      RegistersPane object associated with the GUI.
    • getValueDisplayBaseMenuItem

      public JCheckBoxMenuItem getValueDisplayBaseMenuItem()
      Get reference to settings menu item for display base of memory/register values.
      Returns:
      the menu item
    • getAddressDisplayBaseMenuItem

      public JCheckBoxMenuItem getAddressDisplayBaseMenuItem()
      Get reference to settings menu item for display base of memory/register values.
      Returns:
      the menu item
    • getRunAssembleAction

      public Action getRunAssembleAction()
      Return reference tothe Run->Assemble item's action. Needed by File->Open in case assemble-upon-open flag is set.
      Returns:
      the Action object for the Run->Assemble operation.
    • haveMenuRequestFocus

      public void haveMenuRequestFocus()
      Have the menu request keyboard focus. DPS 5-4-10
    • dispatchEventToMenu

      public void dispatchEventToMenu(KeyEvent evt)
      Send keyboard event to menu for possible processing. DPS 5-4-10
      Parameters:
      evt - KeyEvent for menu component to consider for processing.