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