mars.venus
Class ExecutePane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JLayeredPane
                  extended by javax.swing.JDesktopPane
                      extended by mars.venus.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

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JDesktopPane
JDesktopPane.AccessibleJDesktopPane
 
Nested classes/interfaces inherited from class javax.swing.JLayeredPane
JLayeredPane.AccessibleJLayeredPane
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JDesktopPane
LIVE_DRAG_MODE, OUTLINE_DRAG_MODE
 
Fields inherited from class javax.swing.JLayeredPane
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ExecutePane(VenusUI mainUI, RegistersWindow regs, Coprocessor1Window cop1Regs, Coprocessor0Window cop0Regs)
          initialize the Execute pane with major components
 
Method Summary
 void clearPane()
          Clears out all components of the Execute tab: text segment display, data segment display, label display and register display.
 int getAddressDisplayBase()
          Retrieve the number system base for displaying memory addresses
 NumberDisplayBaseChooser getAddressDisplayBaseChooser()
          Retrieve component used to set numerical base (10 or 16) of address display.
 Coprocessor0Window getCoprocessor0Window()
          Access the coprocessor0 values window.
 Coprocessor1Window getCoprocessor1Window()
          Access the coprocessor1 values window.
 DataSegmentWindow getDataSegmentWindow()
          Access the data segment window.
 LabelsWindow getLabelsWindow()
          Access the label values window.
 RegistersWindow getRegistersWindow()
          Access the register values window.
 TextSegmentWindow getTextSegmentWindow()
          Access the text segment window.
 int getValueDisplayBase()
          Retrieve the number system base for displaying values (mem/register contents)
 NumberDisplayBaseChooser getValueDisplayBaseChooser()
          Retrieve component used to set numerical base (10 or 16) of data value display.
 void numberDisplayBaseChanged(NumberDisplayBaseChooser chooser)
          Update display of columns based on state of given chooser.
 void setLabelWindowVisibility(boolean visibility)
          Show or hide the label window (symbol table).
 void setWindowBounds()
          This method will set the bounds of this JDesktopPane's internal windows relative to the current size of this JDesktopPane.
 
Methods inherited from class javax.swing.JDesktopPane
addImpl, getAccessibleContext, getAllFrames, getAllFramesInLayer, getDesktopManager, getDragMode, getSelectedFrame, getUI, getUIClassID, paramString, remove, removeAll, selectFrame, setComponentZOrder, setDesktopManager, setDragMode, setSelectedFrame, setUI, updateUI
 
Methods inherited from class javax.swing.JLayeredPane
getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, putLayer, setLayer, setLayer, setPosition
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeContainerListener, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

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