This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 37284 - New tab control does not fill available space properly
Summary: New tab control does not fill available space properly
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC Linux
: P4 blocker (vote)
Assignee: _ tboudreau
URL:
Keywords: UI
Depends on:
Blocks:
 
Reported: 2003-11-18 08:59 UTC by Jesse Glick
Modified: 2008-12-22 20:36 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
First stage - OK (3.52 KB, image/png)
2003-11-18 09:00 UTC, Jesse Glick
Details
Second stage - BAD (2.93 KB, image/png)
2003-11-18 09:00 UTC, Jesse Glick
Details
Third stage - OK (3.65 KB, image/png)
2003-11-18 09:01 UTC, Jesse Glick
Details
Fourth stage - BAD (16.39 KB, image/png)
2003-11-18 09:01 UTC, Jesse Glick
Details
Fifth stage - BAD (2.97 KB, image/png)
2003-11-18 09:01 UTC, Jesse Glick
Details
Screenshot when a file is modified; note that the right side of the window tab area is wasted even though there are plenty of tabs to show on the left (3.24 KB, image/png)
2004-01-26 23:52 UTC, Jesse Glick
Details
Screenshot after reverting the modification; note that the last tab is cut off unnaturally (3.52 KB, image/png)
2004-01-26 23:53 UTC, Jesse Glick
Details
Another example - had several files open, last one selected, then Shift-ESC; note selected tab is not fully displayed (3.77 KB, image/png)
2004-02-25 05:28 UTC, Jesse Glick
Details
Same after Alt-Left and Alt-Right; note that although now the selected tab is fully visible, the leftmost tab (the only one not fully visible) is cut off unnecessarily far to the right (3.63 KB, image/png)
2004-02-25 05:33 UTC, Jesse Glick
Details
Same after Alt-Right; now mostly OK (showing leftmost tab) though the rightmost tab is cut off abruptly (no "..." displayed) which may not be intentional (3.59 KB, image/png)
2004-02-25 05:35 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2003-11-18 08:59:57 UTC
In tabs-1.png I have a bunch of editor tabs open -
more than will fit on screen at once - and I am on
the rightmost one. Fine.

I press Shift-ESCAPE and get to tabs-2.png. Note
that there is plenty of extra horizontal space
available now, but the tabbed control does not use
it. Annoying.

I press Alt-RIGHT then Alt-LEFT and now have
tabs-3.png, which is what I wanted to have after
just pressing Shift-ESCAPE but didn't get.

Now I press Shift-ESCAPE again to unmaximize. I
get tabs-4.png which is definitely bad. Note that
TestUtil is the selected tab, yet it is not shown
on screen in the tab row at all!

So I try to show it again using Alt-RIGHT
Alt-LEFT. Now I get tabs-5.png, which is OK but
again is not showing as many tabs as will fit.

If I now press Alt-LEFT Alt-LEFT Alt-RIGHT
Alt-RIGHT I can get back to tabs-1.png, which is
what I wanted to have displayed after I unmaximized.

Please fix the tab control to ensure at all times
that:

1. The selected tab is always visible after
maximizing or unmaximizing, or otherwise changing
the window size, if it was visible before.

2. If the last tab in the row is completely
visible (not cut off) then as many tabs to the
left of it are being displayed as possible.
Comment 1 Jesse Glick 2003-11-18 09:00:22 UTC
Created attachment 12181 [details]
First stage - OK
Comment 2 Jesse Glick 2003-11-18 09:00:50 UTC
Created attachment 12182 [details]
Second stage - BAD
Comment 3 Jesse Glick 2003-11-18 09:01:06 UTC
Created attachment 12183 [details]
Third stage - OK
Comment 4 Jesse Glick 2003-11-18 09:01:21 UTC
Created attachment 12184 [details]
Fourth stage - BAD
Comment 5 Jesse Glick 2003-11-18 09:01:36 UTC
Created attachment 12185 [details]
Fifth stage - BAD
Comment 6 Jesse Glick 2003-11-18 09:05:59 UTC
Sorry, forgot: in dev 031116.
Comment 7 Jesse Glick 2003-11-18 14:56:02 UTC
Yet another aspect of the problem: if in e.g. tabs-1.png you press
Ctrl-F4 twice, closing "FileOwnerQueryTest" and "TestUtil" but leaving
"ProjectManagerTest" open and selected, you would expect
"ProjectManagerTest" to be on the right, showing perhaps
"AntBasedProjectType" and "ProjectManager" to the left of it. Instead
it shows only "ProjectManagerTest" on the left, with a left scroll
button behind it, and nothing to the right of it.
Comment 8 _ tboudreau 2003-11-18 15:18:11 UTC
Well, 1. is easy - we listen for component events on the container and call 
makeVisible(getSelectionModel().getSelectedIndex()) on a resize event. 
 
2. Is a little harder, but probably not too hard - as I recall, the only check is 
that at least the last tab remains on the screen (offset may not be greater 
than the number of tabs).  It's a little more work to calculate the available 
space at each offset change and ensure that if the last tab is visible, a 
maximal number of tabs are to the left of it. 
 
The hard part is maintaining this state on arbitrary add/removes. 
Comment 9 David Simonek 2003-11-19 12:17:05 UTC
Tim: arbitraty add/remove? What's that? Opening of source editor from
explorer or something different? If something different and non usual,
we can happily ignore it IMO.
Comment 10 _ tboudreau 2003-11-19 16:10:32 UTC
Basically, we could do a little more to ensure the selected tab is always 
visible after changes in the UI.  I'm not sure what you're asking re arbitrary 
add/remove. 
Comment 11 _ tboudreau 2003-12-30 17:37:02 UTC
Should be fixed - any resize event will ensure that
 - the selected tab is made visible
 - the maximum possible number of tabs are displayed (no more big right 
margin)
Comment 12 _ tboudreau 2003-12-30 17:37:50 UTC
x
Comment 13 Jesse Glick 2004-01-26 23:48:49 UTC
Hmm, I don't think this is fixed - at least not in sources I am
playing with right now (Jan 23). It seems sometimes I will have a
source file on the rightmost tab which is modified (so " *" displayed
in tab), and it is displayed right in the middle of the screen (so not
fixed). Then if I Ctrl-S or Ctrl-Z to unmodify it, suddenly it jumps
to the end of the row, but too far, so it is actually truncated a bit.
Comment 14 Jesse Glick 2004-01-26 23:52:46 UTC
Created attachment 13079 [details]
Screenshot when a file is modified; note that the right side of the window tab area is wasted even though there are plenty of tabs to show on the left
Comment 15 Jesse Glick 2004-01-26 23:53:20 UTC
Created attachment 13080 [details]
Screenshot after reverting the modification; note that the last tab is cut off unnaturally
Comment 16 _ tboudreau 2004-01-27 13:39:40 UTC
Ah, this changed with the fix for another issue (user doesn't know
what file he's modifying if the tab is offscreen) - now it will ensure
the tab is visible if the title changes.  Should be simple to fix, if
the title changes and the tab is already visible, no change should happen.
Comment 17 Jesse Glick 2004-02-25 05:28:15 UTC
Created attachment 13625 [details]
Another example - had several files open, last one selected, then Shift-ESC; note selected tab is not fully displayed
Comment 18 Jesse Glick 2004-02-25 05:33:42 UTC
Created attachment 13626 [details]
Same after Alt-Left and Alt-Right; note that although now the selected tab is fully visible, the leftmost tab (the only one not fully visible) is cut off unnecessarily far to the right
Comment 19 Jesse Glick 2004-02-25 05:35:14 UTC
Created attachment 13627 [details]
Same after Alt-Right; now mostly OK (showing leftmost tab) though the rightmost tab is cut off abruptly (no "..." displayed) which may not be intentional
Comment 20 _ tboudreau 2004-03-01 00:50:30 UTC
Okay, I don't know if it's perfect (if that's possible), but I suspect
it's better enough that I can close this issue.
Comment 21 Marian Mirilovic 2004-03-18 09:59:16 UTC
verified in NB 3.6 RC1