Package dialog

Class TemplateGUI

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

public class TemplateGUI extends TabbedGUI
Class for a user interface to external programs.
Since:
2004.05.25
See Also:
  • Constructor Details

    • TemplateGUI

      public TemplateGUI()
      Create a template graphical user interface.

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

      Since:
      2007.02.12 (Christian Borgelt)
    • TemplateGUI

      public TemplateGUI(Component owner)
      Create a template graphical user interface.
      Parameters:
      owner - the component that is to own this dialog
      Since:
      2007.02.12 (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 TabbedGUI
      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 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 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 TabbedGUI
      Parameters:
      file - the file to load the configuration from
      Since:
      2006.07.13 (Christian Borgelt)
    • saveConfig

      protected void saveConfig(File file)
      Save a configuration file
      Specified by:
      saveConfig in class TabbedGUI
      Parameters:
      file - the file to save the current configuration to
      Since:
      2006.07.13 (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)