BusyIndicator
The BusyIndicator is a full-screen overlay that signals an ongoing process and blocks user interaction until it completes. It covers the entire interface during operations like initialization or data syncs. While the Loading component focuses on specific areas within the interface, the BusyIndicator applies globally.
The BusyIndicator displays as a spinner with no configuration required. Add a message, change the spinner's theme, or adjust visibility settings when a process needs more context.
Show Code
- BusyDemoView.java
Backdrops
The BusyIndicator component in webforJ allows you to display a backdrop to block user interaction while a process is ongoing. By default, the component enables the backdrop, but you have the option to turn it off if needed.
The BusyIndicator shows a backdrop by default. You can control the visibility of the backdrop using the setBackdropVisible() method, as shown below:
BusyIndicator busyIndicator = App.getBusyIndicator();
busyIndicator.setBackdropVisible(false); // Disables the backdrop
busyIndicator.open();
Even when you turn off the backdrop, the BusyIndicator component continues to block user interaction to ensure the underlying process completes uninterrupted. The backdrop simply controls the visual overlay, not the interaction blocking behavior.
Spinner
The BusyIndicator component in webforJ includes a Spinner that visually indicates a background operation is in progress. You can customize this spinner with several options, including its size, speed, direction, theme, and visibility.
Here's an example of how you can customize the spinner within a BusyIndicator component:
Show Code
- BusySpinnerDemoView.java
Use cases
-
Page-Wide Processing The
BusyIndicatoris well-suited for larger, page-wide operations, such as when a user initiates a task that affects the entire page, like uploading a file or processing data across multiple sections. It can inform users that the entire app is working, preventing further interaction until the process is complete. -
Critical System Operations When performing system-critical tasks such as syncing data, applying system-wide updates, or processing sensitive information, the
BusyIndicatorgives clear visual feedback that a major operation is ongoing, allowing the user to wait until it’s completed. -
Asynchronous Data Loads In scenarios where asynchronous data processing is involved, such as when calling multiple APIs or waiting for complex computations, the
BusyIndicatorcomponent actively indicates that the system is busy, prompting users to wait before performing additional actions.