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

Bug 345109

Summary: [JAXB] Resources tab displays scroll bar even if all controls are in view
Product: [Tools] PTP Reporter: Greg Watson <g.watson>
Component: RMAssignee: Albert L. Rossi <arossi>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 5.0   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Greg Watson CLA 2011-05-09 05:21:58 EDT
The JAXB resources tab always displays a scroll bar. If all controls are currently in the view, the scroll bars should not be shown.
Comment 1 Albert L. Rossi CLA 2011-05-09 15:25:13 EDT
This is a little more subtle than stated here.

If you have a single controller (top level tab), this never happens.  It only happens when there are two or more tabs, and one of the invisible ones has a paint area larger than the LaunchTab size.  Then even if the current visible tab contains all its widgets inside that sized area, it still displays a scroll.

I will try to do something about this, though I am uncertain about what.  I hate the way this scrolling is set up to begin with.  I think that scrolling should be an option of the implemented tab and not provided by the parent ResourcesTab.
Comment 2 Albert L. Rossi CLA 2011-05-09 18:00:52 EDT
Added a SelectionListener to the top level TabFolder holding the tab items.  The event triggers a resize of the scrolled parent.

There is still a small issue with the parent scrolled area not resizing properly (to cover the entire height of the child).

Working on that ...
Comment 3 Albert L. Rossi CLA 2011-05-09 21:03:53 EDT
Seems adding a small margin to the computed control size does the trick.
Comment 4 Greg Watson CLA 2011-05-10 08:09:50 EDT
(In reply to comment #1)
> 
> I will try to do something about this, though I am uncertain about what.  I
> hate the way this scrolling is set up to begin with.  I think that scrolling
> should be an option of the implemented tab and not provided by the parent
> ResourcesTab.

We could look at this after the 5.0 release if you think it worthwhile.