Class WaitingWindow

java.lang.Object
com.lariflix.jemm.forms.WaitingWindow

public class WaitingWindow extends Object
This class represents a window that is displayed while the application is waiting for a process to complete. It extends the JFrame class from the javax.swing package.
Since:
1.0
Author:
Cesar Bianchi
See Also:
  • Constructor Details

    • WaitingWindow

      public WaitingWindow(String cURL, int nOption)
      Constructs a new WaitingWindow with the specified base URL and option. This constructor initializes the panel with the base URL and option, and creates a new dialog with the panel as its content pane.
      Parameters:
      cURL - The base URL to be set in the panel.
      nOption - The option to be set in the panel. It can be either DOWNLOADING_DATA or UPLOADING_DATA.
      Since:
      1.0
      See Also:
  • Method Details

    • showDialogWithTimmer

      public void showDialogWithTimmer()
      Displays the dialog to the user and automatically closes it after 2 seconds. This method uses a ScheduledExecutorService to schedule a task that closes the dialog after 2 seconds. The dialog is then made visible to the user.
      Since:
      1.0
      See Also:
    • showDialogWithTimmer

      public void showDialogWithTimmer(int delay)
      Displays a dialog to the user for a specified amount of time.
      Parameters:
      delay - The amount of time, in milliseconds, that the dialog should be displayed. After this amount of time has passed, the dialog is automatically closed.
      Since:
      1.0
    • closeDialog

      public void closeDialog()
      Closes the dialog window. This method finds the window that is the ancestor of the component, and then disposes of it, effectively closing the window. If the component does not have an ancestor, this method does nothing.
      Since:
      1.0
    • showDialog

      public void showDialog()
      Displays the dialog window. This method sets the visibility of the dialog to true, effectively displaying it to the user. If the dialog is already visible, this method does nothing.
      Since:
      1.0
    • endDialog

      public void endDialog()
      Ends the dialog window. This method sets the visibility of the dialog to false, effectively hiding it from the user. If the dialog is already hidden, this method does nothing.
      Since:
      1.0