|
|||||||||
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 | +--javax.swing.JComponent | +--javax.swing.JPanel | +--org.game.JVirus.JVirusPanel
Main panel. This panel contains the control panel and the DisplayBackPanel. The DisplayBackPanel contain the Display and the message panel.
DisplayBackPanel
, Serialized FormInner Class Summary | |
protected class |
JVirusPanel.ContinueGamePanel
the selection of level message |
protected class |
JVirusPanel.GameListener
Callback listener for ActionControl |
protected class |
JVirusPanel.HelpViewer
Panel that shows the Help HTML file |
protected class |
JVirusPanel.MenuActionListener
menu listener for menu and key events |
protected class |
JVirusPanel.MessagePanel
Message panel for win or lose messages |
protected class |
JVirusPanel.MusicActionListener
menu listener for music menu events (1-9 or music on/of) |
Inner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
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 | |
protected ActionControl |
actionControl
reference to the ActionControl class. |
protected DisplayBackPanel |
backPanel
DisplayBackPanel of this game. |
protected JVirusPanel.ContinueGamePanel |
continueGamePanel
Message to choose a level |
protected Display |
display
Display of this game. |
protected JVirusPanel.GameListener |
gameListener
Call back Class from ActionControl |
protected java.awt.image.BufferedImage |
greenPointImage
Image for solved or not solved levels. |
protected javax.swing.JScrollPane |
helpViewer_scrollPane
if the user select help, the help panel is showing in this ScrollPane |
protected JVirusFrame.JVirusInfoScreen |
infoScreen
reference to the InfoScreen of JVirusFrame |
protected javax.swing.JLabel |
jl_lifes
Label for life points |
protected javax.swing.JLabel |
jl_score
Label for score points |
protected JVSlider |
jvs_midi
reference to slider of music control |
protected JVSlider |
jvs_sound
reference to slider of sound control |
protected javax.swing.JList |
level_list
List with levels |
protected JVirusPanel.MessagePanel |
loseMessage
Message if the user lose the level |
protected JVirusPanel.MessagePanel |
loseMessage2
Message if the user lose the whole game |
protected JVirusPanel.MenuActionListener |
menuActionListener
Listener for menu events |
protected JVirusPanel.MusicActionListener |
musicActionListener
Listener for music choose and music on/off events |
protected javax.swing.JCheckBoxMenuItem |
muteMenu
reference to the music on/off menu |
protected javax.swing.JFrame |
parent
reference to the JVirusFrame |
protected java.awt.image.BufferedImage |
redPointImage
Image for solved or not solved levels. |
protected javax.swing.JCheckBoxMenuItem[] |
sound_menus
List of references to music menus (1-9) |
protected java.util.Random |
sound_random
for Random selection of the background music |
protected java.util.Vector |
vecLevels
the array of avable levels |
protected JVirusPanel.MessagePanel |
winMessage
Message if the user win the level |
protected JVirusPanel.MessagePanel |
winMessage2
Message if the user win the whole game |
protected java.awt.image.BufferedImage |
yellowPointImage
Image for solved or not solved levels. |
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 | |
JVirusPanel(javax.swing.JFrame parent,
JVirusFrame.JVirusInfoScreen infoScreen)
Main constructor |
Method Summary | |
protected javax.swing.JPanel |
createControlPanel()
creates the control panel |
protected javax.swing.JButton |
createJButton(java.lang.String title,
java.lang.String ac)
help function. |
protected javax.swing.JMenu |
createJMenu(java.lang.String title)
help function. |
protected javax.swing.JMenuItem |
createJMenuItem(java.lang.String title,
java.lang.String ac,
int keycode)
help function. |
protected java.awt.image.BufferedImage |
createPointImage(java.awt.Color color)
help function. 20x20 pixel image for solved or not solved levels. |
protected javax.swing.JPanel |
createSeparator(java.awt.Dimension dim)
help function. |
protected javax.swing.JPanel |
createSeparatorHorizontal()
help function. |
protected javax.swing.JPanel |
createSeparatorVertical()
help function. |
protected javax.swing.JCheckBoxMenuItem |
createSoundMenuItem(java.lang.String title,
java.lang.String ac,
boolean selected,
javax.swing.ButtonGroup bg,
int keycode)
help function. |
boolean |
quitGame()
ask the user if he want to quit the game. |
protected void |
startGame(Matrix level)
start the game |
protected void |
stopGame()
stop the game |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUIClassID, paramString, 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, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.awt.image.BufferedImage redPointImage
protected java.awt.image.BufferedImage yellowPointImage
protected java.awt.image.BufferedImage greenPointImage
protected ActionControl actionControl
protected JVirusPanel.GameListener gameListener
protected Display display
protected DisplayBackPanel backPanel
protected javax.swing.JLabel jl_score
protected javax.swing.JLabel jl_lifes
protected JVirusFrame.JVirusInfoScreen infoScreen
JVirusFrame.JVirusInfoScreen
protected javax.swing.JFrame parent
JVirusFrame
protected javax.swing.JList level_list
protected JVirusPanel.MenuActionListener menuActionListener
protected JVirusPanel.MusicActionListener musicActionListener
protected javax.swing.JCheckBoxMenuItem muteMenu
protected JVSlider jvs_midi
protected JVSlider jvs_sound
protected JVirusPanel.MessagePanel loseMessage
DisplayBackPanel
protected JVirusPanel.MessagePanel winMessage
DisplayBackPanel
protected JVirusPanel.MessagePanel loseMessage2
DisplayBackPanel
protected JVirusPanel.MessagePanel winMessage2
DisplayBackPanel
protected javax.swing.JCheckBoxMenuItem[] sound_menus
protected java.util.Random sound_random
protected java.util.Vector vecLevels
Levels
protected JVirusPanel.ContinueGamePanel continueGamePanel
DisplayBackPanel
protected javax.swing.JScrollPane helpViewer_scrollPane
JVirusPanel.HelpViewer
Constructor Detail |
public JVirusPanel(javax.swing.JFrame parent, JVirusFrame.JVirusInfoScreen infoScreen)
parent
- Frame parentinfoScreen
- infoscreen referenceMethod Detail |
protected javax.swing.JPanel createControlPanel()
public boolean quitGame()
protected void startGame(Matrix level)
level
- the level to playprotected void stopGame()
protected java.awt.image.BufferedImage createPointImage(java.awt.Color color)
color
- point colorprotected javax.swing.JPanel createSeparatorVertical()
protected javax.swing.JPanel createSeparatorHorizontal()
protected javax.swing.JPanel createSeparator(java.awt.Dimension dim)
protected javax.swing.JMenu createJMenu(java.lang.String title)
title
- menu titleprotected javax.swing.JMenuItem createJMenuItem(java.lang.String title, java.lang.String ac, int keycode)
title
- menu titleac
- action commandkeycode
- key commandprotected javax.swing.JCheckBoxMenuItem createSoundMenuItem(java.lang.String title, java.lang.String ac, boolean selected, javax.swing.ButtonGroup bg, int keycode)
title
- menu titleac
- action commandkeycode
- key commandselected
- JCheckBoxMenuItem selected or notbg
- button group of music menu buttonsprotected javax.swing.JButton createJButton(java.lang.String title, java.lang.String ac)
title
- menu titleac
- action command
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |