talx x1.0.5

talx.games
Interface GameView

All Superinterfaces:
ControllerListener, java.util.EventListener, GameListener, TALComponent
All Known Implementing Classes:
HelpDeskView, SurveyView, TechView

public interface GameView
extends ControllerListener, GameListener, TALComponent

Provides visual representation of game state. When the GameManager calls the factory method, it automatically subscribes the game view object to the proper game and controller objects upon creation. Like all visual components, game views should only update themselves in the AWT EventQueue's dispatch thread.

GameView extends GameListener because each GameView is expected to update itself automatically to reflect changes in the game state. It is a violation of the Thinkandlink specification for game views to cache state information. Therefore, the game view should update the state of its controlls whenever a game event occurs whether or not the view is currently showing.

GameView extends ControllerListener because each view is expected to monitor the GUIState object's current player. The view should add or delete itself from the desktop depending on whether or not it's player is the current player. In general, game views should respond to controller change events and ignore change finished and illegal button press events.

GameView extends TALComponent because it will be placed in the desktop as a top-level visual component. The easiest way to provide this functionality is for the implementation class to extend TALPanel. If the implementation class does not extend TALPanel or does not call TALPanel.init(controls, true) with all the active controls, then it must also register the active controls with the ActionDispatcher. It is a violation of the thinkandlink specification for visual components to listen to their own actions, except to repackage those actions before sending them to the ActionDispatcher. It is a severe violation of the thinkandlink specification for visual components to react to activation of their controls. All controls in the game view should implement the GameControl interface so that the controller can find the game attached to the control when it is activated. All TAL visual classes (that is, descendents of Component) must have a call to setName() in the constructor so that the activity monitoring software can track user behavior. The TALPanel constructor takes care of this for its subclasses.

See Also:
Game Service Provider Interface Documentation

Methods inherited from interface talx.controller.ControllerListener
controllerChange, controllerChangeFinished, controllerChangeVetoed
 
Methods inherited from interface talx.games.GameListener
localModelChange, remoteModelChange
 
Methods inherited from interface talx.view.TALComponent
getFocusCycleCurrent, getFocusCycleStart, getNextFocusOwner, getPreviousFocusOwner, isFocusable, isFocusCycleEnd
 


talx x1.0.5

© 2001-2005 University of Oregon.
Eugene OR 97403, U.S.A. All Rights Reserved.