Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Decoration questions
Decoration questions [message #654722] Wed, 16 February 2011 19:43 Go to next message
Catalin Gerea is currently offline Catalin Gerea
Messages: 89
Registered: July 2009
Location: Bucharest, Romania
Member

Problem A - 2 questions:
I emulate a form: two Label + two Text + Submit/Cancel Button. (org.eclipse.swt.widgets.Label,org.eclipse.swt.widgets.Text, org.eclipse.swt.Button).

1. Is there a way to automatically trigger the decoration of the org.eclipse.swt.widgets.Text when the the focus is lost? Similar lets say to the one in ColumnViewerEditorActivationStrategy class? Or do I have to add a focus listener and trigger the decoration on focusLost?
2. How can I change the properties of the org.eclipse.swt.widgets.Text when the decoration is performed? I mean I want to add an small error icon as decoration AND make the border of the org.eclipse.swt.widgets.Text red to clearly show where the error is (image a situation where there are >=30 Text fields and 3 have errors and 3 have warnings -> not very easy to find sometimes).

Problem B - 2 questions:
I have a JFace Tree and I need to decorate the images shown in the tree entries. I tried the extension point approach and it didn't worked (most likely I did not understood correctly the examples from this article)

1. Do I have to use a Lightweight decorator or a regular one?
2. How do I map the decorator to my model behind the tree?

If somebody needs additional details regarding the problems I want to solve just let me know.

Sorry if I posted in the wrong forum. If this is the case then let me know and I will use the correct one.


Time is what you make of it.
Re: Decoration questions [message #654990 is a reply to message #654722] Thu, 17 February 2011 21:46 Go to previous message
Catalin Gerea is currently offline Catalin Gerea
Messages: 89
Registered: July 2009
Location: Bucharest, Romania
Member

For problem A -> Question 2 the answer is using a paint listener as described here or here.

Time is what you make of it.
Previous Topic:Migrating from 3.3 to 3.6
Next Topic:MultiPageEditorPart
Goto Forum:
  


Current Time: Mon Oct 20 18:15:37 GMT 2014

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

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