Package weka.gui

Class SplashWindow

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class SplashWindow extends Window
A Splash window.

Usage: MyApplication is your application class. Create a Splasher class which opens the splash window, invokes the main method of your Application class, and disposes the splash window afterwards. Please note that we want to keep the Splasher class and the SplashWindow class as small as possible. The less code and the less classes must be loaded into the JVM to open the splash screen, the faster it will appear.

 class Splasher {
   public static void main(String[] args) {
     SplashWindow.splash(Startup.class.getResource("splash.gif"));
     MyApplication.main(args);
     SplashWindow.disposeSplash();
   }
 }
 
Version:
$Revision: 15879 $
Author:
Werner Randelshofer, Mark Hall
See Also:
  • Method Details

    • update

      public void update(Graphics g)
      Updates the display area of the window.
      Overrides:
      update in class Container
    • paint

      public void paint(Graphics g)
      Paints the image on the window.
      Overrides:
      paint in class Window
    • splash

      public static void splash(Image image, List<String> message)
      Open's a splash window using the specified image.
      Parameters:
      image - The splash image.
    • splash

      public static void splash(URL imageURL)
      Open's a splash window using the specified image.
      Parameters:
      imageURL - The url of the splash image.
    • splash

      public static void splash(URL imageURL, List<String> message)
      Open's a splash window using the specified image and message
      Parameters:
      imageURL - The url of the splash image.
      message - The message to overlay on the image
    • disposeSplash

      public static void disposeSplash()
      Closes the splash window.
    • invokeMethod

      public static void invokeMethod(String className, String methodName, String[] args)
      Invokes the named method of the provided class name.
      Parameters:
      className - the name of the class
      methodName - the name of the method to invoke
      args - the command line arguments
    • invokeMain

      public static void invokeMain(String className, String[] args)
      Invokes the main method of the provided class name.
      Parameters:
      className - the name of the class
      args - the command line arguments