|
Amazing Mazes | ||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--MazeCanvas
MAZE CANVAS ******** draws the maze using double buffer
Inner classes inherited from class java.awt.Component |
java.awt.Component.AWTTreeLock |
Field Summary | |
(package private) static int |
BORDER
|
(package private) java.awt.Graphics |
buffer
|
(package private) java.awt.Image |
bufferImage
|
private int |
cellSize
|
private int |
cols
|
private int |
height
|
private int |
hOffset
|
(package private) static int |
MAX_CELL_SIZE
|
(package private) MazeGen |
mg
|
private int |
mzHeight
|
private int |
mzWidth
|
private int |
nwPathOffset
|
private int |
pathSize
|
private int |
rows
|
private int |
sePathOffset
|
private int |
width
|
private int |
wOffset
|
Fields inherited from class java.awt.Canvas |
base,
graphicsConfig,
nameCounter,
serialVersionUID |
Fields inherited from class java.awt.Component |
actionListenerK,
adjustmentListenerK,
appContext,
assert,
background,
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
changeSupport,
componentListener,
componentListenerK,
componentOrientation,
componentSerializedDataVersion,
containerListenerK,
cursor,
dropTarget,
enabled,
eventMask,
focusListener,
focusListenerK,
font,
foreground,
hasFocus,
height,
incRate,
inputMethodListener,
inputMethodListenerK,
isInc,
isPacked,
itemListenerK,
keyListener,
keyListenerK,
LEFT_ALIGNMENT,
locale,
LOCK,
minSize,
mouseListener,
mouseListenerK,
mouseMotionListener,
mouseMotionListenerK,
name,
nameExplicitlySet,
newEventsOnly,
ownedWindowK,
parent,
peer,
peerFont,
popups,
prefSize,
RIGHT_ALIGNMENT,
serialVersionUID,
textListenerK,
TOP_ALIGNMENT,
valid,
visible,
width,
windowListenerK,
x,
y |
Constructor Summary | |
(package private) |
MazeCanvas(int mcw,
int mch)
|
Method Summary | |
(package private) void |
drawGen(int x,
int y,
int direction,
Maze mz)
|
(package private) void |
drawGrid(Maze mz)
|
private void |
drawInit(Maze mz)
|
(package private) void |
drawMaze(Maze mz)
|
(package private) void |
drawPath(boolean showBack,
Maze mz)
|
(package private) void |
drawSolve(int x,
int y,
int direction,
java.awt.Color c,
Maze mz)
|
(package private) void |
drawStartEnd(java.awt.Point startPt,
java.awt.Point endPt)
|
void |
paint(java.awt.Graphics g)
|
void |
update(java.awt.Graphics g)
|
Methods inherited from class java.awt.Canvas |
|
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
areInputMethodsEnabled,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
deliverEvent,
disable,
disableEvents,
dispatchEvent,
dispatchEventImpl,
doLayout,
enable,
enable,
enableEvents,
enableInputMethods,
eventEnabled,
firePropertyChange,
getAlignmentX,
getAlignmentY,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentAt,
getComponentAt,
getComponentOrientation,
getCursor,
getDropTarget,
getFont_NoClientCode,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getIntrinsicCursor,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getMaximumSize,
getMinimumSize,
getName,
getNativeContainer,
getParent_NoClientCode,
getParent,
getPeer,
getPreferredSize,
getSize,
getSize,
getToolkit,
getToolkitImpl,
getTreeLock,
getWidth,
getWindowForObject,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
initIDs,
inside,
invalidate,
isDisplayable,
isDoubleBuffered,
isEnabled,
isEnabledImpl,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
layout,
lightweightPrint,
list,
list,
list,
list,
list,
locate,
location,
lostFocus,
minimumSize,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
paramString,
postEvent,
preferredSize,
prepareImage,
prepareImage,
print,
printAll,
processComponentEvent,
processEvent,
processFocusEvent,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
readObject,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setFont,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus,
validate,
writeObject |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
Field Detail |
static final int BORDER
static final int MAX_CELL_SIZE
private int width
private int height
private int mzWidth
private int mzHeight
private int cellSize
private int wOffset
private int hOffset
private int rows
private int cols
private int pathSize
private int nwPathOffset
private int sePathOffset
java.awt.Image bufferImage
java.awt.Graphics buffer
MazeGen mg
Constructor Detail |
MazeCanvas(int mcw, int mch)
Method Detail |
private void drawInit(Maze mz)
void drawMaze(Maze mz)
void drawGrid(Maze mz)
void drawGen(int x, int y, int direction, Maze mz)
void drawStartEnd(java.awt.Point startPt, java.awt.Point endPt)
void drawPath(boolean showBack, Maze mz)
void drawSolve(int x, int y, int direction, java.awt.Color c, Maze mz)
public void paint(java.awt.Graphics g)
public void update(java.awt.Graphics g)
|
Author: Andrew Bridges Copyright © 2001 |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |