smithers.logicpuzzles
Class HanjieGraphics
java.lang.Object
   smithers.logicpuzzles.HanjieGraphics
smithers.logicpuzzles.HanjieGraphics
- All Implemented Interfaces: 
- java.awt.event.MouseListener, java.util.EventListener, PuzzleGraphics
- public class HanjieGraphics 
- extends java.lang.Object- implements PuzzleGraphics
 
 
| Method Summary | 
|  java.awt.Rectangle | draw(java.awt.Graphics g,
     java.awt.Rectangle r)Draws the puzzle onto a graphics object.
 | 
|  void | mouseClicked(java.awt.event.MouseEvent e)
 | 
|  void | mouseEntered(java.awt.event.MouseEvent e)
 | 
|  void | mouseExited(java.awt.event.MouseEvent e)
 | 
|  void | mousePressed(java.awt.event.MouseEvent e)
 | 
|  void | mouseReleased(java.awt.event.MouseEvent e)
 | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
COLOUR_UNKNOWN
public static final java.awt.Color COLOUR_UNKNOWN
COLOUR_BORDERS
public static final java.awt.Color COLOUR_BORDERS
HanjieGraphics
public HanjieGraphics(HanjieState state)
HanjieGraphics
public HanjieGraphics(HanjieSolver solver)
draw
public java.awt.Rectangle draw(java.awt.Graphics g,
                               java.awt.Rectangle r)
- Description copied from interface: PuzzleGraphics
- Draws the puzzle onto a graphics object. This method should attempt to
 fit the puzzle into the given rectangle. The puzzle should be drawn as
 large as possible and centered in the region.
 
- 
- Specified by:
- drawin interface- PuzzleGraphics
 
- 
- Parameters:
- g- the graphics object to draw onto
- r- the region to fit the puzzle into
- Returns:
- the actual bounding rectangle for the puzzle
 
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- 
- Specified by:
- mouseClickedin interface- java.awt.event.MouseListener
 
- 
 
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- 
- Specified by:
- mouseEnteredin interface- java.awt.event.MouseListener
 
- 
 
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- 
- Specified by:
- mouseExitedin interface- java.awt.event.MouseListener
 
- 
 
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- 
- Specified by:
- mousePressedin interface- java.awt.event.MouseListener
 
- 
 
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- 
- Specified by:
- mouseReleasedin interface- java.awt.event.MouseListener
 
-