Java Doc for IProgressService.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » progress » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » ui workbench » org.eclipse.ui.progress 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.eclipse.ui.progress.IProgressService

All known Subclasses:   org.eclipse.ui.internal.progress.ProgressManager,
IProgressService
public interface IProgressService extends IRunnableContext(Code)
The progress service is the primary interface to the workbench progress support. It can be obtained from the workbench and then used to show progress for both background operations and operations that run in the UI thread.

All methods on the progress service must be called from the UI thread.

This interface is not intended to be implemented by clients.


See Also:   org.eclipse.ui.IWorkbench.getProgressService
See Also:   
since:
   3.0




Method Summary
public  voidbusyCursorWhile(IRunnableWithProgress runnable)
     Set the cursor to busy and run the runnable in a non-UI Thread.
public  ImagegetIconFor(Job job)
     Get the icon that has been registered for a Job by checking if the job belongs to any of the registered families.
public  intgetLongOperationTime()
     The time at which an operation becomes considered a long operation.
public  voidregisterIconForFamily(ImageDescriptor icon, Object family)
     Register the ImageDescriptor to be the icon used for all jobs that belong to family within the workbench.
public  voidrun(boolean fork, boolean cancelable, IRunnableWithProgress runnable)
     This specialization of IRunnableContext#run(boolean, boolean, IRunnableWithProgress) might run the runnable asynchronously if fork is true.
public  voidrunInUI(IRunnableContext context, IRunnableWithProgress runnable, ISchedulingRule rule)
     Runs the given operation in the UI thread using the given runnable context.
public  voidshowInDialog(Shell shell, Job job)
     Open a dialog on job when it starts to run and close it when the job is finished.



Method Detail
busyCursorWhile
public void busyCursorWhile(IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException(Code)
Set the cursor to busy and run the runnable in a non-UI Thread. The calling thread will be blocked for the duration of the execution of the supplied runnable. After the cursor has been running for getLongOperationTime() replace it with a ProgressMonitorDialog so that the user may cancel. Do not open the ProgressMonitorDialog if there is already a modal dialog open.
Parameters:
  runnable - The runnable to execute and show the progress for.
See Also:   IProgressService.getLongOperationTime
throws:
  InvocationTargetException -
throws:
  InterruptedException -



getIconFor
public Image getIconFor(Job job)(Code)
Get the icon that has been registered for a Job by checking if the job belongs to any of the registered families.
Parameters:
  job - Icon or null if there isn't one.
See Also:   IProgressService.registerIconForFamily(ImageDescriptorObject)



getLongOperationTime
public int getLongOperationTime()(Code)
The time at which an operation becomes considered a long operation. Used to determine when the busy cursor will be replaced with a progress monitor. int
See Also:   IProgressService.busyCursorWhile(IRunnableWithProgress)



registerIconForFamily
public void registerIconForFamily(ImageDescriptor icon, Object family)(Code)
Register the ImageDescriptor to be the icon used for all jobs that belong to family within the workbench.
Parameters:
  icon - ImageDescriptor that will be used when the job is being displayed
Parameters:
  family - The family to associate with
See Also:   Job.belongsTo(Object)



run
public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException(Code)
This specialization of IRunnableContext#run(boolean, boolean, IRunnableWithProgress) might run the runnable asynchronously if fork is true.
since:
   3.2



runInUI
public void runInUI(IRunnableContext context, IRunnableWithProgress runnable, ISchedulingRule rule) throws InvocationTargetException, InterruptedException(Code)
Runs the given operation in the UI thread using the given runnable context. The given scheduling rule, if any, will be acquired for the duration of the operation. If the rule is not available when this method is called, a progress dialog will be displayed that gives users control over the background processes that may be blocking the runnable from proceeding.

This method can act as a wrapper for uses of IRunnableContext where the fork parameter was false.

Note: Running long operations in the UI thread is generally not recommended. This can result in the UI becoming unresponsive for the duration of the operation. Where possible, busyCursorWhile should be used instead.

Modal dialogs should also be avoided in the runnable as there will already be a modal progress dialog open when this operation runs.


See Also:   org.eclipse.jface.dialogs.Dialog
See Also:   org.eclipse.swt.SWT.APPLICATION_MODAL
Parameters:
  context - The runnable context to run the operation in
Parameters:
  runnable - The operation to run
Parameters:
  rule - A scheduling rule, or null
throws:
  InvocationTargetException - wraps any exception or error which occurs while running the runnable
throws:
  InterruptedException - propagated by the context if the runnable acknowledges cancelation by throwing this exception.



showInDialog
public void showInDialog(Shell shell, Job job)(Code)
Open a dialog on job when it starts to run and close it when the job is finished. Wait for ProgressManagerUtil#SHORT_OPERATION_TIME before opening the dialog. Do not open if it is already done or if the user has set a preference to always run in the background. Parent the dialog from the shell.
Parameters:
  shell - The Shell to parent the dialog from or null if the active shell is to be used.
Parameters:
  job - The Job that will be reported in the dialog. jobmust not be null.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.