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.
-
d_drawPanel
-
-
d_matrixViewStatus
-
-
d_mazeSquareSize
-
-
Board(Mud)
- Constructor
-
actionPerformed(ActionEvent)
-
-
addToItemsPanel(Item, Color)
-
-
changeItemOwner(Item, Color)
-
-
clickOnTakenItem(Item)
-
-
displayMsg(String)
- Displays a message in the boards top label
-
displayPower(int)
-
-
finalInit()
-
-
forceResize()
-
-
keyPressed(KeyEvent)
-
-
keyReleased(KeyEvent)
-
-
keyTyped(KeyEvent)
-
-
mouseClicked(MouseEvent)
-
-
mouseEntered(MouseEvent)
-
-
mouseExited(MouseEvent)
-
-
mousePressed(MouseEvent)
-
-
mouseReleased(MouseEvent)
-
-
paint(Graphics)
-
-
removeFromItemsPanel(String)
-
-
showSpot(int, int)
- Called from MUD to make the move after it was already checked
-
update(Graphics)
-
-
windowActivated(WindowEvent)
-
-
windowClosed(WindowEvent)
-
-
windowClosing(WindowEvent)
-
-
windowDeactivated(WindowEvent)
-
-
windowDeiconified(WindowEvent)
-
-
windowIconified(WindowEvent)
-
-
windowOpened(WindowEvent)
-
d_mazeSquareSize
public static final int d_mazeSquareSize
d_drawPanel
public JPanel d_drawPanel
d_matrixViewStatus
public boolean d_matrixViewStatus[][]
Board
public Board(Mud m)
- Constructor
- Parameters:
- m - Mud - caller as parameter
mouseClicked
public void mouseClicked(MouseEvent e)
mousePressed
public void mousePressed(MouseEvent e)
mouseReleased
public void mouseReleased(MouseEvent e)
mouseEntered
public void mouseEntered(MouseEvent e)
mouseExited
public void mouseExited(MouseEvent e)
paint
public void paint(Graphics g)
- Overrides:
- paint in class Container
update
public void update(Graphics g)
- Overrides:
- update in class JFrame
windowClosing
public void windowClosing(WindowEvent e)
windowActivated
public void windowActivated(WindowEvent e)
windowClosed
public void windowClosed(WindowEvent e)
windowDeactivated
public void windowDeactivated(WindowEvent e)
windowDeiconified
public void windowDeiconified(WindowEvent e)
windowIconified
public void windowIconified(WindowEvent e)
windowOpened
public void windowOpened(WindowEvent e)
keyReleased
public void keyReleased(KeyEvent e)
keyTyped
public void keyTyped(KeyEvent e)
keyPressed
public void keyPressed(KeyEvent e)
actionPerformed
public void actionPerformed(ActionEvent e)
finalInit
public void finalInit()
forceResize
public void forceResize()
displayMsg
public void displayMsg(String msg)
- Displays a message in the boards top label
displayPower
public void displayPower(int power)
clickOnTakenItem
public void clickOnTakenItem(Item item)
addToItemsPanel
public void addToItemsPanel(Item item,
Color c)
removeFromItemsPanel
public void removeFromItemsPanel(String itemName)
changeItemOwner
public void changeItemOwner(Item item,
Color c)
showSpot
public void showSpot(int x,
int y)
- Called from MUD to make the move after it was already checked