Start of Tutorial > Start of Trail > Start of Lesson |
Search
Feedback Form |
The following lists and describes all the classes in thebingo.player
package.
Player
-- the main program for the Player application.When invoked, this class creates the UI for the Player application, implemented by
ControlPane
,bingo.shared.LightBoardPane
, andbingo.shared.GameStatusLabel
, and initializes it with the last-saved program settings. The Player class also creates aPlayerQueue
which is used to serialize RMI calls to the Game application.
ControlPane
-- implements the area of the Player's UI that lets the user change program settings and register for a game.
CardWindow
-- implements a window that the Player uses to display BINGO cards.The Player application displays one
CardWindow
per card being played in the current game.CardWindow
creates aPaperPane
for the background of the BINGO card and 25NumberButton
s, one for each space on the BINGO card.
PaperPane
-- a simple class that is used to display the background forCardWindow
.
NumberButton
-- a class used to implement each number on a BINGO card (used byCardWindow
).
PlayerParameters
-- keeps track of all the program settings for the Player application.These settings include whether or not the application should beep to announce new balls, the player's name, the name of the machine on which the Game application is running, the number of cards to play in each game, and the random number seed used to generate the cards. Also, this class, as a subclass of
bingo.shared.Parameters
, converts the program settings toProperties
, saves them to the file system whenever a change takes effect, and reads them in on start up.
PlayerQueue
-- a subclass ofjava.awt.EventQueue
used by the Player to serialize RMI calls to the Game application.The Player application posts events to this queue for each RMI call to the Game. The Player can invoke any one of three different remote methods in the Game. Each remote method is represented by one of these event classes:
RegisterEvent
,StatusRequestEvent
, andIWonEvent
. WhenPlayerQueue
processes an event in the queue, it makes the appropriate RMI call.
RegisterEvent
-- the event representing a remote method call to the Game application'smayIPlay
method.
StatusRequestEvent
-- the event representing a remote method call to the Game application'swhatsHappening
method.
IWonEvent
-- the event representing a remote method call to the Game application'sBINGO
method.
Start of Tutorial > Start of Trail > Start of Lesson |
Search
Feedback Form |
Copyright 1995-2005 Sun Microsystems, Inc. All rights reserved.