Package mars.venus

Class ExecutePane

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class ExecutePane extends JDesktopPane
Container for the execution-related windows. Currently displayed as a tabbed pane.
Author:
Sanderson and Team JSpim
See Also:
Serialized Form
  • Constructor Details

    • ExecutePane

      public ExecutePane(VenusUI mainUI, RegistersWindow regs, Coprocessor1Window cop1Regs, Coprocessor0Window cop0Regs)
      initialize the Execute pane with major components
      Parameters:
      mainUI - the parent GUI
      regs - window containing integer register set
      cop1Regs - window containing Coprocessor 1 register set
      cop0Regs - window containing Coprocessor 0 register set
  • Method Details

    • setWindowBounds

      public void setWindowBounds()
      This method will set the bounds of this JDesktopPane's internal windows relative to the current size of this JDesktopPane. Such an operation cannot be adequately done at constructor time because the actual size of the desktop pane window is not yet established. Layout manager is not a good option here because JDesktopPane does not work well with them (the whole idea of using JDesktopPane with internal frames is to have mini-frames that you can resize, move around, minimize, etc). This method should be invoked only once: the first time the Execute tab is selected (a change listener invokes it). We do not want it invoked on subsequent tab selections; otherwise, user manipulations of the internal frames would be lost the next time execute tab is selected.
    • setLabelWindowVisibility

      public void setLabelWindowVisibility(boolean visibility)
      Show or hide the label window (symbol table). If visible, it is displayed to the right of the text segment and the latter is shrunk accordingly.
      Parameters:
      visibility - set to true or false
    • clearPane

      public void clearPane()
      Clears out all components of the Execute tab: text segment display, data segment display, label display and register display. This will typically be done upon File->Close, Open, New.
    • getTextSegmentWindow

      public TextSegmentWindow getTextSegmentWindow()
      Access the text segment window.
    • getDataSegmentWindow

      public DataSegmentWindow getDataSegmentWindow()
      Access the data segment window.
    • getRegistersWindow

      public RegistersWindow getRegistersWindow()
      Access the register values window.
    • getCoprocessor1Window

      public Coprocessor1Window getCoprocessor1Window()
      Access the coprocessor1 values window.
    • getCoprocessor0Window

      public Coprocessor0Window getCoprocessor0Window()
      Access the coprocessor0 values window.
    • getLabelsWindow

      public LabelsWindow getLabelsWindow()
      Access the label values window.
    • getValueDisplayBase

      public int getValueDisplayBase()
      Retrieve the number system base for displaying values (mem/register contents)
    • getAddressDisplayBase

      public int getAddressDisplayBase()
      Retrieve the number system base for displaying memory addresses
    • getValueDisplayBaseChooser

      public NumberDisplayBaseChooser getValueDisplayBaseChooser()
      Retrieve component used to set numerical base (10 or 16) of data value display.
      Returns:
      the chooser
    • getAddressDisplayBaseChooser

      public NumberDisplayBaseChooser getAddressDisplayBaseChooser()
      Retrieve component used to set numerical base (10 or 16) of address display.
      Returns:
      the chooser
    • numberDisplayBaseChanged

      public void numberDisplayBaseChanged(NumberDisplayBaseChooser chooser)
      Update display of columns based on state of given chooser. Normally called only by the chooser's ItemListener.
      Parameters:
      chooser - the GUI object manipulated by the user to change number base