Class Setup

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

public class Setup extends JFrame implements Runnable
This class runs a setup routine everytime the main program is run. The setup routine helps to make sure certain things are setup before the main program is run; for example: making sure the correct assets are present etc.. It also helps to setup the program to a first time user.

To run this class, simply call the static main() instead of creating a new object. Creating a new object will only instantiate the GUI part and not the file access part. Particularly it will be setup to handle some basic tasks, such as determining what theme the user wants to use, etc.. All of this are run after the threaded task schedulers have been started and the resource properties have been loaded.

Since:
3.3
Author:
Jack Meng
See Also:
  • Field Details

    • MAIN_LOCK_USER_SETUP

      public static final File MAIN_LOCK_USER_SETUP
    • KILL_ARG

      public static final String KILL_ARG
      See Also:
    • listener

      private static final transient List<SetupListener> listener
    • SETUP_EXISTS

      public static boolean SETUP_EXISTS
    • content

      private final JPanel content
  • Constructor Details

    • Setup

      public Setup()
  • Method Details

    • fireListeners

      private static void fireListeners()
    • addSetupListener

      public static void addSetupListener(SetupListener... listeners)
      Parameters:
      listeners -
    • main

      public static void main(String... args)
      Any applications that wants to the run a setup routine SHOULD ONLY CALL THE MAIN METHOD. Creating a new Setup object will only gurantee a launch of the GUI part and can confuse any potential users.
      Parameters:
      args - No arguments are accepted / used in the setup routine
    • dispatchSetupYay

      public void dispatchSetupYay()
      Is called upon to send a notice to the file service writer that we need to place the setup lock file signifying that the user has performed a setup
    • addContent

      public void addContent(JComponent... components)
      Any components to be added to the GUI part of the program.
      Parameters:
      components - The components to be added to the GUI
    • run

      public void run()
      Specified by:
      run in interface Runnable