| java.sun.com > Guidelines Home Page > Java Look and Feel Design Guidelines > Part II: Fundamental Java Application Design > 6: Behavior > Operational Feedback |
Users interact more smoothly with your application if you keep them informed about the application's state. The information you provide can include a response to an action that a user is intentionally controlling (such as changing the shape of the pointer), or you can offer feedback about actions that the application is performing on its own (such as a long copying operation). This section focuses on feedback about operations that the application performs on its own once the user initiates them.
You can use three kinds of visual feedback for operations that take a long time to complete:
Animation is especially beneficial when you want to communicate that the system is busy. Progress indication shows users the state of an operation; status animation lets users know that an application or a part of an application is not available until an operation is done. For more about animation in your interface, see Animation.
When your
application is processing a long operation and users can continue
to work in other areas of the application, provide them with information
regarding the state of the process.
During a long
operation, when users must wait until the operation is
complete, change the shape of the pointer. For example, an application's
pointer might change to the wait pointer after the user selects a file and
before the file opens.
For information on the JFC-supplied pointer shapes available in the Java look and feel, see Table 6.
Use a wait
pointer whenever users are (or could be) blocked from interaction
with the application for more than 2 seconds.
Use a progress
bar whenever users are blocked from interacting with the
application for more than 6 seconds.
Use a progress
bar when users want to know when or whether the operation
has been completed, and the absolute or approximate proportion of
completion can be determined.
Use a status
animation when an activity will take 6 or more seconds and you
can communicate only whether the process is live or not.
Progress animation consists of a progress bar or percentage indicator that is generated by an application. You can use progress animation to describe any job in progress.
The most useful form of progress animation, a progress bar, is an interface element that indicates one or more operations are in progress and shows users what proportion of the operation has been completed. The progress bar consists of a rectangular bar that fills as the operation progresses, as shown in the following figure.
Figure 76 Progress Bar
You can orient the progress bar horizontally, so it fills from left to right, or vertically, so it fills from bottom to top. Within the bounds of the progress bar, you can display a text message that is updated as the bar fills. By default, the message shows the percentage of the process completed--for example, 25%.
If you know
the estimated length of an operation (for example, if the user is
copying files) or the number of operations, use the Java look and feel progress
bar. This bar fills as the operation progresses.
When the user
performs an operation whose function can be accurately
estimated, show the time remaining as part of the progress bar. For example,
you might use the message, "Two hours and 18 minutes remaining." In most
cases, you will need to base your estimate on typical throughput and adjust
your estimate as you determine how the current system load or network
delay affects throughput. These calculations sometimes result in an increase
in the remaining time.
When the user
performs an operation on objects of known size, or when only
the number of objects is known, equate the length of the progress bar to the
total units of work to be performed.
Update the
progress bar to show the proportion completed at least every 4
seconds. If you overestimate how much is already done, the progress bar can
remain at 99 percent until the task is complete. If you underestimate how
much is already done, fill the remaining portion of the progress bar when the
operation completes. The percentage done should never decrease.
Use the most
accurate form of progress bar (time remaining, proportion
remaining, objects remaining) available, given the data you are trying to
time.
Users cannot
interact with a progress bar. If you would like to enable users to
set a value in a range, use the slider (implemented with the JSlider
component).
Figure 77 shows the use of progress animation in a progress dialog box.
Click here to view the corresponding code for Figure 77 (also available on the book's companion CD-ROM).
Figure 77 Animation in a Progress Dialog Box
When you have no numeric information on which to base your progress estimates, use a status animation to reassure the user that an otherwise invisible activity is still in progress and the system has not crashed.
A status animation is a sequence of images designed to inform users that an operation is in progress. A status animation loops endlessly until the operation finishes or the user acts to stop the operation. The animation reassures users that an otherwise invisible activity is still in progress and the system has not crashed. Because the display duration of any status animation is often unknown, you should design the loop to run continuously until the operation completes.
For each status animation, include a still image and an animation. The still image indicates that a process has stopped or that the system is inactive. Make the still image different from the animation sequence so that users can easily tell whether an activity is in progress (though possibly stalled) or the system is quiescent.
When creating
system status animation, consider the target users and their
environment. If the animation needs to be visible from across the room, a
bolder animation coupled with sound might be effective. On the other hand,
that same animation viewed by a user sitting at the workstation would be
annoying.
When feasible,
let users configure system status animation, so they can
adapt their systems to the environment.
In your status
animations, provide two files, one an animation sequence to
display the active status and the other a still image to display the inactive
status.
Screen
readers, which are used by people with visual impairments, do not
recognize images. Use the accessibleDescription field to describe
what is represented by the animation and change the description
appropriately when the status of the animation changes. Make sure that this
information results in a propertyChange event so that the user can be
notified of the change.
| Java Look and Feel Design Guidelines, second edition.
Copyright 2001. Sun Microsystems, Inc. All Rights Reserved. |