Feature #180
closed
Add MessageBox to UserConsent
Added by Tobias Wich over 11 years ago.
Updated over 11 years ago.
Description
Messages for the user like errors and infos don't really fit into the user consent design. We already have a file dialog and we need some kind of message boxes to notify the user of abnormal behaviour in the PCSC stack and so on.
In order to provide a robust API I suggest getting some inspiration from JOptionPane.showMessageDialog as it is already the case with the FileDialog.
- Status changed from New to Review
- Assignee set to Dirk Petrautzki
- Reviewer set to Tobias Wich
- Status changed from Review to In Progress
Messagebox should use the openecard logo in the window frame. Files can be loaded conveniently with the FileUtils class from common.
I added a fix to the PluginUserConsent, so that the project builds. Please work on top of this branch.
- Status changed from In Progress to Review
It now shows the open ecard logo in the window frame. Shouldn't the FileDialog behave in the same way?
Dirk Petrautzki wrote:
It now shows the open ecard logo in the window frame. Shouldn't the FileDialog behave in the same way?
Yes that would be desireable. Issue opened (#224)
I worked on the messagebox interface and made the following changes:
- Rename everything named *Box to *Dialog
Most of the functions in the MessageBox class were already named *Dialog. Naming all of the classes and functions pf the messages this way provides a more consistent image.
- Make title parameter mandatory
I can't imagine any real case where a default title would be useful. The only thing that comes to my mind is dialogs to help debugging. But in that case nobody needs a translation.
- Replace integer based dialog-, message- and result types with enum types
Integer based type enumerations are so Java 1.4. Swing is a beast from the past but we can provide a cleaner interface with Java 5 features.
- Minor changes in the interface
Browse code to find out.
Are there any objections or improvement suggestions to the changes?
- Status changed from Review to Closed
Also available in: Atom
PDF