ProgressBar [message #462782] |
Thu, 01 February 2007 00:29  |
Eclipse User |
|
|
|
Hi all,
In our Application, the entry point is the login dialog and when the user
enters the username & password...and on the click of the OK button...two
actions are done.
1)validations are done to authenticate the user
2)we r connecting to a remote server to fetch data...
we are planning to show a progress bar in the login dialog which will
progress until the above two steps are done...How to proceed with this?
(Threading or Progress Monitor or Job)
Thanks & regards
Aravind
|
|
|
|
Re: ProgressBar [message #462854 is a reply to message #462812] |
Thu, 01 February 2007 07:47  |
Eclipse User |
|
|
|
Originally posted by: georg.moleque.com.br
Hi Aravind,
the example of the book "Eclipse Rich Client Platform - Designing,
Coding, and Packaging Java Applications" (by Lemieux, McAffer) shows
exately how zyou could do it, I adapted it for my own application. It
uses ProgressMonitorDialog, and in Application they call something like
this to connect:
<...snippet...>
ProgressMonitorDialog progress = new ProgressMonitorDialog(null);
progress.setCancelable(true);
try {
progress.run(true, true, new IRunnableWithProgress()
{ public void run(IProgressMonitor monitor) throws
InvocationTargetException {
try {
session.connectAndLogin(monitor);
} catch (Exception e) {
....
}
<...>
The actual autentifcation / connecting to the server is then
done in
session.connectAndLogin(monitor);
until it suceeds.
Hope that helps,
Georg
Peter Osipov escreveu:
> Hi Aravind!
> Well, it depends. In my opinion if by the time the dialog is shown the
> workbench is ready, then you might consider going for a job, otherwise,
> you should go for org.eclipse.jface.dialogs.ProgressMonitorDialog.
> Probably in both cases org.eclipse.jface.dialogs.ProgressMonitorDialog
> will be more suitable.
> Aravind wrote:
>> Hi all,
>> In our Application, the entry point is the login dialog and when the
>> user enters the username & password...and on the click of the OK
>> button...two actions are done.
>> 1)validations are done to authenticate the user
>> 2)we r connecting to a remote server to fetch data...
>>
>> we are planning to show a progress bar in the login dialog which will
>> progress until the above two steps are done...How to proceed with this?
>> (Threading or Progress Monitor or Job)
>>
>> Thanks & regards
>> Aravind
>>
|
|
|
Powered by
FUDForum. Page generated in 0.03330 seconds