Package coconad

Class CoCoGUI

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

public class CoCoGUI extends dialog.TabbedGUI implements ActionListener, ItemListener
Class for a user interface to the coconad library.
Since:
2013.11.25
See Also:
  • Field Details

  • Constructor Details

    • CoCoGUI

      public CoCoGUI()
      Create a CoCoNAD GUI.

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

      Since:
      2013.11.25 (Christian Borgelt)
    • CoCoGUI

      public CoCoGUI(Component owner)
      Create a CoCoNAD GUI.
      Parameters:
      owner - the component that is to own this dialog
      Since:
      2013.11.25 (Christian Borgelt)
  • Method Details

    • 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:
      2013.11.25 (Christian Borgelt)
    • itemStateChanged

      public void itemStateChanged(ItemEvent e)
      Handle the state change of the surrogate type combo box.
      Specified by:
      itemStateChanged in interface ItemListener
      Parameters:
      e - the change event to react to
      Since:
      2013.12.11 (Christian Borgelt)
    • showTrains

      protected void showTrains(JTextField txt)
      Show (spike) trains.
      Parameters:
      txt - the text field containing the file name
      Since:
      2013.11.25 (Christian Borgelt)
    • showTrains

      protected void showTrains(File file)
      Show (spike) trains.
      Parameters:
      file - the file to load the spike trains
      Since:
      2013.11.25 (Christian Borgelt)
    • showSpectrum

      protected void showSpectrum(JTextField txt)
      Show a pattern spectrum.
      Parameters:
      txt - the text field containing the file name
      Since:
      2013.11.25 (Christian Borgelt)
    • showSpectrum

      protected boolean showSpectrum(File file)
      Show a pattern spectrum.
      Parameters:
      file - the file to load the pattern spectrum
      Returns:
      whether loading the spectrum was successful
      Since:
      2013.11.25 (Christian Borgelt)
    • showPatterns

      protected void showPatterns(JTextField txt)
      Show found patterns/item sets.
      Parameters:
      txt - the text field containing the file name
      Since:
      2013.11.28 (Christian Borgelt)
    • showPatterns

      protected void showPatterns(File file)
      Show found patterns/item sets.
      Parameters:
      file - the file to load the spike trains
      Since:
      2013.11.28 (Christian Borgelt)
    • createExecutor

      protected util.Executor createExecutor(int i)
      Get an executor for the CoCoNAD function
      Specified by:
      createExecutor in class dialog.TabbedGUI
      Parameters:
      i - the index of the dialog tab
      Returns:
      the executor for the CoCoNAD function
      Since:
      2013.11.25 (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:
      2013.11.25 (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:
      2013.11.25 (Christian Borgelt)
    • main

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