Class PlainPuzzleIcon

java.lang.Object
  extended byPlainPuzzleIcon
All Implemented Interfaces:
javax.swing.Icon

public class PlainPuzzleIcon
extends java.lang.Object
implements javax.swing.Icon

Not in image, just a numbered puzzle icon/tile.


Field Summary
protected  java.lang.String myLabel
           
protected  int mySize
           
 
Constructor Summary
PlainPuzzleIcon(java.lang.String label, int size)
          Create a tile with specific label of designated size.
 
Method Summary
 int getIconHeight()
          Needed for interface, not used in this project.
 int getIconWidth()
          Needed for interface, not used in this project.
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
          Draws this plain icon at the proper size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myLabel

protected java.lang.String myLabel

mySize

protected int mySize
Constructor Detail

PlainPuzzleIcon

public PlainPuzzleIcon(java.lang.String label,
                       int size)
Create a tile with specific label of designated size.

Method Detail

paintIcon

public void paintIcon(java.awt.Component c,
                      java.awt.Graphics g,
                      int x,
                      int y)
Draws this plain icon at the proper size.

Specified by:
paintIcon in interface javax.swing.Icon
Parameters:
c - is used to determine how big to draw this Icon
g - is the graphics context in which drawing takes place

getIconHeight

public int getIconHeight()
Needed for interface, not used in this project.

Specified by:
getIconHeight in interface javax.swing.Icon

getIconWidth

public int getIconWidth()
Needed for interface, not used in this project.

Specified by:
getIconWidth in interface javax.swing.Icon