Class ViewSplashScreen

All Implemented Interfaces:
MouseListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class ViewSplashScreen extends JFrame implements MouseListener, WindowListener
Shows the MIPAV splash screen until the user clicks the image or a few seconds (4 currently).
Author:
orsinol
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • image

      protected Image image
      The splash screen image.
    • loadOK

      protected boolean loadOK
      Whether the splash screen was loaded from disk successfully.
  • Constructor Details

    • ViewSplashScreen

      public ViewSplashScreen()
      Setup and display the splash screen.
  • Method Details

    • loadOK

      public boolean loadOK()
      Method determines whether image loading failed. Called by UI to determine whether it should call wait().
      Returns:
      boolean
    • mouseClicked

      public void mouseClicked(MouseEvent event)
      Do nothing.
      Specified by:
      mouseClicked in interface MouseListener
      Parameters:
      event - mouse event -- ignored
    • mouseEntered

      public void mouseEntered(MouseEvent event)
      Do nothing.
      Specified by:
      mouseEntered in interface MouseListener
      Parameters:
      event - mouse event -- ignored
    • mouseExited

      public void mouseExited(MouseEvent event)
      Do nothing.
      Specified by:
      mouseExited in interface MouseListener
      Parameters:
      event - mouse event -- ignored
    • mousePressed

      public void mousePressed(MouseEvent event)
      Wakes up the VUI thread on a user's mouse click in the image if it is sleeping while waiting for the splash screen to be displayed.
      Specified by:
      mousePressed in interface MouseListener
      Parameters:
      event - mouse event
    • mouseReleased

      public void mouseReleased(MouseEvent event)
      Do nothing.
      Specified by:
      mouseReleased in interface MouseListener
      Parameters:
      event - mouse event -- ignored
    • paint

      public void paint(Graphics graphics)
      Paint the image into the frame.
      Overrides:
      paint in class Window
      Parameters:
      graphics - used to draw the image and version string in the frame
    • windowActivated

      public void windowActivated(WindowEvent event)
      Do nothing.
      Specified by:
      windowActivated in interface WindowListener
      Parameters:
      event - window event -- ignored
    • windowClosed

      public void windowClosed(WindowEvent event)
      Do nothing.
      Specified by:
      windowClosed in interface WindowListener
      Parameters:
      event - window event -- ignored
    • windowClosing

      public void windowClosing(WindowEvent event)
      Wakes up the VUI thread on the user's closing of the splash screen window if it is sleeping while waiting for the splash screen to be displayed.
      Specified by:
      windowClosing in interface WindowListener
      Parameters:
      event - window event
    • windowDeactivated

      public void windowDeactivated(WindowEvent event)
      Do nothing.
      Specified by:
      windowDeactivated in interface WindowListener
      Parameters:
      event - window event -- ignored
    • windowDeiconified

      public void windowDeiconified(WindowEvent event)
      Do nothing.
      Specified by:
      windowDeiconified in interface WindowListener
      Parameters:
      event - window event -- ignored
    • windowIconified

      public void windowIconified(WindowEvent event)
      Do nothing.
      Specified by:
      windowIconified in interface WindowListener
      Parameters:
      event - window event -- ignored
    • windowOpened

      public void windowOpened(WindowEvent event)
      Do nothing.
      Specified by:
      windowOpened in interface WindowListener
      Parameters:
      event - window event -- ignored
    • buildGUI

      protected void buildGUI()
      GUI initialization.
    • drawVersionString

      protected void drawVersionString(Graphics graphics)
      Get the version string and draw it on the image.
      Parameters:
      graphics - Graphics
    • readImage

      protected Image readImage(String filename)
      Read the splash screen image from disk.
      Parameters:
      filename - the image file name relative to MIPAV's working directory
      Returns:
      the image