Class BkgPanel

Class BkgPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----BkgPanel

public class BkgPanel
extends Panel
A panel that contains a background picture which is stretched to fill the entire panel.
Version:
1.1
Author:
Torbjörn Nilsson

Method Index

 o action(Event, Object)
Check if a button ha been pressed when the BkgPanel has a certain use.
 o handleEvent(Event)
If BkgPanel is used as a research room, this method creates a new ResearchSpell if a spell is chosen from the list.
 o mouseDown(Event, int, int)
Callback to method "mapEvent" in Clienthread with args x and y.
 o paint(Graphics)
Do different painting stuff depending on the the usage of the BkgPanel.
 o update(Graphics)
Remove flickering.
 o updateBanners()
If the BkgPanel is used as a map, there are a separate thread running animating the banners on the map.

Methods

 o mouseDown
  public boolean mouseDown(Event e,
                           int x,
                           int y)
Callback to method "mapEvent" in Clienthread with args x and y.
Overrides:
mouseDown in class Component
 o action
  public boolean action(Event evt,
                        Object arg)
Check if a button ha been pressed when the BkgPanel has a certain use. This causes different actions to take place in the ClientThread.
Overrides:
action in class Component
 o handleEvent
  public boolean handleEvent(Event evt)
If BkgPanel is used as a research room, this method creates a new ResearchSpell if a spell is chosen from the list.
Overrides:
handleEvent in class Component
 o update
  public void update(Graphics g)
Remove flickering.
Overrides:
update in class Component
 o paint
  public void paint(Graphics g)
Do different painting stuff depending on the the usage of the BkgPanel.
Overrides:
paint in class Component
 o updateBanners
  public void updateBanners()
If the BkgPanel is used as a map, there are a separate thread running animating the banners on the map. When we want to update what banners should really be shown, this method is called, which then scans the map[][] in the ClientThread. When we enter this method, the Banner thread has been suspended!!!