Overlaying Images in RAP [message #124525] |
Fri, 13 March 2009 11:09  |
Eclipse User |
|
|
|
Hello,
I want to realize Icon decorators.
I used the following Tutorial as base:
http://www.eclipse.org/articles/Article-Decorators/decorator s.html
I wrote a class, which implements the interface "ILabelDecorator".
In the implementation of the method "public Image decorateImage(Image
image, Object element)" I got the following situation:
- image is my baseImage.
- element contains my decorator icons. I can get it via setters.
I tried to implement a solution from the tutorial, which creates class,
which implements the interface "CompositeImageDescriptor". The class can
overlay Images.
The Problem:
------------
The getImageData() method makes problems in RAP. It works fine in RCP.
ImageData baseImageData = this.baseImage.getImageData();
The following error is displayed on my import:
Eclipse changes the import automatically from
"import org.eclipse.swt.graphics.ImageData;"
to
"import org.eclipse.swt.internal.graphics.ImageData;"
with the warning "Discouraged access: The type ImageData is not accessible
due to restriction on required library
/pathToLibs/org.eclipse/org.eclipse.rap.rwt.jar"
-> So I cannot use this implementation. Why is there restricted accecss?
-> Is there any other possibility in RAP to generate decorated icons
dynamically?
Thanks, Bastian
|
|
|
|
Powered by
FUDForum. Page generated in 0.03367 seconds