Class SimpleWorkingDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public abstract class SimpleWorkingDialog extends JPanel
The SimpleWorkingDialog class provides a customizable dialog panel for displaying progress messages and an optional cancel button.

This class is designed to be extended for specific use cases and supports localization through the LocaleManager.

Features:

  • Displays a progress bar with a customizable message.
  • Supports localization for dialog components.
  • Allows cancel behavior to be defined through the onCancel method.

Example Usage:

 SimpleWorkingDialog dialog = new SimpleWorkingDialog("Loading...", localeManager) {
     @Override
     public void onCancel() {
         System.out.println("Operation canceled.");
     }
 };
 dialog.showDialog(parentFrame, true);
 

Note: This class must implement the onCancel method.

See Also:
  • Constructor Details

    • SimpleWorkingDialog

      public SimpleWorkingDialog(Object message, LocaleManager localeManager)
      Constructs a new SimpleWorkingDialog with the specified message and LocaleManager.
      Parameters:
      message - the message to display in the dialog, can be a Component or String
      localeManager - the LocaleManager for localization, can be null
  • Method Details

    • showDialog

      public void showDialog(JFrame parentFrame, boolean cancelable)
      Displays the dialog with the specified parent frame and cancelable option.
      Parameters:
      parentFrame - the parent frame for the dialog
      cancelable - whether the dialog should include a cancel button
    • onCancel

      public abstract void onCancel()
      Called when the cancel button is pressed. Must be implemented.
    • dispose

      public void dispose()
      Disposes of the dialog.