@@ -247,4 +247,34 @@ Coming back to our initial problem, keeping in mind what we just learned, we nee
...
@@ -247,4 +247,34 @@ Coming back to our initial problem, keeping in mind what we just learned, we nee
```
```
During this view we store a color that we use to display the selection of text, this handler assures that this resource is not lost!
During this view we store a color that we use to display the selection of text, this handler assures that this resource is not lost!
## Displaying a mouse cursor in the correct shape as long as it is located over the editor
A futher cool feature is to display the text curosr of the mouse as long as the mouse hovers over the widget. And as soon as the mouse exits we should reset the cursor to the standard. For this purpose there is a ```MouseTrackListener``` that ships with SWT. This listener has three methods of which we utilize two for the purpose of changing the cursor once the mouse enters. The third method is omitted for clarity.