Class Square

java.lang.Object
  extended bySquare

public abstract class Square
extends java.lang.Object

This class builds and controls a Square of the Board. Icon construction is handled here. Square is abstract, and each type of square is supered from it.

Version:
2.0
Author:
3GP01 - Hardev Bhamra, Deepak Chandarana, James Tompkin
See Also:
Board

Constructor Summary
Square()
           
Square(int xx, int yy)
           
Square(Letter l)
           
 
Method Summary
 void clear()
           
abstract  java.lang.Object clone()
           
abstract  java.awt.Color getColor()
           
abstract  java.lang.String getDescription()
           
 javax.swing.ImageIcon getDisabledIcon(java.awt.Color color)
           
 javax.swing.ImageIcon getIcon(java.awt.Color color)
           
 Letter getLetter()
           
 Letter getLetterFromSymbol(char sym)
           
 int getLetterScore()
           
abstract  int getLetterScore(Letter l)
           
 javax.swing.ImageIcon getPressedIcon(java.awt.Color color)
           
 javax.swing.ImageIcon getRolloverIcon(java.awt.Color color)
           
 Scrabble getScrabble()
           
 java.lang.String getText()
           
abstract  int getWordScore()
           
 int getX()
           
 int getY()
           
 boolean isOccupied()
           
 void setLetter(Letter l)
           
 void setX(int xx)
           
 void setY(int yy)
           
abstract  java.lang.String squareSymbol()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Square

public Square()

Square

public Square(int xx,
              int yy)

Square

public Square(Letter l)
Method Detail

getScrabble

public Scrabble getScrabble()

setLetter

public void setLetter(Letter l)

setX

public void setX(int xx)

setY

public void setY(int yy)

getIcon

public javax.swing.ImageIcon getIcon(java.awt.Color color)

getDisabledIcon

public javax.swing.ImageIcon getDisabledIcon(java.awt.Color color)

getRolloverIcon

public javax.swing.ImageIcon getRolloverIcon(java.awt.Color color)

getPressedIcon

public javax.swing.ImageIcon getPressedIcon(java.awt.Color color)

getDescription

public abstract java.lang.String getDescription()

getX

public int getX()

getY

public int getY()

clear

public void clear()

getLetter

public Letter getLetter()

getLetterFromSymbol

public Letter getLetterFromSymbol(char sym)

isOccupied

public boolean isOccupied()

getLetterScore

public abstract int getLetterScore(Letter l)

getLetterScore

public int getLetterScore()

getWordScore

public abstract int getWordScore()

squareSymbol

public abstract java.lang.String squareSymbol()

toString

public java.lang.String toString()

getText

public java.lang.String getText()

getColor

public abstract java.awt.Color getColor()

clone

public abstract java.lang.Object clone()