Class ExecuteTab

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class ExecuteTab extends JDesktopPane
The "Execute" tab in the main tabbed pane, which contains execution-related windows.
Author:
Pete Sanderson and Team JSpim
See Also:
  • Constructor Details

    • ExecuteTab

      public ExecuteTab(VenusUI gui)
      Initialize the Execute pane.
      Parameters:
      gui - The parent GUI instance.
  • 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.
    • setSymbolTableWindowVisible

      public void setSymbolTableWindowVisible(boolean visible)
      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:
      visible - set to true or false
    • clear

      public void clear()
      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.
    • getLabelsWindow

      public SymbolTableWindow 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