|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--Maze2D
Draw a 2D maze in an AWT Component. There is no user input.
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
Maze2D(MazeModel model)
Create a 2D maze display with a cell size of 20 pixels. |
|
Maze2D(MazeModel model,
int cellSize)
Create a 2D maze display. |
|
Maze2D(MazeModel model,
int cellSize,
int dispWidth,
int dispHeight)
Create a 2D maze display. |
Method Summary | |
Dimension |
getPreferredSize()
From Component.getPreferredSize. |
int |
getZ()
Get the Z co-ordinate of the maze being displayed. |
void |
mazeChanged(EventObject e)
From interface MazeListener. |
void |
paint(Graphics g)
Paint the maze. |
void |
setZ(int z)
Set the Z co-ordinate of the maze being displayed. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public Maze2D(MazeModel model)
model
- The MazeModel used as the source of the maze.public Maze2D(MazeModel model, int cellSize)
model
- The MazeModel used as the source of the maze.cellSize
- The cell size in pixels.public Maze2D(MazeModel model, int cellSize, int dispWidth, int dispHeight)
model
- The MazeModel used as the source of the maze.cellSize
- The cell size in pixels.dispWidth
- The number of horizontal cells to display at a time.dispHeight
- The number of vertical cells to display at a time.Method Detail |
public Dimension getPreferredSize()
public void mazeChanged(EventObject e)
public void setZ(int z)
public int getZ()
public void paint(Graphics g)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |