All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class scrobble.ClientBag

java.lang.Object
   |
   +----scrobble.Bag
           |
           +----scrobble.ClientBag

public class ClientBag
extends Bag
implements GameLinkListener, GameLinkConstants
This class is the client version of the class Bag, mostly devoted for the graphic interface.


Variable Index

 o baglabel
The label which contains the score of Player;
 o bagSize
 o debug
if true, enables the printing of debug informations on the console.
 o letters

Constructor Index

 o ClientBag()
Creates a new ClientBag
 o ClientBag(int)
Creates a new ClientBag knowing the number of letters that it must contain.

Method Index

 o displayLetters()
Displays the letter that is containing
 o frameReceived(Object, LinkFrame)
Invoked when a new data frame is received.
 o getComponent()
 o getLetterNbr()
Returns the number of letters left
 o setLetterNbr(int)
 o updateLabel()

Variables

 o debug
 static boolean debug
if true, enables the printing of debug informations on the console.

 o baglabel
 protected JLabel baglabel
The label which contains the score of Player;

 o bagSize
 protected int bagSize
 o letters
 Vector letters

Constructors

 o ClientBag
 public ClientBag()
Creates a new ClientBag

 o ClientBag
 public ClientBag(int bagSize)
Creates a new ClientBag knowing the number of letters that it must contain.

Methods

 o getLetterNbr
 public int getLetterNbr()
Returns the number of letters left

 o setLetterNbr
 void setLetterNbr(int newSize)
 o updateLabel
 void updateLabel()
 o displayLetters
 public String displayLetters()
Displays the letter that is containing

 o frameReceived
 public void frameReceived(Object link,
                           LinkFrame frame)
Invoked when a new data frame is received.

Parameters:
frame - the frame that has just been received.
 o getComponent
 public Component getComponent()

All Packages  Class Hierarchy  This Package  Previous  Next  Index