Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323472

Summary: [RoR] StatusMeter uses unsupported RAP-API
Product: [RT] Riena Reporter: Steffen Kriese <steffen.kriese>
Component: UIAssignee: Project Inbox <riena.ui-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: elias
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 302893    

Description Steffen Kriese CLA 2010-08-24 05:35:32 EDT
At the moment the StatusMeterRidget doesn't work with RoR, because it on the fly draws an image using the graphics context, which isn't supported by RAP. I tried different approaches to get around these limitations, but could't find a way without breaking our API and make the StatusMeter work as a ridget and as an image for the TableColumnFormatter. 

To make the ridget work we need the following API-changes in RAP:

- Image has to implement Drawable
- Image needs the constructor (Device device, int width. int height) 
- The gc has to be extended to provide drawing capabilities for images instead of just canvas.


Additional changes to Riena:
- StatusMeterWidget should inherit from canvas instead of composite, so we can use a PaintListener
Comment 1 Steffen Kriese CLA 2010-08-24 07:51:22 EDT
The ridget still doesn't work on RAP, but at least it compiles. Therefore I added 2 new methods to the SWTFacade. At the moment the StatusWidget is displayed as a black bar when running on RAP.
Comment 2 Elias Volanakis CLA 2010-08-24 14:59:12 EDT
Is it possible to implement the StatusMeter as a Canvas and draw on it (instead of using images) ?

Drawing on images is most likely not going to be available in RAP.
Comment 3 Steffen Kriese CLA 2010-08-25 02:35:54 EDT
The StatusMeterBuilder creates an image so it can be used as a Widget by drawing the image on it and also as a ColumnFormatter. Have a look at an example in the SWT ExampleClient TableSubModuleController.

At the moment I can't think of a different solution to cover both requirements. Maybe if we would support TableCellEditors, we could just draw on a Canvas and then use that in an TableColumn as well.