Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » TreeViewer - setGrayed method(Rap 1.3 TreeViewer setGrayed method )
TreeViewer - setGrayed method [message #501176] Tue, 01 December 2009 12:38 Go to next message
Andrew  is currently offline Andrew Friend
Messages: 43
Registered: December 2009
Member
Hi All,
Method TreeItem#setGrayed() doesn't correct work in rap 1.3. Item doesn't change it background color to gray. In rap 1.2 all was ok.
Re: TreeViewer - setGrayed method [message #501407 is a reply to message #501176] Wed, 02 December 2009 08:52 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Andrew,

the TreeItem#setGrayed() is not intended to change the item background color to gray. According to JavaDoc:
"Sets the grayed state of the checkbox for this item. This state change only applies if the Tree was created with the SWT.CHECK style."
It's working as expected in 1.3 and there is no change in comparison to 1.2.

Best,
Ivan
Re: TreeViewer - setGrayed method [message #501449 is a reply to message #501407] Wed, 02 December 2009 12:03 Go to previous messageGo to next message
Andrew  is currently offline Andrew Friend
Messages: 43
Registered: December 2009
Member
Sorry, i made a mistake. TableItem doesn't change it background color if table was created with SWT.CHECK style.
You can see different behavior of it in demo of rap 1.2 release and rap 1.3 M3 on TableTab by pressing "Change grayed for selection" button.
Re: TreeViewer - setGrayed method [message #501454 is a reply to message #501449] Wed, 02 December 2009 12:32 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Andrew,
the correct behavior of Table/TreeItem#setGrayed( boolean ) is the one in 1.3. The grayed state of the checkbox is applied only for checked checkboxes. For unchecked checkboxes there is no visual difference. This is the same in SWT too.
Best,
Ivan
Re: TreeViewer - setGrayed method [message #501623 is a reply to message #501454] Thu, 03 December 2009 07:58 Go to previous messageGo to next message
Andrew  is currently offline Andrew Friend
Messages: 43
Registered: December 2009
Member
Ok, thx. Is it possible to change bg color of tableItem for unchecked checkboxes without patching src ? (I'd like to have tableItem's with SWT.CHECK style which has not white bg color in unchecked state).
Re: TreeViewer - setGrayed method [message #501630 is a reply to message #501623] Thu, 03 December 2009 08:14 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Andrew,
you need to create a custom theme (see [1] and [2]) and specify the grayed image for Table-Checkbox like:
Table-Checkbox:grayed {
background-image: url( ... );
}
Table-Checkbox:checked:grayed {
background-image: url( ... );
}

[1] http://help.eclipse.org/galileo/topic/org.eclipse.rap.help/h elp/html/advanced/theming.html
[2] http://help.eclipse.org/galileo/topic/org.eclipse.rap.help/h elp/html/advanced/branding.html

HTH,
Ivan
Previous Topic:Helios M3 with RAP - RAP launch configuration not working
Next Topic:NoClassDefFoundError with RAP 1.3
Goto Forum:
  


Current Time: Fri Apr 19 13:17:21 GMT 2024

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

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

Back to the top