Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323472 - [RoR] StatusMeter uses unsupported RAP-API
Summary: [RoR] StatusMeter uses unsupported RAP-API
Status: NEW
Alias: None
Product: Riena
Classification: RT
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 302893
  Show dependency tree
 
Reported: 2010-08-24 05:35 EDT by Steffen Kriese CLA
Modified: 2010-08-25 02:35 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.