org.game.Juzzle
Class PuzzlePartList.PuzzlePart

java.lang.Object
  |
  +--org.game.Juzzle.PuzzlePartList.PuzzlePart
Enclosing class:
PuzzlePartList

public static class PuzzlePartList.PuzzlePart
extends java.lang.Object

class for one piece


Field Summary
 java.awt.Rectangle boundsImage
          image bounds
 java.awt.Rectangle boundsIn
          inner bounds
 java.awt.Rectangle boundsOut
          outer bounds
 PuzzlePartList.PuzzlePart east
          reference to the neighbourhood
static int EAST
          for locking if two pieces pass together
 java.awt.geom.GeneralPath generalPath
          geometricaly shape
 java.awt.Point locationIn
          location of inner bounds
 java.awt.Point locationOut
          location of outer bounds
 int lock
          if locked to WEST, EAST, NORTH, SOUTH or not
 PuzzlePartList.PuzzlePart next
          next for the group (horizontal linking)
 PuzzlePartList.PuzzlePart nextInGroup
          next in group (vertical linking)
 PuzzlePartList.PuzzlePart north
          reference to the neighbourhood
static int NORTH
          for locking if two pieces pass together
 PuzzlePartList.PuzzlePart prev
          prev for the group (horizontal linking)
 PuzzlePartList.PuzzlePart prevInGroup
          prev in group (vertical linking)
 PuzzlePaint puzzlePaint
          paint for this piece
 java.awt.Rectangle shapeBounds
          bounds of geometricaly shape
 PuzzlePartList.PuzzlePart south
          reference to the neighbourhood
static int SOUTH
          for locking if two pieces pass together
 PuzzlePartList.PuzzlePart west
          reference to the neighbourhood
static int WEST
          for locking if two pieces pass together
 
Constructor Summary
PuzzlePartList.PuzzlePart(java.awt.image.BufferedImage bimage, int lx, int ly, int pix, int piy, int width, int height)
          simply constructor
 
Method Summary
 java.lang.String toString()
          create a description of this part for debugging
 void updateLocationOut()
          update the outer location from inner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WEST

public static final int WEST
for locking if two pieces pass together

EAST

public static final int EAST
for locking if two pieces pass together

NORTH

public static final int NORTH
for locking if two pieces pass together

SOUTH

public static final int SOUTH
for locking if two pieces pass together

locationIn

public java.awt.Point locationIn
location of inner bounds

locationOut

public java.awt.Point locationOut
location of outer bounds

boundsIn

public java.awt.Rectangle boundsIn
inner bounds

boundsOut

public java.awt.Rectangle boundsOut
outer bounds

boundsImage

public java.awt.Rectangle boundsImage
image bounds

generalPath

public java.awt.geom.GeneralPath generalPath
geometricaly shape

shapeBounds

public java.awt.Rectangle shapeBounds
bounds of geometricaly shape

puzzlePaint

public PuzzlePaint puzzlePaint
paint for this piece

next

public PuzzlePartList.PuzzlePart next
next for the group (horizontal linking)

prev

public PuzzlePartList.PuzzlePart prev
prev for the group (horizontal linking)

nextInGroup

public PuzzlePartList.PuzzlePart nextInGroup
next in group (vertical linking)

prevInGroup

public PuzzlePartList.PuzzlePart prevInGroup
prev in group (vertical linking)

north

public PuzzlePartList.PuzzlePart north
reference to the neighbourhood

south

public PuzzlePartList.PuzzlePart south
reference to the neighbourhood

west

public PuzzlePartList.PuzzlePart west
reference to the neighbourhood

east

public PuzzlePartList.PuzzlePart east
reference to the neighbourhood

lock

public int lock
if locked to WEST, EAST, NORTH, SOUTH or not
Constructor Detail

PuzzlePartList.PuzzlePart

public PuzzlePartList.PuzzlePart(java.awt.image.BufferedImage bimage,
                                 int lx,
                                 int ly,
                                 int pix,
                                 int piy,
                                 int width,
                                 int height)
simply constructor
Parameters:
bimage - reference to the image
lx - location x of piece
ly - location y of piece
plx - pixel location x of image
ply - pixel location y of image
width - width of piece and image part
height - height of piece and image part
Method Detail

updateLocationOut

public void updateLocationOut()
update the outer location from inner

toString

public java.lang.String toString()
create a description of this part for debugging
Overrides:
toString in class java.lang.Object
Returns:
a string representation of this piece