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 19910 - Infoline can hide the menus if netbeans.windows.small_main_window=true
Summary: Infoline can hide the menus if netbeans.windows.small_main_window=true
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC All
: P4 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
: 12926 15372 (view as bug list)
Depends on:
Blocks: 15372
  Show dependency tree
 
Reported: 2002-01-29 16:54 UTC by Jiri Rechtacek
Modified: 2008-12-23 09:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test class (753 bytes, text/x-java)
2002-03-07 15:12 UTC, Jesse Glick
Details
Proposed patch (942 bytes, patch)
2002-03-07 15:16 UTC, Jesse Glick
Details | Diff
a example (4.86 KB, image/jpeg)
2002-03-07 16:01 UTC, Jiri Rechtacek
Details
Proposed patch (revised) (973 bytes, patch)
2002-03-20 18:11 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Rechtacek 2002-01-29 16:54:41 UTC
I start IDE with netbeans.windows.small_main_window=true
Infoline of main window can hide the menus if a text is longer than free space
in main window's status line. It makes the menus unusable.
Comment 1 Jiri Rechtacek 2002-01-30 14:56:16 UTC
*** Issue 15372 has been marked as a duplicate of this issue. ***
Comment 2 Jesse Glick 2002-03-07 15:11:46 UTC
*** Issue 12926 has been marked as a duplicate of this issue. ***
Comment 3 Jesse Glick 2002-03-07 15:12:40 UTC
Created attachment 4988 [details]
Test class
Comment 4 Jesse Glick 2002-03-07 15:15:35 UTC
I can reproduce it by trying to compile the attached class with Jikes.
Just run with -J-Dnetbeans.windows.small_main_window=true on a fresh
user dir; MDI mode 1024x768; mount new empty dir; place this file in
package root; set Java default compiler to Jikes; press F9; press F12
until you get to one of the longer error messages, and the menu names
get squeezed out.

I have a simple patch which seems to work fine, will attach for review.
Comment 5 Jesse Glick 2002-03-07 15:16:22 UTC
Created attachment 4989 [details]
Proposed patch
Comment 6 Jesse Glick 2002-03-07 15:21:36 UTC
Impl notes:

- (StatusLine extends) JLabel sets min & max size to same as preferred.

- Default layout manager for menu bar is BoxLayout (trivial subclass).

- BoxLayout does not provide a way to control relative allotments of
space.

- GridBagLayout should, I thought, but for some reason it does not
seem to work. I tried everything I could think of with GBL, but so
long as the preferredSize of the label is big, the GBL will squeeze
the JMenu's.

- So, ensuring the preferredSize just doesn't get too big. It seems to
work.

- Alternate more complex impl would be to define custom layout manager
which provides requested preferredSize for all but last component -
the JMenu's - and remainder of available space for last - StatusLine.
Comment 7 Jiri Rechtacek 2002-03-07 15:56:56 UTC
Hi Jesse,
the patch can't fix this problem I think. See
core/windows/MainWindow.StatusMenuBar. The status line with
small_main_window is made as next menu bar (w/o mnemonic). If there is
a lack od f space whole menu is squeezed, The menu bar for status line
gains because w/o mnemonic. (See snapshot).
Comment 8 Jiri Rechtacek 2002-03-07 16:01:51 UTC
Created attachment 4990 [details]
a example
Comment 9 Jiri Rechtacek 2002-03-07 16:29:42 UTC
On the other hand the patch can help for most usage. On my view it
fixes enough. Integrate patch, thanks.
Comment 10 Jesse Glick 2002-03-07 17:45:27 UTC
I guess this only happens if you make the main window narrower than
about 300 pixels? Should I make the max preferred size smaller still,
say 100 pixels?
Comment 11 Jiri Rechtacek 2002-03-07 18:05:46 UTC
ok, 100 will be nice.
Comment 12 Jesse Glick 2002-03-20 18:11:54 UTC
Created attachment 5124 [details]
Proposed patch (revised)
Comment 13 Jesse Glick 2002-03-20 18:13:07 UTC
Do you think you could commit the attached patch? I am having CVS 
problems at the moment. Thanks if so.
Comment 14 Jiri Rechtacek 2002-03-21 10:21:40 UTC
a patch (the last attachment) was applied
Comment 15 Marian Mirilovic 2002-05-29 15:16:44 UTC
verified in [nb_dev](20020529)
Comment 16 Quality Engineering 2003-07-01 16:21:35 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.