Amazing Mazes

Class ControlPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--ControlPanel

final class ControlPanel
extends java.awt.Panel

CONTROL PANEL ******** the UI components

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
private  java.awt.Button bColsMinus
           
private  java.awt.Button bColsPlus
           
private  java.awt.Button bCycle
           
private  java.awt.Button bGen
           
private  java.awt.Font boldFont
           
private  java.awt.Button bRowsMinus
           
private  java.awt.Button bRowsPlus
           
private  java.awt.Button bSolve
           
private  java.awt.Choice cAlgorithm
           
private  java.awt.Checkbox cbShowBack
           
private  java.awt.Checkbox cbShowGen
           
private  java.awt.Checkbox cbShowSolve
           
private  int cols
           
private  java.awt.Panel colsBtnPanel
           
private  java.awt.Panel colsPanel
           
private  int genDelay
           
(package private) static int MAX_DELAY
           
(package private) static int MAX_H_CELLS
           
(package private) static int MAX_W_CELLS
           
private  MazeCanvas mc
           
private  MazeGen mg
           
(package private) static int MIN_CELLS
           
(package private) static int MIN_DELAY
           
private  java.awt.Font monoFont
           
private  int rows
           
private  java.awt.Panel rowsBtnPanel
           
private  java.awt.Panel rowsPanel
           
private  java.awt.Scrollbar sbGenSpeed
           
private  java.awt.Scrollbar sbSolveSpeed
           
private  int solveDelay
           
private  java.awt.Font textFont
           
private  java.awt.TextField tfCols
           
private  java.awt.TextField tfRows
           
 
Fields inherited from class java.awt.Panel
base, nameCounter, serialVersionUID
 
Fields inherited from class java.awt.Container
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, maxSize, ncomponents, 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) ControlPanel(MazeGen mg, MazeCanvas mc)
           
 
Method Summary
 boolean action(java.awt.Event e, java.lang.Object o)
           
(package private)  int getAlgorithm()
           
(package private)  java.awt.Dimension getDim()
           
(package private)  int getGenDelay()
           
(package private)  int getSolveDelay()
           
 boolean handleEvent(java.awt.Event e)
           
(package private)  boolean isShowBack()
           
(package private)  boolean isShowGen()
           
(package private)  boolean isShowSolve()
           
(package private)  void setCols(int i)
           
(package private)  void setCycleEnable(boolean b)
           
(package private)  void setCycleLabel(java.lang.String s)
           
(package private)  void setGenEnable(boolean b)
           
(package private)  void setPlusMinusEnable()
           
(package private)  void setRows(int i)
           
(package private)  void setSolveEnable(boolean b)
           
 
Methods inherited from class java.awt.Panel
, addNotify, constructComponentName
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyOrientation, countComponents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getCursorTarget, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, initIDs, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPrint, list, list, locate, minimumSize, nextFocus, paint, paintComponents, paramString, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, print, printComponents, printOneComponent, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, readObject, remove, remove, removeAll, removeContainerListener, removeNotify, setCursor, setFocusOwner, setFont, setLayout, transferFocus, update, updateCursor, validate, validateTree, writeObject
 
Methods inherited from class java.awt.Component
add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getIntrinsicCursor, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

MIN_CELLS

static final int MIN_CELLS

MAX_W_CELLS

static final int MAX_W_CELLS

MAX_H_CELLS

static final int MAX_H_CELLS

MAX_DELAY

static final int MAX_DELAY

MIN_DELAY

static final int MIN_DELAY

rows

private int rows

cols

private int cols

genDelay

private int genDelay

solveDelay

private int solveDelay

bGen

private java.awt.Button bGen

bSolve

private java.awt.Button bSolve

bCycle

private java.awt.Button bCycle

bRowsPlus

private java.awt.Button bRowsPlus

bRowsMinus

private java.awt.Button bRowsMinus

bColsPlus

private java.awt.Button bColsPlus

bColsMinus

private java.awt.Button bColsMinus

tfRows

private java.awt.TextField tfRows

tfCols

private java.awt.TextField tfCols

cbShowGen

private java.awt.Checkbox cbShowGen

cbShowSolve

private java.awt.Checkbox cbShowSolve

cbShowBack

private java.awt.Checkbox cbShowBack

cAlgorithm

private java.awt.Choice cAlgorithm

sbGenSpeed

private java.awt.Scrollbar sbGenSpeed

sbSolveSpeed

private java.awt.Scrollbar sbSolveSpeed

monoFont

private java.awt.Font monoFont

textFont

private java.awt.Font textFont

boldFont

private java.awt.Font boldFont

rowsPanel

private java.awt.Panel rowsPanel

colsPanel

private java.awt.Panel colsPanel

rowsBtnPanel

private java.awt.Panel rowsBtnPanel

colsBtnPanel

private java.awt.Panel colsBtnPanel

mg

private MazeGen mg

mc

private MazeCanvas mc
Constructor Detail

ControlPanel

ControlPanel(MazeGen mg,
             MazeCanvas mc)
Method Detail

isShowGen

boolean isShowGen()

isShowBack

boolean isShowBack()

isShowSolve

boolean isShowSolve()

getDim

java.awt.Dimension getDim()

getAlgorithm

int getAlgorithm()

getGenDelay

int getGenDelay()

getSolveDelay

int getSolveDelay()

setPlusMinusEnable

void setPlusMinusEnable()

setGenEnable

void setGenEnable(boolean b)

setSolveEnable

void setSolveEnable(boolean b)

setCycleEnable

void setCycleEnable(boolean b)

setCycleLabel

void setCycleLabel(java.lang.String s)

setRows

void setRows(int i)

setCols

void setCols(int i)

action

public boolean action(java.awt.Event e,
                      java.lang.Object o)
Overrides:
action in class java.awt.Component

handleEvent

public boolean handleEvent(java.awt.Event e)
Overrides:
handleEvent in class java.awt.Component

Author: Andrew Bridges
Copyright © 2001