|
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 | +--java.applet.Applet | +--misim.MiSimDE
MiSimDE - the main class that presents the miSim GUI, either as an Applet, or as an independent application.
miSim DE is an Object Oriented simulator for microcontrollers. Initially it supports the Arizona Microchip PIC®16x84 series of microcontrollers. It includes an assembler, disassembler, simple editor, simulator and plugin architecture allowing simulation of devices connected to the emulated microcontroller.
The MiSimDE presents uses a card layout to show panels for logging emulator activity, disassembly, Plugin control, file editing and other emulator facilities. It controls the emulation itself by creating a Processor instance and using that to load files and emulate the loaded software.
Inner classes inherited from class java.applet.Applet |
java.applet.Applet.AccessibleApplet |
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 |
Field Summary | |
java.lang.String |
language
This variable stores the language setting for the application.. |
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 | |
MiSimDE()
Default Instantiation method which sets a flag that the class is being run as an applet. |
|
MiSimDE(boolean isApplet,
java.awt.Frame aFrame,
java.lang.String language,
java.lang.String settings)
Instantiation method which allows the caller to indicate whether the class is being run as an applet |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent anEvent)
Respond to a GUI event. |
void |
announce(java.lang.String message)
Logging method displays the given message both on the bottom panel of the application and at the tail of the log window |
void |
assemble()
Assemble the currently viewed file. |
void |
doQuit()
|
java.awt.Image |
getImage(java.lang.String filename)
Load the an image from the given filename |
java.io.InputStreamReader |
getStreamReader(java.lang.String filename)
Create an input stream reader from the given filename |
void |
init()
Main initialisation method for the miSim DE Read settings and initialise the applet in a separate thread |
java.awt.Panel |
initUI(java.util.Vector settingsLog)
Create and layout all the GUI elements for the miSim DE |
void |
loadBinary()
Prompt the user and load a hex file. |
static void |
main(java.lang.String[] args)
Main method to start the emulator as a stand alone application |
void |
newFile()
Open a new editor window with an empty, undefined file |
void |
openFile()
Open an existing file in a new editor window |
void |
processorStateChange(int state,
java.lang.String message)
ProcessorListener Interface implementation to respond to changes in the state of the processor (in particular starting and stopping of the emulation thread, which happens asynchronously. |
void |
readSettings(java.io.BufferedReader input,
java.util.Vector settingsLog)
Read the settings from the first part of the settings file, stopping at the end, or when a line starting with the text 'plugins' is encountered. |
void |
report(java.lang.String message)
Logging method that only displays the given message on the bottom panel of the application |
void |
run()
Run method to initialise the applet in a separate thread.. |
void |
saveFile(boolean saveAs)
If the current tab is the processor view, prompt the user and save a disassembly of the program loaded into the processor. |
void |
stop()
|
void |
turnToCard(java.lang.String cardName)
Turn the card layout to the given card, and indicate the current card by changing the colour of the buttons that run along the top of the cards as 'tabs' |
Methods inherited from class java.applet.Applet |
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start |
Methods inherited from class java.awt.Panel |
addNotify |
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, 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, 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 |
Field Detail |
public java.lang.String language
Constructor Detail |
public MiSimDE()
public MiSimDE(boolean isApplet, java.awt.Frame aFrame, java.lang.String language, java.lang.String settings)
isApplet
- Is true if this is an appletMethod Detail |
public void announce(java.lang.String message)
announce
in interface LogListener
message
- The message to displaypublic void report(java.lang.String message)
report
in interface LogListener
message
- The message to displaypublic void processorStateChange(int state, java.lang.String message)
processorStateChange
in interface ProcessorListener
state
- The new state of the processormessage
- A message associated with this state changeProcessorListener
public void actionPerformed(java.awt.event.ActionEvent anEvent)
actionPerformed
in interface java.awt.event.ActionListener
anEvent
- The event to be processed.public void newFile()
public void openFile()
public void saveFile(boolean saveAs)
public void doQuit()
public void assemble()
public void loadBinary()
public void turnToCard(java.lang.String cardName)
cardName
- The name of the card to selectpublic java.awt.Panel initUI(java.util.Vector settingsLog)
public void init()
init
in class java.applet.Applet
public java.io.InputStreamReader getStreamReader(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException
getStreamReader
in interface RobustReaderIF
filename
- The file name to create a reader forjava.io.FileNotFoundException
- If the file is not foundjava.io.IOException
- If an IO Exception occurs whilst reading the filepublic java.awt.Image getImage(java.lang.String filename)
getImage
in interface RobustReaderIF
filename
- The image filename to loadpublic void run()
run
in interface java.lang.Runnable
public void readSettings(java.io.BufferedReader input, java.util.Vector settingsLog) throws java.io.IOException
input
- A buffered reader for the settings filesettingsLog
- A Vector that will contain Strings indicating the settings loaded,
or any errorspublic void stop()
stop
in class java.applet.Applet
public static void main(java.lang.String[] args)
args
- Arguments set to the application
|
miSim | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |