Class games.Battle.client.EuropaClient.EuropaQueueComponent
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class games.Battle.client.EuropaClient.EuropaQueueComponent

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----games.Battle.client.EuropaClient.QueueComponent
                                   |
                                   +----games.Battle.client.EuropaClient.EuropaQueueComponent

public class EuropaQueueComponent
extends QueueComponent
The EuropaQueueComponent is a graphical representation of a QueueComponent, giving visual feedback to players on who is currently waiting for or currently playing a game on the server. This implementation displays an image of the moon in the center of the component with some number of "satellites" surrounding the moon. When a player joins a game, his or her name is added to a satellite with an appropriate player color. The player ranking is also displayed below the name.

Constructor Index

 o EuropaQueueComponent(GameInfo, EuropaClient)
Create a EuropaQueueComponent with the given GameInfo and EuropaClient.

Method Index

 o hilite()
Hilite this component with the appropriate color and draw.
 o minimumSize()
 o normal()
Erase any previous hilites in this component by drawing in black.
 o paint(Graphics)
Paints the panel.
 o preferredSize()
 o resetGameInfo(GameInfo)
make the component up to date before repainting with superclass method

Constructors

 o EuropaQueueComponent
  public EuropaQueueComponent(GameInfo inf,
                              EuropaClient client)
Create a EuropaQueueComponent with the given GameInfo and EuropaClient. Initializes the locations of the satellites in the square and initiazes all of the display strings to nothing.
Parameters:
inf - the game info
client - the "owner" client applet

Methods

 o resetGameInfo
  public void resetGameInfo(GameInfo g)
make the component up to date before repainting with superclass method
Overrides:
resetGameInfo in class QueueComponent
 o paint
  public void paint(Graphics g)
Paints the panel. Any satellites with no label are painted gray, all others are painted their appropriate player color.
Parameters:
g - the graphics context to draw on
Overrides:
paint in class Component
 o hilite
  public void hilite()
Hilite this component with the appropriate color and draw.
Overrides:
hilite in class QueueComponent
 o normal
  public void normal()
Erase any previous hilites in this component by drawing in black.
Overrides:
normal in class QueueComponent
 o minimumSize
  public Dimension minimumSize()
Overrides:
minimumSize in class Container
 o preferredSize
  public Dimension preferredSize()
Overrides:
preferredSize in class Container

All Packages  Class Hierarchy  This Package  Previous  Next  Index