Project

General

Profile

Actions

Bug #5012

open

highlighted OK button in 'Annimate at runtime ...' menu item does not work.

Added by jianwu jianwu over 14 years ago. Updated over 14 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
interface
Target version:
Start date:
05/14/2010
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
5012

Description

This bug is reported by a scientist user.

Under tools select 'Annimate at runtime...', it will ask you to for the 'Time to hold the highlight'. Enter a number. The OK button will be highlit, but you have to click on it or use 'Tab' firstly to select, even though it is highlit as opposed to simply hitting the 'Enter' (<cr>) button.

Haven't found other menu items having the same behavior.

In File --> Save As, you can just type file name and use 'Enter' to finish saving, no 'Tab' or mouse needed. I also tried the similar situations in other software, they allows users to just hit 'Enter' after enter number or string.


Files

JOptionPaneTest.java (427 Bytes) JOptionPaneTest.java Christopher Brooks, 05/15/2010 10:59 AM
PtQueryTest.java (1.13 KB) PtQueryTest.java Christopher Brooks, 05/15/2010 11:00 AM
JFileChooserComponentDialogTest.class (483 Bytes) JFileChooserComponentDialogTest.class Christopher Brooks, 05/15/2010 11:11 AM
Actions #1

Updated by Christopher Brooks over 14 years ago

Attached is a test that uses JOptionPane that closes when the user hits "Return".

Actions #4

Updated by Christopher Brooks over 14 years ago

Just to be clear, the problem here is that when a dialog comes up and the
user immediately hits the "Return/Enter" key, then the expected behavior
is that the highlighted button (usually "OK") will be activated and
the window will close. This is not the case with a bunch of Ptolemy dialogs,
the user must move the focus (either with the mouse or by tabbing)
to the buttons and then hit "Return/Enter"

I think the problem is with ptolemy.gui.ComponentDialog.
I attached three test cases.
The first one:
http://bugzilla.ecoinformatics.org/attachment.cgi?id=325
uses JOptionPane. It has a text entry field and when the user
hits return, the window closes.

The second one uses ptolemy.gui.Query and ptolemy.gui.ComponentDialog
http://bugzilla.ecoinformatics.org/attachment.cgi?id=326
does not close when the user hits return.

However, in the second attachment, if I comment out the Java code that
adds the line entry then code works as expected - hitting return closes
the dialog.

I suspect the problem has to do with focus and the focus of the internal
ptolemy.gui.Query not being passed up to the container ComponentDialog.

In Ptolemy Vergil, File | Save As uses the JFileChooser in ptolemy.gui.Top.
ComponentDialog is not used.

The third attachment:
http://bugzilla.ecoinformatics.org/attachment.cgi?id=327
embeds a JFileChooser into a ComponentDialog. This test does work, hitting
return closes the window. I think the issue is that there is not a
entry widget in the JFileChooser.

It could be that not having the focus be on the buttons is the right thing
in the case of the the second attachment. For example, if there was a
TextArea to be filled in and the focus was in the TextArea and the user
typed a return, then I'd expect that the TextArea would get the return not
the button. To try this, add
query.addTextArea("textArea", "An area", "Elvis");
to the second attachment.

Actions #5

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 5012

Actions

Also available in: Atom PDF