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 33949 - I18N - The text in Java Navigation component does not fully appear if it's too long
Summary: I18N - The text in Java Navigation component does not fully appear if it's to...
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords: I18N
Depends on:
Blocks: 33246 45719
  Show dependency tree
 
Reported: 2003-05-27 22:45 UTC by Ken Frank
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
gif of the combo box (21.70 KB, image/gif)
2003-05-27 22:46 UTC, Ken Frank
Details
the patch attempting to work around combobox disability via puggable renderer (8.37 KB, patch)
2004-02-05 14:01 UTC, Jan Pokorsky
Details | Diff
NPEs thrown by swing code (5.13 KB, text/plain)
2004-02-05 14:05 UTC, Jan Pokorsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Frank 2003-05-27 22:45:00 UTC
Using pseudo localized product, with each message
or label
having additional multibyte text, and using
-fontsize 16
option, running in Chinese locale,
create a java file for example, and notice the
popdown menu at top left of editor (see image)
The message No Selection, of the popdown menu,
does not display fully. 

Chinese localization will use a larger font than
default
one now used so these issues will be more visible
to them,
but this can also be viewed as a general or a11y
issue
since may be visible to users in english locale
who use
larger fonts.

Assumption is that user should be able to see
all items in a given window when it appears and
should
not need to resize it to see those things.

That is, the UI area or window should dynamically
resize
itself to show the needed contents.
(this does not apply to contents of textfields,
areas
controlled by scrollbars or vertical resizing
controls
like in options window)

To emulate in non multibyte locale without
multibyte
in messages or longer messages, you may need to
run
with fontsize 18 or 20 to see what we are seeing
with
fontsize 16. Even with larger sizes, it may not be
seen
exactly the same due to the effect of multibyte
and longer
strings.

This issue is marked with the FONTSIZE keywork;
bugs so
marked will not appear on quality dashboards and
will not
need to be waived or fixed for English FCS
products of this
release.

For Netbeans issues, this will be marked as
blocking 33246.

This is not same as issue of text editor not
honoring global font size.
Comment 1 Ken Frank 2003-05-27 22:46:35 UTC
Created attachment 10472 [details]
gif of the combo box
Comment 2 Miloslav Metelka 2003-06-09 15:04:47 UTC
Java Navigation component belongs to java module. Reassigning to java.
Comment 3 Tomas Hurka 2003-06-11 10:54:24 UTC
This issue was caused by fix of issue #24170. Reassigning to Mila, who worked on issue 
#24170.
Comment 4 Miloslav Metelka 2003-06-19 15:44:03 UTC
The java navigation view should be sized so that the selected value of
the navigation view is visible but rest of the toolbar remains visible
too.
 Ideally the editor toolbar should allow its components (including
java navigation view) to specify if they wish to cover the width
remaining after subtracting width of the remaining icons in the
toolbar. A general solution would have to solve a case when there
would be multiple such components in the toolbar.
 I remember that initially we have tested the variable size navigation
view when the editor toolbar was established but there were issues
with sudden changes of the navigation view width (based on results of
parsing) so we have chosen a fixed width instead.
 However we should try again to find a good solution for this problem
in 4.0.

As there is no easy fix for this issue I would like to request this
issue to be waived till 4.0.

Comment 5 Jan Pokorsky 2004-02-05 13:52:27 UTC
I have been investigating possibility to solve this issue with an
adapted combobox. The default implementation of the combobox uses same
width for both the component in toolbar and the list in popup menu.
The adapted comobox would preserve the combobox width but it would
modify width of the popup menu that contains list of the java
hierarchy elements. 

---------         ---------
|Class  v|        |Class  v|
---------         --------------------
|longmeth|        |longmethod         |
|longlong|        |longlongmethod     |
|...     |        |...                |
|...     |        |...                |
---------         --------------------
orig. impl        adapted combobox


Performence should not be hurt. It is not necessary to compute the
size when user opens a source file.

Drawback of this solution is in missing api allowing to customize the
combobox on that level. I have prepared a patch able to do that but it
is not reliable enough. Some swing components throws NPEs randomly.

I would not recommend to integrate such a piece of code. We should
rather consider to use a custom component capable properly display the
popupmenu with the list or try another UI approach.
Comment 6 Jan Pokorsky 2004-02-05 14:01:59 UTC
Created attachment 13265 [details]
the patch attempting to work around combobox disability via puggable renderer
Comment 7 Jan Pokorsky 2004-02-05 14:05:06 UTC
Created attachment 13266 [details]
NPEs thrown by swing code
Comment 8 Jan Chalupa 2004-02-13 09:03:17 UTC
Moving target milestone -> 3.6
Comment 9 psuk 2004-02-26 12:59:24 UTC
3.6 Waiver Request:

We've evaluated several solutions and none of them really satisfied
original requirement, as there is not enough space in the toolbar.
The most promising solution/hack (change size of listbox attached to
combobox) throws random exception in swing component.
Comment 10 psuk 2004-03-01 09:31:38 UTC
No objection to waiver received - marking as 3.6_WAIVER_APPROVED
Comment 11 Jan Becicka 2004-06-30 09:48:10 UTC
Milo, are you going to fix it for promo-D?
Comment 12 Miloslav Metelka 2004-06-30 10:35:09 UTC
No, sorry, I have no time to fix this one currently. I hope that Honza
Pokorsky will find some time to fix it. The last proposed solution
seemed nicest to me but I'm not sure whether the problematic NPEs
thrown by Swing could be resolved.
Comment 13 Jan Becicka 2004-06-30 10:42:20 UTC
OK, reassigning to Honza
Comment 14 Jan Pokorsky 2004-08-05 16:05:20 UTC
I have come with easier solution. Items that are too long gets a tool tip.

fixed in

/cvs/java/src/org/netbeans/modules/java/ui/NavigationView.java
new revision: 1.24; previous revision: 1.23
Comment 15 Max Sauer 2007-02-14 14:14:32 UTC
Verified.
---
NetBeans IDE Dev (Build 070214)
1.6.0; Java HotSpot(TM) Server VM 1.6.0-b105
Linux version 2.6.12-1.1390_FC4smp running on i386
en_US (nb); UTF-8