learn
Class LearnFrame

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--learn.LearnFrame

public class LearnFrame
extends javax.swing.JFrame
implements java.lang.Runnable

This is the frame for the application which demonstrates three learing algorithms: back propagation network, Kohonen map network, and a decision tree.

See Also:
Serialized Form

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
           
(package private)  javax.swing.JRadioButtonMenuItem BackPropRadioButtonMenuItem
           
(package private)  java.awt.BorderLayout borderLayout1
           
(package private)  java.awt.BorderLayout borderLayout2
           
(package private)  java.awt.BorderLayout borderLayout3
           
(package private)  java.awt.BorderLayout borderLayout4
           
(package private)  javax.swing.ButtonGroup buttonGroup
           
(package private)  javax.swing.JMenu DataMenu
           
(package private)  DataSet dataSet
           
(package private)  javax.swing.JLabel DataSetFileNameLabel
           
(package private)  javax.swing.JTextArea dataTextArea
           
(package private)  javax.swing.JRadioButtonMenuItem DecisionTreeRadioButtonMenuItem
           
(package private)  javax.swing.JMenuItem ExitMenuItem
           
(package private)  javax.swing.JMenu FileMenu
           
(package private)  javax.swing.JMenu HelpMenu
           
(package private)  javax.swing.JLabel jLabel1
           
(package private)  javax.swing.JMenuBar jMenuBar1
           
(package private)  javax.swing.JPanel jPanel1
           
(package private)  javax.swing.JPanel jPanel2
           
(package private)  javax.swing.JPanel jPanel3
           
(package private)  javax.swing.JPanel jPanel4
           
(package private)  javax.swing.JPanel jPanel5
           
(package private)  javax.swing.JScrollPane jScrollPane1
           
(package private)  javax.swing.JScrollPane jScrollPane2
           
(package private)  javax.swing.JRadioButtonMenuItem KohonenRadioButtonMenuItem
           
(package private)  javax.swing.JMenuItem LoadDataMenuItem
           
(package private)  javax.swing.JMenuItem ResetMenuItem
           
(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
LearnFrame()
          Constructs the frame for the learn application.
 
Method Summary
(package private)  void AboutMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Displays the About dialog.
(package private)  void BackPropRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Sets the title on the frame when the back prop radio button is clicked.
(package private)  void DecisionTreeRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Sets the title on the frame when the decision tree radio button is clicked.
(package private)  void KohonenRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Sets the title on the frame when the Kohnen map radio button is clicked.
(package private)  void LoadDataMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Gets the dataset filename and loads the dataset.
protected  void processWindowEvent(java.awt.event.WindowEvent e)
          Processes window events and is overridden to exit when window closes.
(package private)  void ResetMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Clears the text area and sets a boolean flag to exit training thread.
 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.
 void testBackProp(DataSet dataset, javax.swing.JTextArea bottomText)
          Tests a back prop network using the given dataset and text area.
 void testDecisionTree(DataSet dataSet, javax.swing.JTextArea bottomText)
          Tests a decision tree using the given dataset and text area.
 void testKMapNet(DataSet dataset, javax.swing.JTextArea bottomText)
          Tests a Kohonen map network using the given dataset and text area.
 
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
, addNotify, addToFrameList, constructComponentName, finalize, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, isResizable, postProcessKeyEvent, remove, removeFromFrameList, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle
 
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

borderLayout1

java.awt.BorderLayout borderLayout1

jMenuBar1

javax.swing.JMenuBar jMenuBar1

FileMenu

javax.swing.JMenu FileMenu

DataMenu

javax.swing.JMenu DataMenu

AlgorithmMenu

javax.swing.JMenu AlgorithmMenu

buttonGroup

javax.swing.ButtonGroup buttonGroup

HelpMenu

javax.swing.JMenu HelpMenu

StartMenuItem

javax.swing.JMenuItem StartMenuItem

ResetMenuItem

javax.swing.JMenuItem ResetMenuItem

ExitMenuItem

javax.swing.JMenuItem ExitMenuItem

jPanel1

javax.swing.JPanel jPanel1

jPanel2

javax.swing.JPanel jPanel2

jPanel3

javax.swing.JPanel jPanel3

borderLayout2

java.awt.BorderLayout borderLayout2

jPanel4

javax.swing.JPanel jPanel4

jPanel5

javax.swing.JPanel jPanel5

jScrollPane1

javax.swing.JScrollPane jScrollPane1

dataTextArea

javax.swing.JTextArea dataTextArea

jScrollPane2

javax.swing.JScrollPane jScrollPane2

traceTextArea

javax.swing.JTextArea traceTextArea

jLabel1

javax.swing.JLabel jLabel1

borderLayout3

java.awt.BorderLayout borderLayout3

borderLayout4

java.awt.BorderLayout borderLayout4

dataSet

DataSet dataSet

BackPropRadioButtonMenuItem

javax.swing.JRadioButtonMenuItem BackPropRadioButtonMenuItem

KohonenRadioButtonMenuItem

javax.swing.JRadioButtonMenuItem KohonenRadioButtonMenuItem

DecisionTreeRadioButtonMenuItem

javax.swing.JRadioButtonMenuItem DecisionTreeRadioButtonMenuItem

LoadDataMenuItem

javax.swing.JMenuItem LoadDataMenuItem

AboutMenuItem

javax.swing.JMenuItem AboutMenuItem

DataSetFileNameLabel

javax.swing.JLabel DataSetFileNameLabel
Constructor Detail

LearnFrame

public LearnFrame()
Constructs the frame for the learn application.
Method Detail

processWindowEvent

protected void processWindowEvent(java.awt.event.WindowEvent e)
Processes window events and is overridden to exit when window closes.
Parameters:
e - the WindowEvent to be processed
Overrides:
processWindowEvent in class javax.swing.JFrame

testBackProp

public void testBackProp(DataSet dataset,
                         javax.swing.JTextArea bottomText)
Tests a back prop network using the given dataset and text area. Note: this method is run on a separate thread from the GUI
Parameters:
dataset - the DataSet used to test the network
bottomText - the JTextArea used to display information

testKMapNet

public void testKMapNet(DataSet dataset,
                        javax.swing.JTextArea bottomText)
Tests a Kohonen map network using the given dataset and text area. Note: this method is run on a separate thread from the GUI
Parameters:
dataset - the DataSet used to test the network
bottomText - the JTextArea used to display information

testDecisionTree

public void testDecisionTree(DataSet dataSet,
                             javax.swing.JTextArea bottomText)
Tests a decision tree using the given dataset and text area. Note: this method is run on a separate thread from the GUI
Parameters:
dataset - the DataSet used to train the network
dataSet - the DataSet
bottomText - the JTextArea used to display information

BackPropRadioButtonMenuItem_actionPerformed

void BackPropRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Sets the title on the frame when the back prop radio button is clicked.
Parameters:
e - the ActionEvent that was generated

KohonenRadioButtonMenuItem_actionPerformed

void KohonenRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Sets the title on the frame when the Kohnen map radio button is clicked.
Parameters:
e - the ActionEvent that was generated

DecisionTreeRadioButtonMenuItem_actionPerformed

void DecisionTreeRadioButtonMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Sets the title on the frame when the decision tree radio button is clicked.
Parameters:
e - the ActionEvent that was generated

LoadDataMenuItem_actionPerformed

void LoadDataMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Gets the dataset filename and loads the dataset.
Parameters:
e - the ActionEvent that was generated

AboutMenuItem_actionPerformed

void AboutMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Displays the About dialog.
Parameters:
e - the ActionEvent generated when About was selected

StartMenuItem_actionPerformed

void StartMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Starts a thread when START is selected.
Parameters:
e - the ActionEvent for the selection

run

public void run()
Runs the selected algorithm in a separate thread, writing some trace information into the the text area of the application window. If debug is set on, additional trace information will be displayed.
Specified by:
run in interface java.lang.Runnable

ResetMenuItem_actionPerformed

void ResetMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Clears the text area and sets a boolean flag to exit training thread.
Parameters:
e - the ActionEvent that was generated when Reset was selected