This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 10611 - Save/Cancel has mnemonics the JLF guidelines say to omit
Summary: Save/Cancel has mnemonics the JLF guidelines say to omit
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P4 blocker (vote)
Assignee: Gabriel Tichy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-03-22 23:28 UTC by Jan Benway
Modified: 2008-12-22 20:38 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch which simplifies mnemonic and options. (2.68 KB, patch)
2002-01-04 06:43 UTC, Rochelle Raccah
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Benway 2001-03-22 23:28:28 UTC
Make a change to a Java file in the editor and then close the editor.

A dialog box comes up that says:

File <filename> is modified. Save it?
The choices are Save/Discard/Cancel.

All three have mnemonics. The mnemonics for Save and Cancel should be removed
because having them there violates the Java Look and Feel Guidelines and makes
Netbeans dialog boxes inconsistent with one another.

For the guidelines I refer to, see:
http://java.sun.com/products/jlf/dg/higl.htm#51121

In the section called "OK and Cancel Buttons" it says:
"Do not add a mnemonic to the Cancel button."

In the section called "Default Command Buttons" it says:
"Do not add a mnemonic for the default command button."

This means that the mnemonic for Save (the default button) and for Cancel should
be removed. The mnemonic for Discard should be kept.
Comment 1 Jan Chalupa 2001-05-06 15:07:42 UTC
Target milestone -> 3.3
Comment 2 Jiri Mzourek 2001-10-19 14:38:56 UTC
Component change: ui -> editor
Comment 3 Rochelle Raccah 2001-10-23 22:27:23 UTC
Please realize, that with the fix of 10835, you don't need JButtons in
order to use mnemonics.  Therefore, the JButton for Save can be
replaced with an Object/String, the JButton for Discard can be
replaced with an Object/String and a value in the properties file with
an & for the mnemonic, and the JButton for cancel can be replaced with
NotifyDescriptor.CANCEL_OPTION.
Comment 4 Jan Lahoda 2001-10-29 10:27:10 UTC
I think this dialog is defined in openide, not in editor module.
Reassign if I am wrong.
Comment 5 Gabriel Tichy 2001-11-07 17:01:13 UTC
Fixed in maintrunk.
Comment 6 Rochelle Raccah 2001-11-08 04:09:25 UTC
Why was the entry in the bundle removed for the save mnemonic but not for the cancel 
one?  Also, my comment below (which would make the code nicer by using regular 
constants wherever possible) seems to have been ignored.  Why is that?
Comment 7 Rochelle Raccah 2002-01-04 06:42:08 UTC
My cleanup comments were not addressed, so I've created a patch with
the changes.  Please apply it.
Comment 8 Rochelle Raccah 2002-01-04 06:43:09 UTC
Created attachment 3970 [details]
Patch which simplifies mnemonic and options.
Comment 9 Jaroslav Tulach 2002-01-04 08:37:22 UTC
I have applied the patch. Btw. Rochelle do not you want to ask for a
developer status for openide and core?
Comment 10 Marian Mirilovic 2002-01-29 16:05:17 UTC
verified in [nb_3.3.1](rc3-20020129)
Comment 11 Marian Mirilovic 2002-01-29 16:18:57 UTC
verified in [FFJ3.0]+[JP3.2] with [jdk1.4](91) on [Solaris-CDE](5.8) && [Win2K]
Comment 12 Quality Engineering 2003-07-01 16:37:08 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.