cz.cvut.agents.rph.core
Class GameView

java.lang.Object
  extended by cz.cvut.agents.rph.core.GameView
Direct Known Subclasses:
ReversiView

public abstract class GameView
extends java.lang.Object

Represents a view of a game. Author: Ondrej Vanek Date: 10/3/12 Time: 9:51 AM


Field Summary
private  java.util.List<java.awt.event.ActionListener> listeners
          List of listeners listening to the action events from the view.
 
Constructor Summary
GameView()
           
 
Method Summary
 void addActionListener(java.awt.event.ActionListener listener)
          Adds the action listener to listen for the events of the view.
 void notifyListeners(java.awt.event.ActionEvent e)
          Notifies listeners about the event e.
 void removeActionListener(java.awt.event.ActionListener listener)
          Removes an action listener.
abstract  void update()
          Updates view based on the call from the GameModel - the model was changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

private java.util.List<java.awt.event.ActionListener> listeners
List of listeners listening to the action events from the view.

Constructor Detail

GameView

public GameView()
Method Detail

addActionListener

public void addActionListener(java.awt.event.ActionListener listener)
Adds the action listener to listen for the events of the view.

Parameters:
listener -

removeActionListener

public void removeActionListener(java.awt.event.ActionListener listener)
Removes an action listener.

Parameters:
listener -

notifyListeners

public void notifyListeners(java.awt.event.ActionEvent e)
Notifies listeners about the event e.

Parameters:
e -

update

public abstract void update()
Updates view based on the call from the GameModel - the model was changed.