DE.purple_sunshine.bigbro
Class PathArea

java.lang.Object
  |
  +--java.awt.geom.RectangularShape
        |
        +--java.awt.geom.Rectangle2D
              |
              +--java.awt.Rectangle
                    |
                    +--DE.purple_sunshine.bigbro.Area
                          |
                          +--DE.purple_sunshine.bigbro.PathArea
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, java.awt.Shape

public class PathArea
extends Area

An Area that has neighbour areas that can be reached from this area.

Since:
JDK1.1
Version:
1.0
Author:
Holger Wagner
See Also:
Serialized Form

Inner classes inherited from class java.awt.geom.Rectangle2D
java.awt.geom.Rectangle2D.Double, java.awt.geom.Rectangle2D.Float
 
Field Summary
static int EAST
          This is the code for the direction EAST (+3).
static int NORTH
          This is the code for the direction NORTH (+1).
static int SOUTH
          This is the code for the direction SOUTH (-1).
static int WEST
          This is the code for the direction WEST (-3).
 
Fields inherited from class java.awt.Rectangle
height, width, x, y
 
Fields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
 
Constructor Summary
PathArea(java.lang.String id, int x, int y, int width, int height)
           
 
Method Summary
 PathArea getNeighbour(int direction)
          Returns the neighbor to direction of the receiver.
 void setNeighbour(int direction, PathArea neighbour)
          Sets a new neighbor for direction.
 
Methods inherited from class DE.purple_sunshine.bigbro.Area
getId, getPathArea, randomPointWithin, toString
 
Methods inherited from class java.awt.Rectangle
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, equals, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, translate, union
 
Methods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union
 
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects
 

Field Detail

NORTH

public static final int NORTH
This is the code for the direction NORTH (+1).

SOUTH

public static final int SOUTH
This is the code for the direction SOUTH (-1).

EAST

public static final int EAST
This is the code for the direction EAST (+3).

WEST

public static final int WEST
This is the code for the direction WEST (-3).
Constructor Detail

PathArea

public PathArea(java.lang.String id,
                int x,
                int y,
                int width,
                int height)
Method Detail

getNeighbour

public PathArea getNeighbour(int direction)
Returns the neighbor to direction of the receiver.
Parameters:
direction - the direction to which the neighbour shall be returned
Returns:
the PathArea of the receiver to direction
See Also:
NORTH, SOUTH, WEST, EAST

setNeighbour

public void setNeighbour(int direction,
                         PathArea neighbour)
Sets a new neighbor for direction.
Parameters:
direction - the direction to which the neighbour shall be set
neighbour - the new neighbor for direction


© 2000, Holger Wagner, Purple Sunshine Productions.