GF4J 0.9.4 Beta

gameframe
Class ApplicationAppletBase

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--gameframe.ApplicationAppletBase
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.lang.Runnable, java.io.Serializable

public class ApplicationAppletBase
extends java.applet.Applet
implements java.lang.Runnable

Base class for a game that can act both as application and as an applet.

Since:
GameFrame for Java 0.9.4
Version:
GameFrame for Java 0.9.4
Author:
Pasi Keränen 07. Apr 2000
See Also:
Serialized Form

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
ApplicationAppletBase()
          Constructs the example Applet.
ApplicationAppletBase(java.lang.String[] args)
          Constructs the example application and stores the command line arguments given.
 
Method Summary
 void destroy()
          Closes and cleans up after applet/application.
 void init()
          Initializes the GameFrame for Java library.
static void main(java.lang.String[] args)
          Starts up the example application (creates an instance and calls the init() and start() methods of the instance).
 void paint(java.awt.Graphics grfx)
          Overridden to display a text message when the applet has stopped execution (user presses ESC etc.)
 void run()
          Executes the example applet/application
 void start()
          Starts the applet/application running.
 void stop()
          Stops the applets/applications running.
 
Methods inherited from class java.applet.Applet
getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, disable, dispatchEvent, enable, enable, enableInputMethods, 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, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApplicationAppletBase

public ApplicationAppletBase(java.lang.String[] args)
Constructs the example application and stores the command line arguments given. This method is called when the program is ran as a stand alone application.
Parameters:
args - The command line arguments given.

ApplicationAppletBase

public ApplicationAppletBase()
Constructs the example Applet. This is used when running the program as an Applet.
Method Detail

main

public static void main(java.lang.String[] args)
Starts up the example application (creates an instance and calls the init() and start() methods of the instance).

init

public void init()
Initializes the GameFrame for Java library. Subclasses can override this to initialize themselves (but remember to say "super.init()" as the first statement in the overriding init() method).
Overrides:
init in class java.applet.Applet

start

public void start()
Starts the applet/application running.
Overrides:
start in class java.applet.Applet

run

public void run()
Executes the example applet/application
Specified by:
run in interface java.lang.Runnable

paint

public void paint(java.awt.Graphics grfx)
Overridden to display a text message when the applet has stopped execution (user presses ESC etc.)
Overrides:
paint in class java.awt.Container
Parameters:
grfx - The graphics context to draw to.

stop

public void stop()
Stops the applets/applications running.
Overrides:
stop in class java.applet.Applet

destroy

public void destroy()
Closes and cleans up after applet/application.
Overrides:
destroy in class java.applet.Applet

GF4J 0.9.4 Beta