|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cvut.agents.rph.core.GameView
cz.cvut.agents.rph.reversi.ReversiView
public class ReversiView
Specific view for the Reversi game. Author: Ondrej Vanek Date: 10/3/12 Time: 10:04 AM
Field Summary | |
---|---|
private javax.swing.JPanel |
buttonPanel
|
private javax.swing.JPanel |
infoPanel
|
private javax.swing.JLabel |
jLabel3
|
private javax.swing.JLabel |
jLabel6
|
private ReversiModel |
model
Reversi game model. |
private javax.swing.JLabel |
p1MaxTimeLabel
|
private javax.swing.JLabel |
p1NameLabel
|
private javax.swing.JLabel |
p1StonesLabel
|
private javax.swing.JLabel |
p1TotalStonesLabel
|
private javax.swing.JLabel |
p2MaxTimeLabel
|
private javax.swing.JLabel |
p2NameLabel
|
private javax.swing.JLabel |
p2StonesLabel
|
private javax.swing.JLabel |
p2TotalStonesLabel
|
private PlaygroundPanel |
playgroundPanel
Panel depicting the playground. |
private javax.swing.JButton |
playPauseButton
|
private javax.swing.JSlider |
slider
|
static int |
SLIDER_MAX
|
static int |
SLIDER_MIN
|
static int |
SLIDER_VALUE
|
private javax.swing.JLabel |
statusLabel
|
private javax.swing.JPanel |
viewPanel
Viewpanel holding all the visualization |
Constructor Summary | |
---|---|
ReversiView(ReversiModel model)
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
private void |
constructViewPanel()
author Premysl Volf |
private void |
createSlider()
|
int |
getDelayInMiliseconds()
Gets the delay between moves in miliseconds. |
java.awt.Component |
getPanel()
|
private void |
showEndGame()
Shows the end of the game dialog with some info about the result. |
void |
stateChanged(javax.swing.event.ChangeEvent e)
|
void |
update()
Updates view based on the call from the GameModel - the model was changed. |
private void |
updateButton(GameModel.GameStatus playing)
Update the button status. |
Methods inherited from class cz.cvut.agents.rph.core.GameView |
---|
addActionListener, notifyListeners, removeActionListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private ReversiModel model
private javax.swing.JPanel viewPanel
private PlaygroundPanel playgroundPanel
private javax.swing.JPanel infoPanel
private javax.swing.JPanel buttonPanel
private javax.swing.JLabel statusLabel
private javax.swing.JLabel jLabel3
private javax.swing.JLabel jLabel6
private javax.swing.JLabel p1NameLabel
private javax.swing.JLabel p1StonesLabel
private javax.swing.JLabel p1TotalStonesLabel
private javax.swing.JLabel p1MaxTimeLabel
private javax.swing.JLabel p2NameLabel
private javax.swing.JLabel p2StonesLabel
private javax.swing.JLabel p2TotalStonesLabel
private javax.swing.JLabel p2MaxTimeLabel
private javax.swing.JButton playPauseButton
public static final int SLIDER_MIN
public static final int SLIDER_MAX
public static final int SLIDER_VALUE
private javax.swing.JSlider slider
Constructor Detail |
---|
public ReversiView(ReversiModel model)
Method Detail |
---|
private void constructViewPanel()
private void createSlider()
public void update()
GameView
GameModel
- the model was changed.
update
in class GameView
private void showEndGame()
private void updateButton(GameModel.GameStatus playing)
playing
- are we playing or what?public java.awt.Component getPanel()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
public int getDelayInMiliseconds()
DelayChanger
getDelayInMiliseconds
in interface DelayChanger
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |