Class StartupWindow

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

public class StartupWindow extends JFrame
Startup window containing splash screen (logo) and information about loading progress.
See Also:
  • Method Details

    • getInstance

      public static StartupWindow getInstance()
      Returns the only instance of startup window.
      Returns:
      Startup window.
    • getFont

      public Font getFont()
      Returns font that should be used for all widgets in this component based on the language preferences specified by user.
      Specified by:
      getFont in interface MenuContainer
      Overrides:
      getFont in class Component
      Returns:
      Font to be used in this component.
    • setNumberOfDiaries

      public void setNumberOfDiaries(int numberOfDiaries)
      Sets total number of diaries to be read at startup.
      Parameters:
      numberOfDiaries - Total number of diaries to be read.
    • setProgress

      public void setProgress(int numberOfReadDiaries)
      Sets progress i.e. how many diaries have already been read so far.
      Parameters:
      numberOfReadDiaries - Number of read diaries.
    • setProgressMessage

      public void setProgressMessage(String progressMessage)
      Sets progress message e.g. which file is currently being loaded etc.
      Parameters:
      progressMessage - Text to be shown as current startup action.
    • hideWindow

      public void hideWindow()
      Finishes progress bar and hides window.