Package bayes

Class BayesGUI

All Implemented Interfaces:
ActionListener, ItemListener, ImageObserver, MenuContainer, Serializable, Runnable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class BayesGUI extends dialog.TabbedGUI implements ItemListener
Class for a user interface to the multilayer perceptron programs.
Since:
2007.06.05
See Also:
  • Field Details

  • Constructor Details

    • BayesGUI

      public BayesGUI()
      Create a Bayes classifier graphical user interface.

      The dialog is created as a stand-alone program. That is, closing or quitting it terminates the program.

      Since:
      2007.06.05 (Christian Borgelt)
    • BayesGUI

      public BayesGUI(Component owner)
      Create a Bayes classifier graphical user interface.
      Parameters:
      owner - the component that is to own this dialog
      Since:
      2007.06.05 (Christian Borgelt)
  • Method Details

    • itemStateChanged

      public void itemStateChanged(ItemEvent e)
      Update the parameter context after a type selection.
      Specified by:
      itemStateChanged in interface ItemListener
      Since:
      2007.06.05 (Christian Borgelt)
    • run

      public void run()
      Create the user interface.

      Following the recommendations in the Java tutorial, the user interface is created in the "run" method, which is invoked from the event queue, in order to avoid problems with threads.

      Specified by:
      run in interface Runnable
      Specified by:
      run in class dialog.TabbedGUI
      Since:
      2007.06.05 (Christian Borgelt)
    • setDomainsFile

      public void setDomainsFile(File file)
      Set the domains file.
      Overrides:
      setDomainsFile in class dialog.TabbedGUI
      Parameters:
      file - the domains file to set
      Since:
      2007.07.24 (Christian Borgelt)
    • setDataFile

      public void setDataFile(File file)
      Set the data file.
      Overrides:
      setDataFile in class dialog.TabbedGUI
      Parameters:
      file - the data file to set
      Since:
      2007.07.24 (Christian Borgelt)
    • setTestFile

      public void setTestFile(File file)
      Set the test file.
      Overrides:
      setTestFile in class dialog.TabbedGUI
      Parameters:
      file - the test file to set
      Since:
      2007.07.24 (Christian Borgelt)
    • showBayes

      protected void showBayes(JTextField bcls, JTextField data)
      Show a Bayes classifier.
      Parameters:
      bcls - the text field with the classifier file name
      data - the text field with the data file name
      Since:
      2007.06.05 (Christian Borgelt)
    • showBayes

      protected void showBayes(File bcls, File data)
      Show a cluster model.
      Parameters:
      bcls - the file to load the cluster model from
      data - the file to load the table data from
      Since:
      2007.02.12 (Christian Borgelt)
    • createExecutor

      protected util.Executor createExecutor(int i)
      Get the executor for a dialog tab.
      Specified by:
      createExecutor in class dialog.TabbedGUI
      Parameters:
      i - the index of the dialog tab
      Returns:
      the executor for the i-th dialog tab
      Since:
      2007.02.12 (Christian Borgelt)
    • getResultMsg

      protected String getResultMsg()
      Get the result message on successful termination.
      Overrides:
      getResultMsg in class dialog.TabbedGUI
      Returns:
      the result message
      Since:
      2007.02.10 (Christian Borgelt)
    • loadConfig

      protected void loadConfig(File file)
      Load a configuration file and set the input fields.
      Specified by:
      loadConfig in class dialog.TabbedGUI
      Parameters:
      file - the file to load the configuration from
      Since:
      2007.07.08 (Christian Borgelt)
    • saveConfig

      protected void saveConfig(File file)
      Save a configuration file
      Specified by:
      saveConfig in class dialog.TabbedGUI
      Parameters:
      file - the file to save the current configuration to
      Since:
      2007.07.08 (Christian Borgelt)
    • main

      public static void main(String[] args)
      Main function for testing basic functionality.
      Parameters:
      args - the command line arguments
      Since:
      2007.02.12 (Christian Borgelt)