Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Missing SWT Image Constants
Missing SWT Image Constants [message #988899] Mon, 03 December 2012 15:48 Go to next message
Franz-Stefan Mising name is currently offline Franz-Stefan Mising nameFriend
Messages: 12
Registered: December 2010
Junior Member
Hi,

I am trying to create a grayed (or disabled) version of an SWT image as described in [1] under "Image Effects":
Image grayImage = new Image(display,image,SWT.IMAGE_GRAY);

However, neither the SWT.IMAGE_GRAY nor the SWT.IMAGE_DISABLE constants seem to be available in RAP 1.5.
Any suggestions on how to achieve this in RAP?

I know it is possible somehow because disabling a button that has an associated image does gray out/disable that image.

Thanks,
Franz-Stefan

[1] http://www.eclipse.org/articles/Article-SWT-images/graphics-resources.html
(I use the SWT class from org.eclipse.rap.rwt-1.5.1.20120917-1116.jar).
Re: Missing SWT Image Constants [message #989222 is a reply to message #988899] Wed, 05 December 2012 09:41 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Franz-Stefan,

There is an open feature request for this: [1]. However, it's not a
straight forward implementation, because SWT uses native libraries to
transform images, which we can't do in RAP. I guess the simplest
solution is to create and register grayed images on your own.
Alternatively, you can use some third-party library to process images at
runtime.

Disabling a button does not change the actual image in RAP.

Regards, Ralf


[1] 317439: Support for IMAGE_GRAY and IMAGE_DISABLE
https://bugs.eclipse.org/bugs/show_bug.cgi?id=317439

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:Theme lost after refresh
Next Topic:TableColumn and Table Fonts
Goto Forum:
  


Current Time: Mon May 13 18:21:06 GMT 2024

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

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

Back to the top