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

Bug 186862

Summary: Make ToolbarLayout extensible
Product: [Tools] GEF Reporter: Pratik Shah <ppshah>
Component: GEF-Legacy Draw2dAssignee: Pratik Shah <ppshah>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: hudsonr, nyssen
Version: 3.2   
Target Milestone: 3.3.0 (Europa) RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Added getChildPreferredSize() and getChildMinimumSize()
none
Patch for ToolbarLayout none

Description Pratik Shah CLA 2007-05-14 14:57:40 EDT
ToolbarLayout directly invokes getPreferredSize() and getMinimumSize() on children.  It should instead have protected methods for those so that this functionality can be easily customized.
Comment 1 Pratik Shah CLA 2007-05-14 15:00:25 EDT
Created attachment 67119 [details]
Added getChildPreferredSize() and getChildMinimumSize()

This is essentially 3.2.2 version of ToolbarLayout with two new protected methods getChildPreferredSize() and getChildMinimumSize() added.  calculatePreferredSize() and layout() use those methods now.  The default implementation provided could be changed to simply invoke child.getPreferredSize() and child.getMinimumSize().
Comment 2 Pratik Shah CLA 2007-05-15 15:00:23 EDT
Created attachment 67301 [details]
Patch for ToolbarLayout

Here's a patch for ToolbarLayout which would allow easier extension of the functionality (as in the previous attachment).
Comment 3 Pratik Shah CLA 2007-05-18 16:55:13 EDT
Fixed.