I'm working on an alternative to the JOptionPane to provide a slightly
more Mac-ish dialog.
I'm drawing heavily on Apple Human Interface Guidelines ( http://tinyurl.com/5hlpe4
), and I was wondering if any Mac veterans out there have any
comments/opinions on the most recent draft:
http://homepage.mac.com/bricolage1/QDialog.jar
The source is not included in the jar (yet), because it's still a
work-
in-progress. But this demo app provides about 5 consecutive dialogs
demonstrating the standard features of this package. I plan to
release this as open source when it's a little more stable.
Key assets include:
1. An optional help button in the lower-left corner, as well as a
mechanism to add other buttons (such as a "Reset" button) on the left
side of the dialog.
2. Use of a new class: FixedWidthTextArea. With this class the width
of the body text is specified, and the component adjusts its preferred
height to fit the text.
3. Constants similar to JOptionPane (YES_NO_CANCEL_OPTION,
WARNING_MESSAGE, etc.) to ease the transition from JOptionPane-
dependent code.
4. If a cancel button is available, the escape key and 'command-
period' map to it.
5. An optional "Do not show again" checkbox and a "Always apply this
decision" checkbox. (I realize there are several interface guidelines
that stress that these are at best questionable design choices, but my
client has asked for them, so they stay.) Note: in this demo the
preferences are cleared every session.
6. Two distinct blocks of text: one bold and one in a slightly
smaller font. Leopard and Vista both encourage the use of two blocks
of text, although their usage is subtly different.
Questionable design decisions (comments welcome):
1. Mnemonics are not activated on Mac. Normally on a Mac using the
Aqua L&F, you can specify button mnemonics, and when the option key is
held down they are made visible/active.
2. Instead of mnemonics: on Macs for every button with a unique first
character, if you press command+(x) then that button is clicked. So
command-Y selects "Yes". I realize this is not in the Apple
guidelines, but I quite like this feature in GraphicConverter, and I
find it more Mac-like than providing mnemonics.
3. Dialogs are undecorated when a "Cancel" button is not available.
This guarantees that the user cannot use the red close button to try
to dismiss the dialog if their choices are, for example: "Yes" and
"No".
Known bugs include:
1. The help button currently will not launch a browser. (This may be
as much a design/architecture flaw as a bug; the class that does that
browser-launching is not mine to distribute.)
So basically I'm wondering if anyone has any comments: either
regarding existing decisions or features that are missing that will
make this more Mac-like.
My next step is to study XP and Vista and make appropriate platform
adjustments as needed. The end goal is not to have a pixel-perfect
replica of a good Aqua dialog, but to have a flexible model that is
acceptable on all platforms. Elements might change between platforms
(the insets of components, the order of buttons, mnemonics, etc.), but
the basic feature set should remain the same.
Regards,
- Jeremy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/ken.orr
%40mathworks.com
This email sent to email@hidden