Class Board

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----com.sun.java.swing.JFrame
                                           |
                                           +----Board

public class Board
extends JFrame
implements MouseListener, WindowListener, ActionListener, KeyListener
This GUI handling class is responsible for showing the mud window and displaying the players / monsters / items / etc'. It handles all events and delivers the appropriate ones to the main Mud object which it gets in the constructor.


Variable Index

 o d_drawPanel
 o d_matrixViewStatus
 o d_mazeSquareSize

Constructor Index

 o Board(Mud)
Constructor

Method Index

 o actionPerformed(ActionEvent)
 o addToItemsPanel(Item, Color)
 o changeItemOwner(Item, Color)
 o clickOnTakenItem(Item)
 o displayMsg(String)
Displays a message in the boards top label
 o displayPower(int)
 o finalInit()
 o forceResize()
 o keyPressed(KeyEvent)
 o keyReleased(KeyEvent)
 o keyTyped(KeyEvent)
 o mouseClicked(MouseEvent)
 o mouseEntered(MouseEvent)
 o mouseExited(MouseEvent)
 o mousePressed(MouseEvent)
 o mouseReleased(MouseEvent)
 o paint(Graphics)
 o removeFromItemsPanel(String)
 o showSpot(int, int)
Called from MUD to make the move after it was already checked
 o update(Graphics)
 o windowActivated(WindowEvent)
 o windowClosed(WindowEvent)
 o windowClosing(WindowEvent)
 o windowDeactivated(WindowEvent)
 o windowDeiconified(WindowEvent)
 o windowIconified(WindowEvent)
 o windowOpened(WindowEvent)

Variables

 o d_mazeSquareSize
 public static final int d_mazeSquareSize
 o d_drawPanel
 public JPanel d_drawPanel
 o d_matrixViewStatus
 public boolean d_matrixViewStatus[][]

Constructors

 o Board
 public Board(Mud m)
Constructor

Parameters:
m - Mud - caller as parameter

Methods

 o mouseClicked
 public void mouseClicked(MouseEvent e)
 o mousePressed
 public void mousePressed(MouseEvent e)
 o mouseReleased
 public void mouseReleased(MouseEvent e)
 o mouseEntered
 public void mouseEntered(MouseEvent e)
 o mouseExited
 public void mouseExited(MouseEvent e)
 o paint
 public void paint(Graphics g)
Overrides:
paint in class Container
 o update
 public void update(Graphics g)
Overrides:
update in class JFrame
 o windowClosing
 public void windowClosing(WindowEvent e)
 o windowActivated
 public void windowActivated(WindowEvent e)
 o windowClosed
 public void windowClosed(WindowEvent e)
 o windowDeactivated
 public void windowDeactivated(WindowEvent e)
 o windowDeiconified
 public void windowDeiconified(WindowEvent e)
 o windowIconified
 public void windowIconified(WindowEvent e)
 o windowOpened
 public void windowOpened(WindowEvent e)
 o keyReleased
 public void keyReleased(KeyEvent e)
 o keyTyped
 public void keyTyped(KeyEvent e)
 o keyPressed
 public void keyPressed(KeyEvent e)
 o actionPerformed
 public void actionPerformed(ActionEvent e)
 o finalInit
 public void finalInit()
 o forceResize
 public void forceResize()
 o displayMsg
 public void displayMsg(String msg)
Displays a message in the boards top label

 o displayPower
 public void displayPower(int power)
 o clickOnTakenItem
 public void clickOnTakenItem(Item item)
 o addToItemsPanel
 public void addToItemsPanel(Item item,
                             Color c)
 o removeFromItemsPanel
 public void removeFromItemsPanel(String itemName)
 o changeItemOwner
 public void changeItemOwner(Item item,
                             Color c)
 o showSpot
 public void showSpot(int x,
                      int y)
Called from MUD to make the move after it was already checked