|
miSim | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Panel | +--misim.ViewPanel
The ViewPanel displays the contents of the Processor, as a listing either generated during assembly of a file, or by disassembling a pre-compiled binary. The view also shows the essential processor state registers, PC, W and the Status register. The user may edit these through the view panel.
Inner classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
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 | |
ViewPanel(Processor processor,
EditorPrefs prefs,
boolean isApplet,
LogListener logging,
java.awt.Color background)
Constructor. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent anEvent)
Respond to a GUI event. |
java.awt.PopupMenu |
createDebugMenu()
Pass the request to create a Debug Popup Menu onto the breakpoint manager, which handles all menu events. |
void |
disassemble()
Disassemble the software loaded into the processor. |
void |
display(boolean showLine)
Display the current state of the processor, and ensure that the currently executed instruction is being displayed by the disassembly view. |
TextFile |
getFile()
Return the file that this view panel is displaying |
int |
getSelectedAddress(int defaultAddr)
Return the address of the currently selected line in the processor view |
void |
itemStateChanged(java.awt.event.ItemEvent e)
Respond to a selection event in the main list view |
void |
loadListing(TextFile listFile,
boolean errors)
Load an assembled listing into the view. |
void |
selectAddress(int address)
Select the line that represents the given address, and make sure that line is visible. |
void |
setBreakpoint(int address,
boolean setBreak)
Set the given address to have a breakpoint, or remove a set breakpoint |
void |
setProcessor(Processor processor)
Set a new processor for the viewPanel and the breakpointManager. |
void |
setReg()
Set a processor register from the GUI TextFields |
void |
textValueChanged(java.awt.event.TextEvent evt)
Respond to a change in the flagValue text field Parse this and the flag number text field and see if the value is the same as the given flag. |
void |
updateButtons()
Pass the request to update menu buttons on to the breakpoint manager |
Methods inherited from class java.awt.Panel |
addNotify, getAccessibleContext |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ViewPanel(Processor processor, EditorPrefs prefs, boolean isApplet, LogListener logging, java.awt.Color background)
Method Detail |
public void setProcessor(Processor processor)
processor
- The new processorpublic java.awt.PopupMenu createDebugMenu()
public TextFile getFile()
public void updateButtons()
public void actionPerformed(java.awt.event.ActionEvent anEvent)
actionPerformed
in interface java.awt.event.ActionListener
anEvent
- The event to be processed.public void textValueChanged(java.awt.event.TextEvent evt)
textValueChanged
in interface java.awt.event.TextListener
evt
- The event that ocurredpublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
e
- The ItemEvent that has ocurredpublic void display(boolean showLine)
public void selectAddress(int address)
selectAddress
in interface ProcessorView
address
- The address to selectpublic int getSelectedAddress(int defaultAddr)
getSelectedAddress
in interface ProcessorView
defaultAddr
- The default address to return if no valid line is selectedpublic void setBreakpoint(int address, boolean setBreak)
setBreakpoint
in interface ProcessorView
address
- The address to set or clear a breakpointsetBreak
- True if a breakpoint is to be set, false otherwisepublic void setReg()
public void loadListing(TextFile listFile, boolean errors)
asm
- The Assembler used to generate the listinglisting
- The listing of the assembled object codeerrors
- If true, the listing has errorspublic void disassemble()
|
miSim | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |