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

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.


(I use the SWT class from org.eclipse.rap.rwt-
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

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

Regards, Ralf

[1] 317439: Support for IMAGE_GRAY and IMAGE_DISABLE

Ralf Sternberg

Twitter: @EclipseRAP

Professional services for RAP and RCP?
Previous Topic:Theme lost after refresh
Next Topic:TableColumn and Table Fonts
Goto Forum:

Current Time: Thu May 24 06:33:51 GMT 2018

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

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

Back to the top