|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Window | +--java.awt.Frame | +--javax.swing.JFrame | +--search.SearchFrame
This is the frame for the application which demonstrates the five basic search algorithms: depth-first, breadth-first, iterated, best-first, and genetic.
Inner classes inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AWTTreeLock |
Field Summary | |
(package private) javax.swing.JMenuItem |
AboutMenuItem
|
(package private) javax.swing.JMenu |
AlgorithmMenu
|
static int |
BEST_FIRST
|
(package private) javax.swing.JRadioButtonMenuItem |
BestFirstRadioButtonMenuItem
|
(package private) javax.swing.JRadioButtonMenuItem |
BFSRadioButtonMenuItem
|
(package private) java.awt.BorderLayout |
borderLayout1
|
(package private) java.awt.BorderLayout |
borderLayout2
|
static int |
BREADTH_FIRST
|
(package private) javax.swing.JMenuItem |
ClearMenuItem
|
static int |
DEPTH_FIRST
|
(package private) javax.swing.JRadioButtonMenuItem |
DFSRadioButtonMenuItem
|
(package private) javax.swing.JMenuItem |
ExitMenuItem
|
(package private) javax.swing.JMenu |
FileMenu
|
(package private) javax.swing.JTextField |
FitnessThresholdTextField
|
static int |
GENETIC_SEARCH
|
(package private) javax.swing.JComboBox |
GeneticObjClassComboBox
|
(package private) GeneticSearch |
geneticSearch
|
(package private) javax.swing.JRadioButtonMenuItem |
GeneticSearchRadioButtonMenuItem
|
(package private) javax.swing.JComboBox |
goalComboBox
|
(package private) SearchGraph |
graph
|
(package private) javax.swing.JMenu |
HelpMenu
|
static int |
ITERATED
|
(package private) javax.swing.JRadioButtonMenuItem |
IteratedRadioButtonMenuItem
|
(package private) javax.swing.JLabel |
jLabel1
|
(package private) javax.swing.JLabel |
jLabel2
|
(package private) javax.swing.JLabel |
jLabel3
|
(package private) javax.swing.JLabel |
jLabel4
|
(package private) javax.swing.JLabel |
jLabel5
|
(package private) javax.swing.JLabel |
jLabel6
|
(package private) javax.swing.JMenuBar |
jMenuBar1
|
(package private) javax.swing.JPanel |
jPanel1
|
(package private) javax.swing.JPanel |
jPanel2
|
(package private) javax.swing.JScrollPane |
jScrollPane1
|
(package private) javax.swing.JComboBox |
NumGenerationsComboBox
|
(package private) javax.swing.JComboBox |
PopulationSizeComboBox
|
(package private) javax.swing.ButtonGroup |
radioButtonGroup
|
(package private) javax.swing.JComboBox |
startComboBox
|
(package private) javax.swing.JMenuItem |
StartMenuItem
|
(package private) javax.swing.JTextArea |
traceTextArea
|
Fields inherited from class javax.swing.JFrame |
accessibleContext,
rootPane,
rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR,
DEFAULT_CURSOR,
E_RESIZE_CURSOR,
HAND_CURSOR,
icon,
ICONIFIED,
mbManagement,
menuBar,
MOVE_CURSOR,
N_RESIZE_CURSOR,
NE_RESIZE_CURSOR,
NORMAL,
NW_RESIZE_CURSOR,
ownedWindows,
resizable,
S_RESIZE_CURSOR,
SE_RESIZE_CURSOR,
SW_RESIZE_CURSOR,
TEXT_CURSOR,
title,
W_RESIZE_CURSOR,
WAIT_CURSOR |
Fields inherited from class java.awt.Window |
inputContext,
OPENED,
ownedWindowList,
state,
warningString,
windowListener |
Fields inherited from class java.awt.Container |
component,
containerListener,
layoutMgr,
ncomponents |
Fields inherited from class java.awt.Component |
actionListenerK,
adjustmentListenerK,
appContext,
background,
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
componentListener,
componentListenerK,
componentOrientation,
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,
newEventsOnly,
ownedWindowK,
parent,
peer,
peerFont,
popups,
prefSize,
RIGHT_ALIGNMENT,
textListenerK,
TOP_ALIGNMENT,
valid,
visible,
width,
windowListenerK,
x,
y |
Constructor Summary | |
SearchFrame()
Constructs the frame for the search application. |
Method Summary | |
(package private) void |
AboutMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Displays the "About" dialog when the option is selected. |
(package private) void |
BestFirstRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Sets the search to BEST_FIRST when the best-first search radio button is selected. |
(package private) void |
BFSRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Sets the search to BREADTH_FIRST when the breadth-first search radio button is selected. |
static SearchGraph |
buildTestGraph()
Build a test graph of the cities in the midwestern United States. |
(package private) void |
ClearMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Clears the text box when CLEAR is selected. |
(package private) void |
DFSRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Sets the search to DEPTH_FIRST when the depth-first search radio button is selected. |
(package private) void |
ExitMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Ends the application when EXIT is selected. |
(package private) void |
GeneticSearchRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Sets the search to GENETIC_SEARCH when the genetic search radio button is selected. |
(package private) void |
IteratedRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Sets the search to ITERATED when the iterated search radio button is selected. |
protected void |
processWindowEvent(java.awt.event.WindowEvent e)
Processes window events and is overridden to exit when window closes. |
void |
run()
Runs the selected algorithm in a separate thread, writing some trace information into the the text area of the application window. |
(package private) void |
StartMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Starts a thread when START is selected. |
Methods inherited from class javax.swing.JFrame |
addImpl,
createRootPane,
frameInit,
getAccessibleContext,
getContentPane,
getDefaultCloseOperation,
getGlassPane,
getJMenuBar,
getLayeredPane,
getRootPane,
isRootPaneCheckingEnabled,
paramString,
processKeyEvent,
setContentPane,
setDefaultCloseOperation,
setGlassPane,
setJMenuBar,
setLayeredPane,
setLayout,
setRootPane,
setRootPaneCheckingEnabled,
update |
Methods inherited from class java.awt.Frame |
|
Methods inherited from class java.awt.Window |
addOwnedWindow,
addWindowListener,
applyResourceBundle,
applyResourceBundle,
connectOwnedWindow,
dispatchEventImpl,
dispose,
eventEnabled,
getFocusOwner,
getInputContext,
getLocale,
getOwnedWindows,
getOwner,
getToolkit,
getWarningString,
isActive,
isShowing,
nextFocus,
pack,
postEvent,
postWindowEvent,
preProcessKeyEvent,
processEvent,
removeOwnedWindow,
removeWindowListener,
setFocusOwner,
show,
toBack,
toFront,
transferFocus |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
applyOrientation,
countComponents,
deliverEvent,
dispatchEventToSelf,
doLayout,
findComponentAt,
findComponentAt,
getAlignmentX,
getAlignmentY,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents_NoClientCode,
getComponents,
getInsets,
getLayout,
getMaximumSize,
getMinimumSize,
getMouseEventTarget,
getPreferredSize,
getWindow,
insets,
invalidate,
invalidateTree,
isAncestorOf,
layout,
lightweightPrint,
list,
list,
locate,
minimumSize,
paint,
paintComponents,
postsOldMouseEvents,
preferredSize,
print,
printComponents,
processContainerEvent,
proxyEnableEvents,
proxyRequestFocus,
remove,
remove,
removeAll,
removeContainerListener,
setFont,
validate,
validateTree |
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,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont_NoClientCode,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputMethodRequests,
getLocation,
getLocation,
getLocationOnScreen,
getName,
getNativeContainer,
getParent_NoClientCode,
getParent,
getPeer,
getSize,
getSize,
getToolkitImpl,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
isDisplayable,
isDoubleBuffered,
isEnabled,
isEnabledImpl,
isFocusTraversable,
isLightweight,
isOpaque,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
prepareImage,
prepareImage,
printAll,
processComponentEvent,
processFocusEvent,
processInputMethodEvent,
processMouseEvent,
processMouseMotionEvent,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
java.awt.BorderLayout borderLayout1
javax.swing.JPanel jPanel1
javax.swing.JPanel jPanel2
javax.swing.JScrollPane jScrollPane1
javax.swing.JTextArea traceTextArea
javax.swing.JLabel jLabel1
javax.swing.JLabel jLabel2
javax.swing.JComboBox startComboBox
javax.swing.JComboBox goalComboBox
javax.swing.ButtonGroup radioButtonGroup
java.awt.BorderLayout borderLayout2
SearchGraph graph
GeneticSearch geneticSearch
javax.swing.JMenuBar jMenuBar1
javax.swing.JMenu FileMenu
javax.swing.JMenuItem StartMenuItem
javax.swing.JMenuItem ClearMenuItem
javax.swing.JMenuItem ExitMenuItem
javax.swing.JMenu AlgorithmMenu
javax.swing.JMenu HelpMenu
javax.swing.JMenuItem AboutMenuItem
javax.swing.JRadioButtonMenuItem DFSRadioButtonMenuItem
javax.swing.JRadioButtonMenuItem BFSRadioButtonMenuItem
javax.swing.JRadioButtonMenuItem IteratedRadioButtonMenuItem
javax.swing.JRadioButtonMenuItem BestFirstRadioButtonMenuItem
javax.swing.JRadioButtonMenuItem GeneticSearchRadioButtonMenuItem
javax.swing.JLabel jLabel3
javax.swing.JLabel jLabel4
javax.swing.JComboBox GeneticObjClassComboBox
javax.swing.JComboBox NumGenerationsComboBox
javax.swing.JLabel jLabel5
javax.swing.JComboBox PopulationSizeComboBox
javax.swing.JLabel jLabel6
javax.swing.JTextField FitnessThresholdTextField
public static final int DEPTH_FIRST
public static final int BREADTH_FIRST
public static final int ITERATED
public static final int BEST_FIRST
public static final int GENETIC_SEARCH
Constructor Detail |
public SearchFrame()
Method Detail |
protected void processWindowEvent(java.awt.event.WindowEvent e)
e
- the WindowEvent to be processedpublic static SearchGraph buildTestGraph()
SearchNodes
and links.void DFSRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent for the radio buttonvoid BFSRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent for the radio buttonvoid IteratedRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent for the radio buttonvoid BestFirstRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent for the radio buttonvoid GeneticSearchRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent for the radio buttonvoid StartMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent for the selectionvoid ClearMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent for the selectionvoid ExitMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent for the selectionvoid AboutMenuItem_actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent for the selectionpublic void run()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |