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

Bug 145299

Summary: AbstractLayout.getPreferredSize should call calcalculatePreferredSize with fixed hints
Product: [Tools] GEF Reporter: Yury Semikhatsky <sys2002>
Component: GEF-Legacy GEF (MVC)Assignee: gef-inbox <gef-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Yury Semikhatsky CLA 2006-06-05 04:47:28 EDT
AbstractLayout.getPreferredSize(IFigure container, int wHint, int hHint) calls calculatePreferredSize with hints passed as parameters. The first evaluated value is cached. Next time method is called the cached value will be returned regardless of passed hints. It seems better to call calculatePreferredSize with fixed hints -1, -1 or not to cache calculated size.
Comment 1 Randy Hudson CLA 2006-06-05 08:51:02 EDT
If the calculation depends on the hints, you should subclass AbstractHintLayout.