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 79922 - I18N - some possible hard coded font or window sizes
Summary: I18N - some possible hard coded font or window sizes
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: WSDL Tools (show other bugs)
Version: 5.x
Hardware: Sun All
: P2 blocker (vote)
Assignee: Nathan Fiedler
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2006-07-10 17:07 UTC by Ken Frank
Modified: 2006-09-26 18:25 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Frank 2006-07-10 17:07:34 UTC
this if from code scanning for certain api calls, and
realize that some of these might not be in active
code or otherwise valid, and that some will need to be assigned to different
subcats -- the code scanning just looks for certain api calls using hardcoded
values.

These items are either possible hard coded font sizes or use of
non jdk font names

as well as possible hard coding of window or dialog
sizes using setPreferred or setMinimumSize.

this isn't meant to be a total list as there might be other same situations
not found by the scanning - please check the code.

----


label.setFont(new java.awt.Font("Dialog", 0, 14)); // NOI18N
./multiview/src/org/netbeans/modules/xml/multiview/ui/DefaultTablePan
el.java

titleButton.setFont(new java.awt.Font("Dialog", 1, 14));
./multiview/src/org/netbeans/modules/xml/multiview/ui/SectionContaine
r.java
titleButton.setFont(new java.awt.Font("Dialog", 1, 14));
./multiview/src/org/netbeans/modules/xml/multiview/ui/SectionPanel.ja
va

this.headerLabel.setFont(new Font("Dialog", Font.BOLD, 12));
./wsdlui/src/org/netbeans/modules/xml/wsdl/ui/view/common/CommonMsgPa
nel.java


b. setPreferredSize
setMinimumSize
in various files of:

catalog/src/org/netbeans/modules/xml/catalog/impl
core/src/org/netbeans/modules/xml/core/scenario
multiview/src/org/netbeans/modules/xml/multiview/ui
schema/abe/src/org/netbeans/modules/xml/schema/abe
schema/analysis/src/org/netbeans/modules/xml/schema/ui
schema/schemaui/src/org/netbeans/modules/xml/schema/ui
tax/src/org/netbeans/modules/xml/tax/beans/customizer
tools/src/org/netbeans/modules/xml/tools/generato
wsdlui/src/org/netbeans/modules/xml/wsdl/ui/view/
core/src/org/netbeans/modules/xml/core/scenario/ScenarioPanel.java

for example
jPanel1.setMinimumSize(new java.awt.Dimension(172, 100)); jPanel1.set
PreferredSize(new java.awt.Dimension(172, 150));
jScrollPane1.setPreferredSize(new java.awt.Dimension(100, 7 0));
curScenarioPanel.setMinimumSize(new java.awt.Dimension(450, 200));
curScenarioPanel.setPreferredSize(new java.awt.Dimension(45 0, 200));
Comment 1 Ken Frank 2006-07-10 22:48:16 UTC
another one with non standard jdk font name hardcoded

        titleButton.setFont(new java.awt.Font("Tahoma", 1, 11));
schema/schemaui/src/org/netbeans/modules/xml/schema/ui/nodes/categori
zed/customizer/DocumentationPanel.java


ken.frank@sun.com
Comment 2 Petr Jiricka 2006-07-11 11:06:42 UTC
Some of these are Enterprise Pack code, assigning to Erno for now to fix the NB
part.
Comment 3 Erno Mononen 2006-07-18 09:32:26 UTC
xml/multiview part is fixed in release55 branch.

http://xml.netbeans.org/source/browse/xml/multiview/src/org/netbeans/modules/
xml/multiview/ui/SectionPanel.form?r1=1.10.34.1.2.1&r2=1.10.34.1.2.2

http://xml.netbeans.org/source/browse/xml/multiview/src/org/netbeans/modules/
xml/multiview/ui/TreePanelDesignEditor.java?r1=1.4.34.1&r2=1.4.34.2

http://xml.netbeans.org/source/browse/xml/multiview/src/org/netbeans/modules/
xml/multiview/ui/SectionContainer.form?r1=1.11.58.1&r2=1.11.58.2

http://xml.netbeans.org/source/browse/xml/multiview/src/org/netbeans/modules/
xml/multiview/ui/DefaultTablePanel.form?r1=1.6&r2=1.6.60.1

http://xml.netbeans.org/source/browse/xml/multiview/src/org/netbeans/modules/
xml/multiview/ui/DefaultTablePanel.java?r1=1.7.50.2&r2=1.7.50.3

http://xml.netbeans.org/source/browse/xml/multiview/src/org/netbeans/modules/
xml/multiview/ui/SectionContainer.java?r1=1.22.54.3&r2=1.22.54.4

http://xml.netbeans.org/source/browse/xml/multiview/src/org/netbeans/modules/
xml/multiview/ui/SectionPanel.java?r1=1.38.30.1.2.4&r2=1.38.30.1.2.5
Comment 4 bhate 2006-07-18 18:18:14 UTC
Its better to use default size for text labels.
Please see
org.netbeans.modules.xml.schema.ui.nodes.categorized.customizer.DocumentationPanel.java
version 1.1.2.4 (diff 1.1.2.3)
Comment 5 bhate 2006-07-18 18:21:47 UTC
Its better to use default size for text labels.
Please see
org.netbeans.modules.xml.schema.ui.nodes.categorized.customizer.DocumentationPanel.java
version 1.1.2.6 (diff 1.1.2.5)
removed line titleButton.setFont(new java.awt.Font("Tahoma", 1, 11));
Comment 6 Petr Jiricka 2006-07-19 09:29:30 UTC
Hi Stepan, can you please look at the remaining occurences under xml (the ones
that are part of NetBeans standard distro)? Thanks.
Comment 7 Sherold Dev 2006-07-19 16:34:11 UTC
Ken, I will remove all occurrences of the setPreferredSize call but I do not
know what is wrong about the setMinimumSize call. I think it is perfectly ok to
set the minimum size to some fixed value.

Can you please clarify why do you want to remove the setMinimumSize call? Thanks
Comment 8 Sherold Dev 2006-07-24 15:03:46 UTC
Checking in src/org/netbeans/modules/xml/catalog/impl/XCatalogCustomizer.form;
/cvs/xml/catalog/src/org/netbeans/modules/xml/catalog/impl/XCatalogCustomizer.form,v
 <--  XCatalogCustomizer.form
new revision: 1.7.80.1; previous revision: 1.7
done
Checking in src/org/netbeans/modules/xml/catalog/impl/XCatalogCustomizer.java;
/cvs/xml/catalog/src/org/netbeans/modules/xml/catalog/impl/XCatalogCustomizer.java,v
 <--  XCatalogCustomizer.java
new revision: 1.8.80.2; previous revision: 1.8.80.1
done

Usage of the setPreferredSize method in the
org.netbeans.modules.xml.catalog.CatalogMounterPanel is intentional and
"correct" (although it is a hack), it should work OK even with larger fonts.

Reassigning to ent. pack guys.
Comment 9 Shivanand Kini 2006-08-02 19:05:23 UTC
for wsdltools, setPreferredSize is used in WSDLColumn.
Comment 10 Nathan Fiedler 2006-08-02 19:21:59 UTC
Both the schema and WSDL editors use setPreferredSize() for the individual
columns in the columns view. This is necessary, otherwise the columns are sized
to the content, which results in each column being a different width. This goes
against the desired behavior which is to mimic Finder in MacOS X, in which each
column is the same width. Moreover, we already known in advance that the
contents of the columns will be of various widths, and thus we display the
contents truncated as appropriate. This is intentional and by design.

If you like, I can make the values come from a method call, so the scanning tool
will not see them as being hard coded.

Marking as fixed since everything that should be fixed has been fixed.
Comment 11 gc140975 2006-09-22 15:04:12 UTC
I am the QE member ,I need to verify this bug ,Could you please let me know  
the steps to reproduce from scratch so that I can verify the same
Comment 12 Ken Frank 2006-09-26 18:25:44 UTC
verified.