Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » How to display the percentage text in ProgressMonitorDialog
How to display the percentage text in ProgressMonitorDialog [message #1273517] Thu, 20 March 2014 05:35 Go to next message
Janusz Dalecki is currently offline Janusz DaleckiFriend
Messages: 63
Registered: January 2010
Location: Sydney
Member
Hi,
I am using org.eclipse.jface.dialogs.ProgressMonitorDialog in my Eclipse project. All is working fine, but I would like to display to the user not only progress indicator (green moving strip) but also the text displaying the percentage (e.g 10%).
Is it possible?
Regards,
Janusz
Re: How to display the percentage text in ProgressMonitorDialog [message #1720191 is a reply to message #1273517] Fri, 15 January 2016 07:02 Go to previous message
Duc Quoc is currently offline Duc QuocFriend
Messages: 4
Registered: January 2016
Junior Member
I believe the
monitor.subTask("50%")

will display the percentage below the green progress indicator.

To make it dynamic you will need to change the percentage via a variable
"currentPercentage"+"%"

which usually is

currentPercentage = Math.round(100.0*countedSize/totalSize);

=Duc
Previous Topic:Resizable non modal dialog
Next Topic:Combining different cell editors in one editing support
Goto Forum:
  


Current Time: Fri Apr 19 03:22:26 GMT 2024

Powered by FUDForum. Page generated in 0.01807 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top