Esempio n. 1
0
  // Initializes the memory segment
  private void init(Memory mainMemory, MemorySegmentGUI gui) {
    m_mainMemory = mainMemory;
    m_gui = gui;

    if (hasGUI) {
      gui.addListener(this);
      gui.addErrorListener(this);
    }
  }
Esempio n. 2
0
  @Override
  public void refreshGUI() {
    super.refreshGUI();

    if (displayChanges) {
      m_gui.setStartAddress(startAddress);
    }
  }
Esempio n. 3
0
 /** Sets the start address with the given one. */
 public void setStartAddress(int startAddress) {
   this.startAddress = startAddress;
   if (displayChanges) {
     m_gui.setStartAddress(startAddress);
   }
 }
Esempio n. 4
0
 /** Scrolls the memory such that the given address will be on top. (assumes legal address). */
 public void scrollTo(int address) {
   if (displayChanges) {
     m_gui.scrollTo(startAddress + address);
   }
 }
Esempio n. 5
0
 /** Hides all selections. */
 public void hideSelect() {
   if (displayChanges) {
     m_gui.hideSelect();
   }
 }