|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cvut.agents.rph.core.GameView
public abstract class GameView
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 |
---|
private java.util.List<java.awt.event.ActionListener> listeners
Constructor Detail |
---|
public GameView()
Method Detail |
---|
public void addActionListener(java.awt.event.ActionListener listener)
listener
- public void removeActionListener(java.awt.event.ActionListener listener)
listener
- public void notifyListeners(java.awt.event.ActionEvent e)
e
- public abstract void update()
GameModel
- the model was changed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |