|
|||||||
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 | +--FishWorld
FishWorld, a point and click game with fishes
Copyright (c) 2001,2002 by Stephan Uhlmann <su@su2.info>
published under the GPL
Inner Class Summary | |
(package private) class |
FishWorld.FishWorldKeyAdapter
KeyAdapter for receiving the KeyEvent's we need |
(package private) class |
FishWorld.FishWorldMouseAdapter
MouseAdapter for receiving the MouseEvent's we need |
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, java.awt.Component.AWTTreeLock |
Field Summary | |
(package private) java.awt.Image |
bg01
|
(package private) java.awt.Image |
bg02
|
(package private) java.awt.Image |
bg03
|
(package private) java.awt.Image |
bg04
|
(package private) java.awt.Image |
bg11
|
(package private) java.awt.Image |
bg12
|
(package private) java.awt.Image |
bg13
|
(package private) java.awt.Image |
bg14
|
(package private) java.util.Vector |
bubImages
|
(package private) int |
clickLock
|
(package private) java.awt.Graphics |
dbGraphics
|
(package private) java.awt.Image |
dbImage
|
(package private) int |
dynamiteCount
|
(package private) java.awt.Image |
dynamiteImage
|
(package private) java.util.Vector |
fishes
|
(package private) java.util.Vector |
fishImages
|
static int |
GAME_STATE_AFTER_GAME
|
static int |
GAME_STATE_AFTER_GAME_HIGHSCORE
|
static int |
GAME_STATE_BEFORE_GAME
|
static int |
GAME_STATE_IN_GAME
|
static int |
GAME_STATE_LOADING
|
(package private) int |
gameState
|
(package private) Highscore |
highscore
|
(package private) boolean |
keyPressed
|
(package private) char |
keyPressedChar
|
(package private) int |
loadProgress
|
(package private) int |
mouseClickButton
|
(package private) boolean |
mouseClicked
|
(package private) int |
mouseClickX
|
(package private) int |
mouseClickY
|
(package private) java.awt.Color |
myBgColor
|
(package private) java.awt.Color |
myFgColor
|
(package private) java.awt.Font |
myFont
|
(package private) java.lang.Thread |
myThread
|
(package private) java.lang.String |
name
|
(package private) int |
score
|
(package private) boolean |
threadQuit
|
(package private) boolean |
threadRunning
|
Fields inherited from class java.applet.Applet |
accessibleContext, serialVersionUID, stub |
Fields inherited from class java.awt.Panel |
base, nameCounter |
Fields inherited from class java.awt.Container |
component, containerListener, containerSerializedDataVersion, dbg, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads |
Fields inherited from class java.awt.Component |
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
FishWorld()
|
Method Summary | |
void |
checkFishKill()
checks if a mouse click hit a fish and changes score then |
void |
drawFishes(java.awt.Graphics g)
draws the fishes |
java.lang.String |
getAppletInfo()
returns info about this applet |
void |
init()
initializes the applet |
void |
loadGraphics()
loads the graphics, increments loadProgress and calls repaint() after every loaded image (to display progress bar) |
void |
moveFishes()
moves the fishes around and checks if a fish arrived at the other side |
void |
newFish()
creates a new Fish and adds him to the fishes Vector |
void |
paint(java.awt.Graphics g)
paints the Applet, just calls update() |
void |
run()
runs the Applet Thread, loops infinite until theadQuit is set to true |
void |
start()
starts applet by forking a new Thread of ourself and starting this Thread |
void |
stop()
stops the Applet Thread by setting threadQuit to true and waiting until the Thread exists its run loop |
void |
update(java.awt.Graphics g)
paints the Applet depending from current gameState, uses double buffering |
Methods inherited from class java.applet.Applet |
destroy, getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus |
Methods inherited from class java.awt.Panel |
|
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, adjustListeningChildren, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, initIDs, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, nextFocus, numListening, paintComponents, paintHeavyweightComponents, paramString, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, print, printComponents, printHeavyweightComponents, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, readObject, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusOwner, setFont, setLayout, transferFocus, validate, validateTree, writeObject |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, 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, resetGC, 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, registerNatives, wait, wait, wait |
Field Detail |
java.lang.Thread myThread
boolean threadRunning
boolean threadQuit
java.awt.Image dbImage
java.awt.Graphics dbGraphics
java.awt.Color myFgColor
java.awt.Color myBgColor
java.awt.Font myFont
boolean mouseClicked
int mouseClickX
int mouseClickY
int mouseClickButton
int clickLock
boolean keyPressed
char keyPressedChar
java.util.Vector fishes
java.util.Vector fishImages
java.util.Vector bubImages
java.awt.Image bg01
java.awt.Image bg02
java.awt.Image bg03
java.awt.Image bg04
java.awt.Image bg11
java.awt.Image bg12
java.awt.Image bg13
java.awt.Image bg14
java.awt.Image dynamiteImage
int dynamiteCount
int score
Highscore highscore
java.lang.String name
int gameState
int loadProgress
public static final int GAME_STATE_LOADING
public static final int GAME_STATE_BEFORE_GAME
public static final int GAME_STATE_IN_GAME
public static final int GAME_STATE_AFTER_GAME_HIGHSCORE
public static final int GAME_STATE_AFTER_GAME
Constructor Detail |
public FishWorld()
Method Detail |
public java.lang.String getAppletInfo()
getAppletInfo
in class java.applet.Applet
public void init()
init
in class java.applet.Applet
public void start()
start
in class java.applet.Applet
public void stop()
stop
in class java.applet.Applet
public void run()
run
in interface java.lang.Runnable
public void paint(java.awt.Graphics g)
paint
in class java.awt.Container
public void update(java.awt.Graphics g)
update
in class java.awt.Container
public void loadGraphics()
public void newFish()
public void drawFishes(java.awt.Graphics g)
public void moveFishes()
public void checkFishKill()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |