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: 56
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:add listener to next button wizard page
Next Topic:Horizontal scroll bar disappears for TreeViewer
Goto Forum:
  


Current Time: Sun Sep 25 16:02:33 GMT 2016

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

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