Java TM Look and Feel Design Guidelines: Advanced Topics > Part II: Special Topics > 2: Windows > Property Windows   Previous Next Contents/Index/Search


 

Property Windows

A property window is a dialog box in which users can display or change values of one or more object properties.

Property Window Characteristics

A property window has four main behavioral characteristics--one from each of the following pairs:

  • Modal or modeless
  • Single-use or multiple-use
  • Dedicated or non-dedicated
  • Inspecting or non-inspecting

This section discusses only the following characteristics:

  • Dedicated
  • Non-dedicated
  • Inspecting
  • Non-inspecting

For a discussion of the remaining characteristics, see Chapter 8 of Java Look and Feel Design Guidelines , 2d ed.

Table 2 describes each main behavioral characteristic that can apply to property windows.

 

Characteristic Description

Modal

Prevents a user from interacting with other windows in the current application.

Modeless

Does not prevent a user from interacting with other windows in the current application.

Single-use

Intended for users who are likely to perform only one operation with the dialog box before dismissing it.

Multiple-use

Intended for users who are likely to perform more than one operation with the dialog box before dismissing it.

Dedicated

Affects only objects already selected when the property window opened.

Non-dedicated

Affects currently selected objects, even if the current selection changes.

Inspecting

Displays a continuously updated view of the property values for the currently selected object, even if the values change.

Non-inspecting

Displays a static view, or snapshot, of the selected object's property values.






Only a few combinations of the characteristics in Table 2 are recommended, so choosing the correct property window characteristics is simpler than it might seem. This section describes how to make the correct choices. Later sections describe each property window characteristic in detail.

Figure 7 shows a primary window, an inspecting property window, and a non-inspecting property window.

Figure 7   Property Windows and a Primary Window

 

For information about positioning a property window in relation to its parent window, see Positioning Secondary Windows.

Choosing the Correct Property Window Characteristics

Before choosing characteristics for your application's property windows, consider how users should interact with each window. A property window's intended use determines its correct window characteristics. Figure 8 helps you choose the correct characteristics for property windows.

Figure 8   Steps for Choosing Property Window Characteristics

 

Of the sets of property window characteristics in Figure 8, only two sets are typically used in applications. Table 3 provides examples of property windows whose characteristics match those of the typical sets. 

 

Property Window Characteristics Example

Multiple-use, modeless, non-dedicated, inspecting

The small windows for choosing colors or layers in graphics applications such as Adobe® Photoshop software.

Single-use, modeless, dedicated, non-inspecting

The Preferences dialog box of a typical application.






Dedicated and Non-Dedicated Property Windows

A dedicated property window affects only objects already selected when the property window opened. Changing the selection while a dedicated property window is open does not change which objects the property window affects.

In contrast, a non-dedicated property window affects only objects currently selected--even if the selection changes while the property window is open. In other words, a non-dedicated property window affects whichever objects are currently selected when a user clicks the window's OK button or Apply button. In a non-dedicated property window, a user can change which objects the window affects. To do so, the user can select different objects while the window is open.

Inspecting and Non-Inspecting Property Windows

Property windows are inspecting or non-inspecting, depending on:

  • How current their displayed information is
  • When a user's changes take effect

Inspecting Property Windows

An inspecting property window is a dialog box that both:

  • Displays a continuously updated view of the property values for the selected object
  • Enables a user to change the displayed property values (and the selected object) immediately

Figure 9 shows an inspecting property window.

Figure 9   Inspecting Property Window

 

In inspecting property windows, a user does not click an OK button or Apply button to apply changes. The application applies changes automatically.

An inspecting property window displays the values of the selected object. If a user changes the selection, the values in the property window also change immediately to reflect the newly selected object. An inspecting property window continuously updates its view of an object's property values, even if those values change outside a user's control. Most inspecting property windows are modeless.

If your application has many types of objects, avoid creating a separate inspecting property window for each type. Instead, create a single inspecting property window whose contents change depending on the properties of the selected object.

If users need to update two or more interdependent property values, do not provide an inspecting property window. Instead, provide a non-inspecting property window, thereby ensuring that changes to interdependent properties occur at the same time.

Here is an example of why inspecting property windows are inappropriate for updating interdependent property values. An application has a Customer object for which users can enter an address that includes a city and country--such as Paris, France. As a user types the address, the Customer object automatically verifies that the specified city ( Paris) is in the specified country ( France).

In an inspecting property window, if a user tries to change the city name from Paris to Tokyo, the Customer object rejects the change because the user has not changed the country name from France to Japan. If the user then tries to change the country name, the change is again rejected, because the city name has not been changed from Paris to Tokyo.

Non-Inspecting Property Windows

A non-inspecting property window is a property window that displays a static view, or snapshot, of the selected object's property values--accurate as of the time that the property window opened. Figure 10 shows a non-inspecting property window.

Figure 10   Non-Inspecting Property Window

 

Non-inspecting property windows are particularly useful when a user needs to update several interdependent values at the same time.

If a user changes property values in a non-inspecting property window, those changes take effect only if the user clicks the window's OK button or Apply button. Changes that take place beyond the user's control are not reflected in the window until it opens again.

 


NOTE ¯ If your application's objects can change outside a user's control, alert the user to any such changes. For more information, see Alerting Users After an Object's State Changes.


Behavior and Layout of Property Windows

For property windows, the correct behavior and command-button layout depend on the window's characteristics. This section provides guidelines for the behavior and layout of property windows.

 Place no menu, toolbar, or status bar in property windows.

 To enable users to open a property window, place an item labeled Properties on the Object menu, if there is one. ( Object stands for the type of the object whose properties the window displays--for example, Document.) If your application has no Object menu, place the Properties item on the Edit menu. Label the item Object Properties if the Edit menu also contains items for other property windows.

Title Text in Property Windows

Property windows include title text, displayed in the title bar, as shown in Figure 11.

Figure 11   Title Text in the Title Bar of a Property Window

 

Regardless of a property window's characteristics, the title text consists of the following items, in order:

  1. The name of the object that the window represents
  2. A hyphen, preceded by one space and followed by another
  3. The name of the command that opened the window

In Figure 11, the window represents an object named SuperRivet. The command that opened the window is Alloy Properties.

 In property windows, format the title text as Object Name - Command , as shown in Figure 11. Object Name stands for the name of the currently displayed object. Precede the hyphen by one space and follow it by one space. Command stands for the name of the command that opened the property window.)

 If a user might not know which application created a particular property window, include the application's name in that window's title text. Format the title text like this: Object Name - Command - Application Name .
(Precede each hyphen by one space and follow it by one space.)

 In the title text of inspecting property windows, update the current object's name each time you update the window's contents.

Command Buttons in Non-Inspecting Property Windows

Table 4 describes the command buttons you can place in non-inspecting property windows.

 

Button Description

Apply

Updates the properties of the associated object.

Reset

Discards any changes made in the window since the last "apply" action. The Reset command then refills the window's fields with the values from the associated object.

OK

Updates the properties of the associated object and then closes the window.

Close

Closes the property window but not the application. If a user has changed the values in the window but has not applied them, the Close button opens an alert box containing the following text: "Your changes have not been saved. To save the changes, click Apply. To discard the changes, click Discard. To cancel your Close request, click Cancel."

Cancel

Works like the Close button, except that the Cancel button does not display an alert box before discarding changes.

Help

Displays help text in another window while leaving the property window open.






Before deciding which command buttons to place in a non-inspecting property window, estimate how many times a user needs to use the window before closing it.

If a user will use a property window only once before closing it, then place an OK and a Cancel button--in that order--at the bottom right of the window, as shown in Figure 12.

Figure 12   Required Buttons for a Single-Use Property Window

 

Optionally, you can add a Help button to the right of the Cancel button, as shown in Figure 13.

Figure 13   Required and Optional Buttons for a Single-Use Property Window

 

If a user will use a property window repeatedly before closing it, place an Apply and a Close button--in that order--at the bottom right of the window, as shown in Figure 14.

Figure 14   Required Buttons for a Repeated-Use Property Window

 

Optionally, you can place a Reset button between the Apply button and the Close button, and place a Help button to the right of the Close button, as shown in Figure 15.

Figure 15   Required and Optional Buttons for a Repeated-Use Property Window

 

The following guidelines apply only to non-inspecting property windows.

 Place either an OK button or an Apply button in non-inspecting property windows.

 Make the OK button or the Apply button the default command button. (For more information about default command buttons, see Chapter 10 of Java Look and Feel Design Guidelines , 2d ed.)

 Place the dismissal button to the right of the OK button or Apply button.

 If a non-inspecting property window has an OK button, label its dismissal button Cancel. Otherwise, label the dismissal button Close.

 Ensure that clicking the title bar's close-window control has the same effect as clicking the window's Close or Cancel button.

 Open an alert box if a user clicks the Close button before applying changes entered in the window. In the alert box (which includes a Discard button), display the following text: "Your changes have not been saved. To save the changes, click Apply. To discard the changes, click Discard. To cancel your Close request, click Cancel."

 If a non-inspecting property window has an Apply button, ensure that clicking the Apply button updates the associated object, using the current values from the property window.

 If a non-inspecting property window has an OK button, ensure that clicking the OK button updates the properties values of the associated object and then closes the window.

 If a non-inspecting property window needs a Reset button, place that button between the window's Apply and Close buttons.

 Ensure that clicking the Reset button performs the following operations, in order:

  1. Discards any changes made in that window since it opened, or since the last "apply" operation
  2. Refills the window's fields with the current values of its associated object

Command Buttons in Inspecting Property Windows

In inspecting property windows, place a Close button at the bottom right of the window. Optionally, place a Help button to the right of the Close button.

The following guidelines apply only to inspecting property windows.

 Ensure that clicking the Close button immediately closes the window.

 Ensure that clicking the title bar's close-window control has the same effect as clicking the window's Close button.

 Some controls do not immediately send their updates to the object being inspected. (For example, a text field does not send its updated text until it has lost input focus.) In inspecting property windows, send all pending updates to the window's object when a user clicks the window's Close button or close- window control.


Java Look and Feel Design Guidelines: Advanced Topics.
Copyright 2001. Sun Microsystems, Inc. All Rights Reserved.
Previous Next Contents/Index/Search
Table 4   Command Buttons for Non-Inspecting Property Windows 
Table 3   Examples of Typical Property Windows 
Table 2   Property Window Characteristics 
Left Curve
Java SDKs and Tools
Right Curve
Left Curve
Java Resources
Right Curve
JavaOne Banner Java 8 banner (182)