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 218663 - Inaccurate size of fields during REST endpoint creation
Summary: Inaccurate size of fields during REST endpoint creation
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-20 08:08 UTC by Jiri Skrivanek
Modified: 2013-08-28 07:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screen shots - from patterns - Linux - 20120920. (110.03 KB, application/octet-stream)
2012-09-20 08:08 UTC, Jiri Skrivanek
Details
Screenshots - 20130826. (172.96 KB, application/octet-stream)
2013-08-26 10:22 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2012-09-20 08:08:43 UTC
Created attachment 124622 [details]
Screen shots - from patterns - Linux - 20120920.

Vertical size of some UI elements is inaccurate in REST services wizard on Linux. To reproduce:
- create web project
- open new file wizard
- select "Web Services|RESTful Web Services from Patterns"
- click Next choose one of options and see what is wrong
- Simple Root Resource
  - Location - too narrow combo box
  - Representation Class - too narrow field
- Container-Item
  - Location - too narrow combo box
  - Resource Package - too narrow combo box
  - MIME Type - too narrow combo box
Comment 1 Denis Anisimov 2012-10-04 13:22:43 UTC
The issue ( along with original issue about hidden controls ) is a consequence
of the javax.swing.GroupLayout layout usage.
I'm not sure where the issue is exactly : in the JDK 
javax.swing.GroupLayout layout or NB GUI builder code generation.
In this specific case generated code is not able correctly to determine preferred
size for components and it shows differently mentioned UI components in runtime.
One could see this even in the UI form designer under different platfoms.
The current state looks and works fine for Win box and it looks differently 
(in NB UI builder ) and works differently under Linux OS.
The opposite is also true: UI form correction performed on 
Linux box works and looks
fine under Linux OS but it looks bigger on the Win box.

So this is not REST wizard issue.
The fix for the issue requires complete UI redesign : different layout has 
to be used. This task is not for upcoming release.
Comment 2 Jiri Skrivanek 2012-10-04 13:53:05 UTC
If this is global issue why MIME Type combo box has correct height and Location combo box is narrow (see FromPatterns-simple-20120920.png). Isn't it the same swing component? Similarly text fields.
Comment 3 Denis Anisimov 2012-10-04 14:09:03 UTC
(In reply to comment #2)
> If this is global issue why MIME Type combo box has correct height and Location
> combo box is narrow (see FromPatterns-simple-20120920.png). Isn't it the same
> swing component? Similarly text fields.

Probably because the resulting component size is defined by the 
chosen layout manager.
Comment 4 Milan Kuchtiak 2013-08-19 08:39:58 UTC
Fixed:

http://hg.netbeans.org/web-main/rev/ff5358f225ce
Comment 5 Jiri Skrivanek 2013-08-26 10:20:54 UTC
I am afraid it is better on Linux but worse on Windows. It is strange for me that the MIME Type combo box is accurate on both systems. Current issues:

- Simple Root Resource
  - Location - too wide combo box on Windows, "Source Packages" touching left side on Linux
- Container-Item
  - Location - too wide combo box on Windows,  "Source Packages" touching left side on Linux
  - Resource Package - too wide combo box on Windows

Product Version: NetBeans IDE Dev (Build 201308260001)
Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b55
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b40
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Comment 6 Jiri Skrivanek 2013-08-26 10:22:12 UTC
Created attachment 139242 [details]
Screenshots - 20130826.
Comment 7 Milan Kuchtiak 2013-08-26 14:20:37 UTC
The subclass of DefaultListCellRenderer is used for Location Combo Box (Source Packages). The issue with Source Packages on Linux is likely generic Swing issue. I cannot do anything with that.
(see also the Java Class wizard)

Note that for Mime Type combo box the renderer isn't specified, that's may be is the difefrence.

Tried to fix at least the text field sizes:
http://hg.netbeans.org/web-main/rev/86e457436b13

Please verify on Windows.