Create a progress bar dialog for the exporting process
USE CASE: WHAT DO YOU WANT TO DO?
Let the user know that stuff is working correctly during the wait for export.
STEPS TO REPRODUCE AN ISSUE (OR TRIGGER A NEW FEATURE)
- Open the large_6kx6k.txt file
- Select PDF,A5,All & click export
- Note the wait time
CURRENT BEHAVIOR
The export button remains blue during the export process and after the export is finished, the window goes away.
EXPECTED BEHAVIOR
A progress window should show up with a cancel button that shows progress of the export.
DEVELOPERS ONLY SECTION
SUGGESTED CHANGE (Pseudocode optional)
The methods which draw the matrix and trees should update a countdown variable somehow and that should be depicted in the progress bar.
FILES AFFECTED (where the changes will be implemented) - developers only
unknown
LEVEL OF EFFORT - developers only
medium
COMMENTS
Comments (11)
-
repo owner -
reporter I already added a dialog that pretty much does that, however the issue is that our largest matrix we support (6kx6k) takes like over 30 seconds to finish exporting. During that time, the button just remains "depressed" and the user wouldn't really know if the app froze or was actually chugging away. That's why I figured a progress bar would be a good idea.
-
repo owner Implementing a real progress bar, as opposed to a 'fake' one with a timer or something, is actually not that straight-forward. Gotta take a look at SwingWorker with its methods publish() and , doInBackground(), done() etc... all of which have some weird intricacies regarding concurrency in Swing.
Very helpful: https://stackoverflow.com/questions/20260372/swingworker-progressbar
-
Hi Rob, I am looking forward to work on this. As Chris said, We need to implement a Swingworker class and a progress bar. That sounds perfect for me.
-
reporter Great. Yeah, even though this is a medium effort issue, it is rather independent code, so I'd say go for it. BTW, my handle if you wish to tag me is hepcat72.
-
reporter @smd_faizan, are you working on this one?
-
Hi Rob, I wrote the code. I'll send for review. I am not completely satisfied by the code which I wrote. Anyways, I'll send for review. I think the best way is to run the export in a different thread so that export won't hang and update errors on a status bar/jdialogbox
-
reporter Sure, don't worry about it.
-
reporter - changed status to resolved
Resolved in Faizaan's branch.
-
reporter - changed component to Import/export
-
reporter - removed milestone
Removing milestone: Import/export data (automated comment)
- Log in to comment
I also had the thought of a simple modal dialog popping up (easiest to use CustomDialog) which tells you if the export was a success and where it was saved. (green checkmark for example - there are checkmark pngs in the glyphicon package which we use for the button icons).