Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Apple Human Interface Guidelines.pdf
Скачиваний:
13
Добавлен:
27.03.2015
Размер:
29.57 Mб
Скачать

C H A P T E R 1 5

Controls

Indicators

Indicators are controls that show users the status of something. For the most part, users don’t interact with indicators.

Important: The controls described in this section are suitable for use in the window body; they should not be used in the window-frame areas. See “Window-Frame Controls” (page 249) for controls designed specifically for use in the toolbar and bottom-bar areas in your window.

Progress Indicators

Progress indicators inform users about the status of lengthy operations. (For guidelines on when to provide such information, see “Feedback and Communication” (page 42).)

Progress indicators often appear in a dialog that describes the progress of a process. When the process being performed can be interrupted, the progress dialog should contain a Cancel button (and support the Esc key). If interrupting the process will result in possible side effects, the button should say Stop instead of Cancel. To learn more about dialogs in general, see “Dialogs” (page 230). To supply a Cancel (or Stop) button, you use a push button; for more information about this control, see “Push Buttons” (page 258).

Be sure to locate progress indicators in consistent locations in your windows and dialogs. For example, the Mail application displays the asynchronous progress indicator in the far right of the To field as it finds and displays email addresses that match what the user types. Choosing a consistent location for progress indicators allows users to quickly check a familiar place for the status of an operation. See “Consistency” (page 43) for more information on the importance of providing consistency in your application.

There are three types of progress indicators, each of which is suitable for a specific situation:

Determinate progress bar

Indeterminate progress bar

Asynchronous progress indicator

Determinate Progress Bars

A determinate progress bar shows users that a process is occurring and gives them a rough idea of when it will finish. For example, Figure 15-55 shows the progress indicator Software Update displays when it is checking for new software.

302 Indicators

2008-06-09 | © 1992, 2001-2003, 2008 Apple Inc. All Rights Reserved.

C H A P T E R 1 5

Controls

Figure 15-55 A determinate progress bar provides feedback on a process with a known duration

Determinate Progress Bar Usage

Use a determinate progress bar when the full length of an operation can be determined and you can tell the user how much of the process has been completed. For example, you could use a determinate progress bar to show the progress of a file conversion.

You should ensure that a determinate progress bar in your application accurately associates progress with time. A progress bar that becomes 90 percent complete in 5 seconds but takes 5 minutes for the remaining 10 percent, for example, would be annoying and lead users to think that something is wrong.

Determinate Progress Bar Contents and Labeling

In a determinate progress bar, the “fill” moves from left to right and should fill in completely before it is dismissed. The fill is provided automatically, but you can determine the minimum and maximum values that should be represented.

If necessary, you can provide a complete or partial sentence that appears as a label with a determinate progress bar in a dialog. You can do this so users understand the context in which the process is occurring. Such a label should have sentence-style capitalization (see “Capitalization of Interface Element Labels and Text” (page 131) for more information on this style).

Determinate Progress Bar Specifications

Determinate progress indicators are available in regular and small sizes. The height of a determinate progress indicator is fixed for each size, but you can specify the length. Figure 15-56 shows a regular-size determinate progress bar as it looks when active and inactive.

Indicators

303

2008-06-09 | © 1992, 2001-2003, 2008 Apple Inc. All Rights Reserved.

C H A P T E R 1 5

Controls

Figure 15-56 The active and inactive appearance of a determinate progress bar

Active fill

Inactive fill

Determinate Progress Bar Implementation

Determinate progress bars are available in Interface Builder. In the Attributes pane of the inspector, select Bar for the style and deselect the Indeterminate checkbox. To create a determinate progress bar using Application Kit programming interfaces, use the NSProgressIndicator class with style

NSProgressIndicatorBarStyle.

Indeterminate Progress Bars

An indeterminate progress bar shows users that processing is occurring, but does not give any indication of when it will finish. For example, Keynote displays an indeterminate progress bar as it begins opening a file, as shown in Figure 15-57.

Figure 15-57 An indeterminate progress bar provides feedback on a process of unknown duration

Indeterminate Progress Bar Usage

Use an indeterminate progress bar when the duration of a process can’t be determined. For example, if your applicationattemptstomakeadial-upcommunicationconnection,youhavenowaytoaccuratelydetermine how long it will take, so you can use an indeterminate progress indicator to let users know that processing is ongoing. If an indeterminate process reaches a point where its duration can be determined, switch to a determinate progress bar (see “Determinate Progress Bars” (page 302) for more on determinate progress bars).

Indeterminate progress bars work best in a dialog or window that focuses on the occurring process. For example, the indeterminate progress bar Keynote displays is in a dialog that is focused solely on the opening of the file (this dialog is shown in Figure 15-57). If you need to provide an indication of an indeterminate process that’s associated with a part of a window, such as a control, or if space is limited, consider using an asynchronous progress indicator instead. (See “Asynchronous Progress Indicators” (page 305) for more information on asynchronous progress indicators.)

304 Indicators

2008-06-09 | © 1992, 2001-2003, 2008 Apple Inc. All Rights Reserved.

C H A P T E R 1 5

Controls

Indeterminate Progress Bar Contents and Labeling

An indeterminate progress bar displays a spinning striped cylinder to indicate an ongoing process. Mac OS X provides this appearance automatically.

If necessary, you can provide a complete or partial sentence that appears as a label with an indeterminate progress bar in a dialog. You can do this so users know what process is occurring. Such a label should have sentence-style capitalization (see “Capitalization of Interface Element Labels and Text” (page 131) for more information on this style). Also, you can end the label with an ellipsis (...) to emphasize the ongoing nature of the processing.

Indeterminate Progress Bar Specifications

Indeterminate progress bars are available in regular and small sizes. The height of an indeterminate progress bar is fixed for each size, but you can specify the length. Figure 15-58 shows both regular-size and small indeterminate progress bars as they look when active and inactive.

Figure 15-58 The active and inactive appearance of an indeterminate progress bar

Active fill

Inactive fill

Indeterminate Progress Bar Implementation

Indeterminate progress bars are available in Interface Builder. In the Attributes pane of the inspector, select Bar for the style and be sure the Indeterminate checkbox is selected. To create an indeterminate progress bar using Application Kit programming interfaces, use the NSProgressIndicator class with style

NSProgressIndicatorBarStyle.

Asynchronous Progress Indicators

An asynchronousprogressindicatorshowsusersthatprocessingisoccurringbutdoesnotgiveanyindication of when the process will finish. For example, Mail briefly displays an asynchronous progress indicator in the To: field of a New Message window while it performs a search on the name the user types, as shown in Figure 15-59.

Indicators

305

2008-06-09 | © 1992, 2001-2003, 2008 Apple Inc. All Rights Reserved.

C H A P T E R 1 5

Controls

Figure 15-59 An asynchronous progress indicator provides feedback on a process

An asynchronous progress indicator

Asynchronous Progress Indicator Usage

Use an asynchronous progress indicator when space is very constrained, such as in a text field or near a control. Because this indicator is small and unobtrusive, it is especially useful for asynchronous events that take place in the background, such as retrieving messages from a server.

Don’t use the asynchronous progress indicator in operations that start out indeterminate but could become determinate, because the determinate progress indicator is a different shape and takes up much more space. If the process might change from indeterminate to determinate, use an indeterminate progress bar instead of an asynchronous progress indicator, because it is the same shape and size as the determinate progress bar. (See “Indeterminate Progress Bars” (page 304) for more information about indeterminate progress bars.)

Asynchronous Progress Indicator Contents and Labeling

Because an asynchronous progress indicator typically appears when the user initiates a process, a label may not be necessary. If you decide to provide a label that appears with the indicator, create a complete or partial sentence that briefly describes the process that is occurring.

If you decide to provide a label that appears with an asynchronous progress indicator, be sure to use sentence-style capitalization (see “Capitalization of Interface Element Labels and Text” (page 131) for more information on this style). Also, you can end the label with an ellipsis (...) to emphasize the ongoing nature of the processing.

Asynchronous Progress Indicator Specifications

The appearance of the asynchronous progress indicator is provided automatically, but you can choose the size that fits best in your window layout. Asynchronous progress indicators are available in regular, small, and mini sizes. Figure 15-60 shows a regular-size asynchronous progress indicator.

Figure 15-60 A regular-size asynchronous progress indicator

306 Indicators

2008-06-09 | © 1992, 2001-2003, 2008 Apple Inc. All Rights Reserved.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]