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

Bug 234417

Summary: FigureCanvas always mixes in styles which aren't necessarily needed
Product: [Tools] GEF Reporter: Randy Hudson <hudsonr>
Component: GEF-Legacy Draw2dAssignee: Randy Hudson <hudsonr>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: ahunter.eclipse
Version: 3.3   
Target Milestone: 3.4.0 (Ganymede) RC3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch to FigureCanvas and new draw2d example none

Description Randy Hudson CLA 2008-05-28 12:32:44 EDT
All of the existing constructors for FigureCanvas mix in a default set of styles, some of which are not required for its operation. Specifically, the NO_BACKGROUND style is problematic because it means that inheriting your parent composite's background is impossible.

I've created two new constructors which use the style bits as-is, enforcing the bits that are currently required for proper use of the class. These constructors should provide stable behavior over time even as new style bits become support by FigureCanvas.
Comment 1 Randy Hudson CLA 2008-05-28 12:36:48 EDT
Created attachment 102429 [details]
Patch to FigureCanvas and new draw2d example
Comment 2 Anthony Hunter CLA 2008-05-28 12:50:28 EDT
Looks good.
Comment 3 Randy Hudson CLA 2008-05-28 12:57:48 EDT
delivered to HEAD.