de.michab.apps.route64
Class Commodore64Applet

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended byjava.applet.Applet
                  extended byde.michab.apps.route64.Commodore64Applet
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class Commodore64Applet
extends java.applet.Applet

Route 64 as an applet.

Author:
Michael Binz
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
Nested classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static java.lang.String PARAM_COMMA_ONE
           
static java.lang.String PARAM_DEVICE_ID
           
static java.lang.String PARAM_GRAB_FOCUS
           
static java.lang.String PARAM_IMAGE_FILE
           
static java.lang.String PARAM_START_NAME
           
 
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
Commodore64Applet()
          Create an instance.
 
Method Summary
 void destroy()
           
 java.lang.String getAppletInfo()
           
 java.lang.String[][] getParameterInfo()
           
 void init()
           
 void loadImage(java.lang.String imageName)
          Attach a named image from JavaScript.
 void loadImage(java.lang.String imageName, java.lang.String fileName)
          Allows to load a named image from JavaScript.
 void reset()
          Reset the emulation.
 void setInputDevice(int device)
          Set the input device to either the keyboard, joystick one, or joystick two.
 void start()
           
 
Methods inherited from class java.applet.Applet
getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, stop
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PARAM_IMAGE_FILE

public static final java.lang.String PARAM_IMAGE_FILE
See Also:
Constant Field Values

PARAM_START_NAME

public static final java.lang.String PARAM_START_NAME
See Also:
Constant Field Values

PARAM_DEVICE_ID

public static final java.lang.String PARAM_DEVICE_ID
See Also:
Constant Field Values

PARAM_GRAB_FOCUS

public static final java.lang.String PARAM_GRAB_FOCUS
See Also:
Constant Field Values

PARAM_COMMA_ONE

public static final java.lang.String PARAM_COMMA_ONE
See Also:
Constant Field Values
Constructor Detail

Commodore64Applet

public Commodore64Applet()
Create an instance.

Method Detail

init

public void init()

destroy

public void destroy()

start

public void start()

getAppletInfo

public java.lang.String getAppletInfo()

loadImage

public void loadImage(java.lang.String imageName,
                      java.lang.String fileName)
Allows to load a named image from JavaScript.

Parameters:
imageName - The name of the image file in the host file system.
fileName - The name of the Commodore 64 file to load from the image. If null then the image is attached and nothing is loaded.

loadImage

public void loadImage(java.lang.String imageName)
Attach a named image from JavaScript.

Parameters:
imageName - The name of the image to load. This will be resolved against the code base URL.

reset

public void reset()
Reset the emulation. Note that a reset will not work if the program that is executed in the emulation modified the reset vector. While this is authentic behaviour of the Commodore 64, we should add the ability to perform a hard reset.


setInputDevice

public void setInputDevice(int device)
Set the input device to either the keyboard, joystick one, or joystick two.

Parameters:
device - 0 = keyboard, 1 = joystick 1, 2 = joystick 2.

getParameterInfo

public java.lang.String[][] getParameterInfo()