|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.planeth.gtroids.environment.GenericGamePanel
com.planeth.gtroids.environment.GamePanel
The GamePanel contains the physical gameEnvironment and handles the main game tasks.
It defines furthermore the Interface between GameObjects and Graphics.
ITimeControllable,
TimedObjectThread,
GameStats,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| 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 |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| 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 | |
GamePanel()
Constructor for GamePanel. |
|
GamePanel(double gravit)
Constructor for GamePanel. |
|
| Method Summary | |
void |
activateBomb()
Activates a smartBomb |
void |
addPhysicalObject(AbstractPhysicalObject physicalObject)
Adds a AbstractPhysicalObject to the GampePanel |
void |
cleanUp()
Cleans up the game environment (free all resources) |
void |
countEnemyKilled()
Counter for killed enemies. |
void |
createBoss()
Creates a Boss enemy (if not already one is existing) |
void |
decreaseSpeed(int nrOfSteps)
Decreases the gameSpeed with the passed number of predefined speed steps. |
void |
doNextStep()
Does one game step (update, render, paint) |
void |
enableBlackHoles()
Enables the BlackHoles Creates 2 BlackHole Objects. |
void |
enableMaxGravit()
Enables the max gravitation (Asteroid trap) Changes the normal gravitation to something like earth gravit. |
Boss |
getBoss()
Returns the Boss enemy, if one is existing |
WordReader |
getCheatReader()
Returns the cheatReader |
FieldedArea |
getFieldedArea()
Returns the fieldedArea (Object container) |
double |
getGravit()
Returns the gravit. |
int |
getNonPlayerShipCount()
Returns the complete number of nonPlayerShips used in the game |
Ship |
getShip()
Returns the PlayerShip, if one is existing |
double |
getSpeed()
Returns the gameSpeed. |
GameStats |
getStats()
Returns the gameStats |
void |
increaseSpeed()
Increases the gameSpeed with one predefined speed step |
void |
initGameField()
Initializes the gamefield |
boolean |
isEarthGravitActive()
Returns true, if any earth like gravitation is active. |
boolean |
isPaused()
Returns true, if the game is paused |
boolean |
isReadyToDie()
Returns true, if the GamePanel is ready to get terminated |
void |
notifyBossKill()
Notifies the GamePanel that a Boss Enemy has been killed Initiate the level change. |
void |
pause(boolean pauseState)
Pauses/unpauses the game |
void |
setReadyToDie()
Sets the GamePanel readyToDie |
void |
setResourceLoader(java.lang.Thread resourceLoader)
Sets the resourceLoader. |
void |
setResourceProgressBar(javax.swing.JProgressBar resourceProgressBar)
Sets the resourceProgressBar. |
void |
setSpeed(double speed)
Sets the gameSpeed. |
void |
startNewGame()
Starts a new game |
| Methods inherited from class com.planeth.gtroids.environment.GenericGamePanel |
countFrames, getCenter, getEastBrd, getFramesPerSecond, getNorthBrd, getSouthBrd, getWestBrd, isAllowMoreGeometry |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public GamePanel()
public GamePanel(double gravit)
gravit - base gravitation value for the GamePanel| Method Detail |
public void startNewGame()
public void pause(boolean pauseState)
pause in interface ITimeControllablepauseState - ITimeControllable.pause(boolean)public boolean isPaused()
public void initGameField()
public void cleanUp()
public void addPhysicalObject(AbstractPhysicalObject physicalObject)
physicalObject - the Object to be addedpublic void doNextStep()
doNextStep in interface IThreadControllableIThreadControllable.doNextStep()public int getNonPlayerShipCount()
public Ship getShip()
public boolean isReadyToDie()
isReadyToDie in interface IThreadControllableIThreadControllable.isReadyToDie()public void setReadyToDie()
setReadyToDie in interface IThreadControllablepublic void activateBomb()
public void enableBlackHoles()
public void createBoss()
public void notifyBossKill()
public Boss getBoss()
public void countEnemyKilled()
public void enableMaxGravit()
public double getGravit()
public boolean isEarthGravitActive()
public double getSpeed()
public void setSpeed(double speed)
speed - The speed to setpublic void increaseSpeed()
public void decreaseSpeed(int nrOfSteps)
nrOfSteps - number of speed steps to decreasepublic GameStats getStats()
public FieldedArea getFieldedArea()
public WordReader getCheatReader()
public void setResourceLoader(java.lang.Thread resourceLoader)
resourceLoader - The resourceLoader to set.public void setResourceProgressBar(javax.swing.JProgressBar resourceProgressBar)
resourceProgressBar - The resourceProgressBar to set.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||