Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.adorphuye.othello.player
Class PlayerDecorator  view PlayerDecorator download PlayerDecorator.java

java.lang.Object
  extended bycom.adorphuye.othello.player.Player
      extended bycom.adorphuye.othello.player.PlayerDecorator
All Implemented Interfaces:
com.adorphuye.othello.gui.board.BoardListener, java.util.EventListener, java.awt.event.MouseListener

public class PlayerDecorator
extends Player
implements java.awt.event.MouseListener


Field Summary
private  Player decoratedPlayer
           
 
Fields inherited from class com.adorphuye.othello.player.Player
DEFAULT_DEPTH, MAX_DEPTH, MIN_DEPTH
 
Constructor Summary
PlayerDecorator()
           
PlayerDecorator(Player p, int num)
          Creates a new instance of PlayerDecorator
 
Method Summary
 void boardChanged(com.adorphuye.othello.gui.board.BoardEvent evt)
           
 int getIndex()
           
 com.adorphuye.othello.gui.board.BoardDataModel getModel()
           
 Player getPlayer()
           
 int getSide()
           
 void mouseClicked(java.awt.event.MouseEvent mouseEvent)
          This method is called when the mouse is clicked (pressed and released in short succession) on a component.
 void mouseEntered(java.awt.event.MouseEvent mouseEvent)
          This method is called when the mouse enters a component.
 void mouseExited(java.awt.event.MouseEvent mouseEvent)
          This method is called when the mouse exits a component.
 void mousePressed(java.awt.event.MouseEvent mouseEvent)
          This method is called when the mouse is pressed over a component.
 void mouseReleased(java.awt.event.MouseEvent mouseEvent)
          This method is called when the mouse is released over a component.
 void play()
           
 void reset()
           
 void setModel(com.adorphuye.othello.gui.board.BoardDataModel mod)
           
 void setPlayer(Player p)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class com.adorphuye.othello.player.Player
setIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

decoratedPlayer

private Player decoratedPlayer
Constructor Detail

PlayerDecorator

public PlayerDecorator()

PlayerDecorator

public PlayerDecorator(Player p,
                       int num)
Creates a new instance of PlayerDecorator

Method Detail

setPlayer

public void setPlayer(Player p)

play

public void play()
Specified by:
play in class Player

getPlayer

public Player getPlayer()

mousePressed

public void mousePressed(java.awt.event.MouseEvent mouseEvent)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse is pressed over a component.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent mouseEvent)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse enters a component.

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent mouseEvent)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse is clicked (pressed and released in short succession) on a component.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent mouseEvent)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse is released over a component.

Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent mouseEvent)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse exits a component.

Specified by:
mouseExited in interface java.awt.event.MouseListener

getIndex

public int getIndex()
Overrides:
getIndex in class Player

getModel

public com.adorphuye.othello.gui.board.BoardDataModel getModel()
Overrides:
getModel in class Player

boardChanged

public void boardChanged(com.adorphuye.othello.gui.board.BoardEvent evt)
Specified by:
boardChanged in interface com.adorphuye.othello.gui.board.BoardListener
Overrides:
boardChanged in class Player

getSide

public int getSide()
Overrides:
getSide in class Player

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).

Overrides:
toString in class Player

setModel

public void setModel(com.adorphuye.othello.gui.board.BoardDataModel mod)
Overrides:
setModel in class Player

reset

public void reset()
Specified by:
reset in class Player