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.
-
EuropaQueueComponent(GameInfo, EuropaClient)
- Create a EuropaQueueComponent with the given GameInfo and
EuropaClient.
-
hilite()
- Hilite this component with the appropriate color and
draw.
-
minimumSize()
-
-
normal()
- Erase any previous hilites in this component by drawing
in black.
-
paint(Graphics)
- Paints the panel.
-
preferredSize()
-
-
resetGameInfo(GameInfo)
- make the component up to date before repainting with superclass method
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
resetGameInfo
public void resetGameInfo(GameInfo g)
- make the component up to date before repainting with superclass method
- Overrides:
- resetGameInfo in class QueueComponent
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
hilite
public void hilite()
- Hilite this component with the appropriate color and
draw.
- Overrides:
- hilite in class QueueComponent
normal
public void normal()
- Erase any previous hilites in this component by drawing
in black.
- Overrides:
- normal in class QueueComponent
minimumSize
public Dimension minimumSize()
- Overrides:
- minimumSize in class Container
preferredSize
public Dimension preferredSize()
- Overrides:
- preferredSize in class Container
All Packages Class Hierarchy This Package Previous Next Index