Bug 146343 - I18N - Property dialog doesn't resize to show its header entirely
I18N - Property dialog doesn't resize to show its header entirely
Status: RESOLVED WONTFIX
Product: platform
Classification: Unclassified
Component: Explorer
6.x
All All
: P2 (vote)
: TBD
Assigned To: Stanislav Aubrecht
issues@platform
: I18N
: 145453 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-05 17:05 UTC by kaa
Modified: 2008-12-22 10:14 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
image (57.61 KB, image/jpeg)
2008-09-05 17:06 UTC, kaa
Details
image (71.62 KB, image/jpeg)
2008-09-12 15:32 UTC, kaa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kaa 2008-09-05 17:05:17 UTC
Product Version: NetBeans IDE Dev (Build 200808240201)
Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22
I'm running in Japanese locale, WinXP, using a pseudo localized Netbeans with font size 16 option.

Steps to reproduce the issue:
1. Create Java App
2. Add JPanel to the project.
3. Open project properties and select Code tab

There are several properties with '...' button. After pressing the button I can see a dialog that
doesn't resize to show its header properly. In general it could happen when some dialog is small in width. 

The problem is not about exact length of some label or message that is not being shown completely, but that if dynamic
resizing is implemented vs hardcoding, the label or message will show completely.

Assumption is that user does not need to manually resize most windows or dialogs to see all of the UI objects and
information in them. I'm running in pseudo localized locale in which each message/label is sometimes longer than in
English. To account for that in some locales, translations from English (and some other euro languages) could be shown
with longer strings.

Also I'm running at font size 16, which is viewed as a valid font size that might be used. Resizing issues are not just
related to i18n; they might show to user in English locale if they run at larger font size.

Often, these issues happen because the length of some label or message or size of entire window is hardcoded vs using
layout managers or other techniques or api to have the windows or the objects in them, dynamically resize.
Comment 1 kaa 2008-09-05 17:06:14 UTC
Created attachment 69176 [details]
image
Comment 2 Jiri Vagner 2008-09-05 18:07:00 UTC
I followed your steps to reproduce and invoked that smaller dialog. I'm able to enlarge that window using mouse, window
is resizable. So you want to add some automatic resize code for enlarging window according window title. It sound
strange to me. Are there any title-resize dialogs inside IDE please?
Comment 3 Stanislav Aubrecht 2008-09-08 09:27:50 UTC
it's impossible to get the preferred size of a top-level window title.
use can resize the window using either mouse or keyboard.
Comment 4 kaa 2008-09-12 13:21:58 UTC
There is a similar issue 145453.
The fix is possible there.	
Comment 5 Stanislav Aubrecht 2008-09-12 14:54:07 UTC
*** Issue 145453 has been marked as a duplicate of this issue. ***
Comment 6 Stanislav Aubrecht 2008-09-12 14:55:51 UTC
issue 145453 is a duplicate of this one. 
i don't know any native java API to get the preferred size of a top-level window title. if you know such API, please
reopen both issues
Comment 7 kaa 2008-09-12 15:31:16 UTC
I don't know it also.
Seems it is more general problem. I found the same issue for WSDL doc properties.
Comment 8 kaa 2008-09-12 15:32:24 UTC
Created attachment 69758 [details]
image
Comment 9 Ken Frank 2008-09-12 16:16:32 UTC
I found some stuff via google that talks about this,
I don't know if it applies to nb or not, but here are the pointers.
(andrey, if there are other such issues on this open or in future on dialog title itself and resize, could you
add these pointers to those issues too ?)

http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=33&t=025761

http://forums.java.net/jive/thread.jspa?threadID=25110
---------------------------

http://coding.derkeiler.com/Archive/Java/comp.lang.java.gui/2004-04/0485.html

http://coding.derkeiler.com/Archive/Java/comp.lang.java.gui/2004-04/0591.html

http://coding.derkeiler.com/Archive/Java/comp.lang.java.gui/2004-04/0635.html
--------

http://www.java-forums.org/awt-swing/10614-how-can-i-set-frame-s-size-flexible-show-s-title-variable-length-full.html

ken.frank@sun.com
Comment 10 Stanislav Aubrecht 2008-09-12 16:47:48 UTC
there's only one suggested solution in those links - using Dialog's font to calculate preferred title length. but it's
just a hack that wouldn't work in most cases:
- system window manager may set bigger/smaller font size for window titles
- there are usually extra buttons (close/minimize/maximize etc) in window title, their count and size is os dependent
and window manager dependent

i'd suggest file RFE against jdk to add a method for preferred dialog title size
Comment 11 Jan Stola 2008-09-12 16:58:01 UTC
I agree with saubrecht. We cannot fix that reliably without the support from JDK. In ideal case, java.awt.Window.pack() 
should be modified to take size of its title into account and change the width of the window accordingly.
Comment 12 Jan Stola 2008-09-12 17:06:41 UTC
> i'd suggest file RFE against jdk

In fact, there is one already. See http://bugs.sun.com/view_bug.do?bug_id=4804922


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo