Class SplashWindow

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

public class SplashWindow extends JWindow
Create a splash screen with a progress bar. This code is inspired by the code given at http://www.labo-sun.com/resource-fr-codesamples-1126-0-java-gui-splash-screen-avec-progress-bar.htm.
Since:
1.0.0
Version:
"1.0.14" - b202111241200L
Author:
Julien SEINTURIER - Université de Toulon / CNRS LIS umr 7020 - github.com/jorigin/jcommon (contact@jorigin.org)
See Also:
  • Constructor Details

    • SplashWindow

      public SplashWindow(ImageIcon image)
      Create a splash window displaying the image given in parameter. The maximum value of the progress bar attached to the splash windows is set to 0
      Parameters:
      image - the image to display in the splash window.
    • SplashWindow

      public SplashWindow(ImageIcon image, int intProgressMaxValue)
      Create a splash window displaying the image given in parameter and set the attached progress bar maximum value to intProgressMaxValue
      Parameters:
      image - the image to display within the splash window.
      intProgressMaxValue - the maximum value of the attached progress bar.
  • Method Details

    • setProgressMaxValue

      public void setProgressMaxValue(int maxValue)
      Set the maximum value of the progress bar attached to the splash windows. If the parameter maxValue is lesser than 0, the progress bar is set to indeterminate.
      Parameters:
      maxValue - the maximum value.
    • setProgressValue

      public void setProgressValue(int value)
      Set the current value of the progress bar attached to the splash windows.
      Parameters:
      value - the current value of the progress bar.
    • setState

      public void setState(String text)
      Set the state of the splash windows, the state is the text displayed under the progress bar.
      Parameters:
      text - te text to display in the splash window.