Java Doc for WorkbenchImages.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » internal » 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.internal 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.ui.internal.WorkbenchImages

WorkbenchImages
public class WorkbenchImages (Code)
This class provides convenience access to many of the resources required by the workbench. The class stores some images as descriptors, and some are stored as real Images in the registry. This is a pure speed-space tradeoff. The trick for users of this class is that images obtained from the registry (using getImage()), don't require disposal since they are shared, while images obtained using getImageDescriptor() will require disposal. Consult the declareImages method to see if a given image is declared as a registry image or just as a descriptor. If you change an image from being stored as a descriptor to a registry image, or vice-versa, make sure to check all users of the image to ensure they are calling the correct getImage... method and handling disposal correctly. Images: - use getImage(key) to access cached images from the registry. - Less common images are found by calling getImageDescriptor(key) where key can be found in IWorkbenchGraphicConstants This class initializes the image registry by declaring all of the required graphics. This involves creating image descriptors describing how to create/find the image should it be needed. The image is not actually allocated until requested. Some Images are also made available to other plugins by being placed in the descriptor table of the SharedImages class. Where are the images? The images (typically gifs) are found the plugins install directory How to add a new image Place the gif file into the appropriate directories. Add a constant to IWorkbenchGraphicConstants following the conventions Add the declaration to this file


Field Summary
final public static  StringICONS_PATH
    


Method Summary
public static  voiddeclareImage(String symbolicName, ImageDescriptor descriptor, boolean shared)
     Declares a workbench image.
public static  voiddispose()
     Disposes and clears the workbench images.
public static  ImagegetImage(String symbolicName)
     Returns the image stored in the workbench plugin's image registry under the given symbolic name.
public static  ImageDescriptorgetImageDescriptor(String symbolicName)
     Returns the image descriptor stored under the given symbolic name.
public static  ImageDescriptorgetImageDescriptorFromProgram(String filename, int offset)
     Convenience Method. Returns an ImageDescriptor obtained from an external program. If there isn't any image then null is returned. This method is convenience and only intended for use by the workbench because it explicitly uses the workbench's registry for caching/retrieving images from other extensions -- other plugins must user their own registry.
public static  ImageRegistrygetImageRegistry()
     Returns the ImageRegistry.
public static  ImageDescriptorgetWorkbenchImageDescriptor(String relativePath)
     Get the workbench image with the given path relative to ICON_PATH.

Field Detail
ICONS_PATH
final public static String ICONS_PATH(Code)





Method Detail
declareImage
public static void declareImage(String symbolicName, ImageDescriptor descriptor, boolean shared)(Code)
Declares a workbench image.

The workbench remembers the given image descriptor under the given name, and makes the image available to plug-ins via org.eclipse.ui.ISharedImages IWorkbench.getSharedImages() . For "shared" images, the workbench remembers the image descriptor and will manages the image object create from it; clients retrieve "shared" images via org.eclipse.ui.ISharedImages.getImage ISharedImages.getImage() . For the other, "non-shared" images, the workbench remembers only the image descriptor; clients retrieve the image descriptor via org.eclipse.ui.ISharedImages.getImageDescriptorISharedImages.getImageDescriptor() and are entirely responsible for managing the image objects they create from it. (This is made confusing by the historical fact that the API interface is called "ISharedImages".)


Parameters:
  symbolicName - the symbolic name of the image
Parameters:
  descriptor - the image descriptor
Parameters:
  shared - true if this is a shared image, andfalse if this is not a shared image
See Also:   org.eclipse.ui.ISharedImages.getImage
See Also:   org.eclipse.ui.ISharedImages.getImageDescriptor



dispose
public static void dispose()(Code)
Disposes and clears the workbench images. Called when the workbench is shutting down.
since:
   3.1



getImage
public static Image getImage(String symbolicName)(Code)
Returns the image stored in the workbench plugin's image registry under the given symbolic name. If there isn't any value associated with the name then null is returned. The returned Image is managed by the workbench plugin's image registry. Callers of this method must not dispose the returned image. This method is essentially a convenient short form of WorkbenchImages.getImageRegistry.get(symbolicName).



getImageDescriptor
public static ImageDescriptor getImageDescriptor(String symbolicName)(Code)
Returns the image descriptor stored under the given symbolic name. If there isn't any value associated with the name then null is returned. The class also "caches" commonly used images in the image registry. If you are looking for one of these common images it is recommended you use the getImage() method instead.



getImageDescriptorFromProgram
public static ImageDescriptor getImageDescriptorFromProgram(String filename, int offset)(Code)
Convenience Method. Returns an ImageDescriptor obtained from an external program. If there isn't any image then null is returned. This method is convenience and only intended for use by the workbench because it explicitly uses the workbench's registry for caching/retrieving images from other extensions -- other plugins must user their own registry. This convenience method is subject to removal. Note: This consults the plugin for extension and obtains its installation location. all requested images are assumed to be in a directory below and relative to that plugins installation directory.



getImageRegistry
public static ImageRegistry getImageRegistry()(Code)
Returns the ImageRegistry.



getWorkbenchImageDescriptor
public static ImageDescriptor getWorkbenchImageDescriptor(String relativePath)(Code)
Get the workbench image with the given path relative to ICON_PATH.
Parameters:
  relativePath - ImageDescriptor



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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