Package mars.venus

Class RegistersDisplayTab

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, Register.Listener, SimulatorListener
Direct Known Subclasses:
Coprocessor0Tab, Coprocessor1Tab, ProcessorTab

public abstract class RegistersDisplayTab extends JPanel implements SimulatorListener, Register.Listener
See Also:
  • Field Details

    • gui

      protected final VenusUI gui
  • Constructor Details

    • RegistersDisplayTab

      public RegistersDisplayTab(VenusUI gui)
  • Method Details

    • getTable

      protected abstract RegistersTable getTable()
    • clearHighlighting

      public void clearHighlighting()
      Clear highlight background color from any row currently highlighted.
    • refresh

      public void refresh()
      Refresh the table, triggering re-rendering.
    • updateRegisters

      public void updateRegisters()
      Update register display using current number base (10 or 16).
    • updateRegisters

      public abstract void updateRegisters(int base)
      Update register display using specified number base (10 or 16).
      Parameters:
      base - Desired number base.
    • highlightRegister

      public abstract void highlightRegister(Register register)
      Highlight the row corresponding to the given register.
      Parameters:
      register - Register object corresponding to row to be selected.
    • startObservingRegisters

      public abstract void startObservingRegisters()
    • stopObservingRegisters

      public abstract void stopObservingRegisters()
    • simulatorStarted

      public void simulatorStarted(SimulatorStartEvent event)
      Description copied from interface: SimulatorListener
      Called when the simulator begins execution of a program.
      Specified by:
      simulatorStarted in interface SimulatorListener
      Parameters:
      event - The event which occurred.
    • simulatorPaused

      public void simulatorPaused(SimulatorPauseEvent event)
      Description copied from interface: SimulatorListener
      Called when the simulator stops execution of a program due to pausing.
      Specified by:
      simulatorPaused in interface SimulatorListener
      Parameters:
      event - The event which occurred.
    • simulatorFinished

      public void simulatorFinished(SimulatorFinishEvent event)
      Description copied from interface: SimulatorListener
      Called when the simulator stops execution of a program due to termination or finishing.
      Specified by:
      simulatorFinished in interface SimulatorListener
      Parameters:
      event - The event which occurred.
    • simulatorStepped

      public void simulatorStepped()
      Description copied from interface: SimulatorListener
      Called when the simulator has finished executing an instruction, but only if the run speed is not unlimited.

      Note: For very fast run speeds, GUI listeners may not receive all step events. This is an intentional feature to prevent overloading of the GUI event queue.

      Specified by:
      simulatorStepped in interface SimulatorListener
    • registerWritten

      public void registerWritten(Register register)
      Specified by:
      registerWritten in interface Register.Listener