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 73608 - LAYOUT: Aligning of chackeboxes/radiobuttons situated below label in Matisse
Summary: LAYOUT: Aligning of chackeboxes/radiobuttons situated below label in Matisse
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Natural Layout (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-15 14:51 UTC by Jindrich Dinga
Modified: 2011-11-22 13:15 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
radiobuttons (33.03 KB, image/png)
2006-03-15 14:52 UTC, Jindrich Dinga
Details
checkboxes (32.07 KB, image/png)
2006-03-15 14:52 UTC, Jindrich Dinga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jindrich Dinga 2006-03-15 14:51:39 UTC
Found in NB20060315-1215 version.

In guidelines for Windows and Metal/Gnome, there is not described a situation, when checkboxes/
radiobuttons are situated below label.

Matisse puts 10 px of space between the beginning of the label and the left edge of the components. 
However, this spacing is not good at least for Windows platform. The Windows platform describes 
spacing in DU, so in the dialog there should not be any fixed numbers. I suggest using UNRELATED 
space in these cases for every L&F. It means

Windows: 7 DU (11 px)
Metal/Gnome: 12 px 

See attached pictures (spacing is in pixels).
Comment 1 Jindrich Dinga 2006-03-15 14:52:24 UTC
Created attachment 29250 [details]
radiobuttons
Comment 2 Jindrich Dinga 2006-03-15 14:52:51 UTC
Created attachment 29251 [details]
checkboxes
Comment 3 randelshofer 2006-09-11 19:55:55 UTC
I suggest using LayoutStyle.INDENT gap to determine the space needed for indentation.
This allows for Look and Feel aware indentation rules.

Rationale:
On Mac OS X, the indentation depends on the components that are involved and on their current size 
style. 

On Mac OS X:
1) a JLabel below a JComboBox should be indented by a specific number of pixels in order to have the 
text of the JLabel left aligned with the contents of the JComboBox.
2) a JLabel below a JRadioButton should be indented by a specific number of pixels in order to have the 
text of the JLabel left aligned with the text of the JRadioButton.
3) a small JLabel below a small JRadioButton should be indented by a specific number of pixels in order 
to have the text of the JLabel left aligned with the text of the JRadioButton.

The number of pixels needed for cases 1) and 2) differ, because the text in a JRadioButton is much 
farther away from the left boundary than the contents of a JComboBox is.  
The number of pixels needed for cases 2) and 3) differ, because the artwork for regular sized 
component and for small sized component has different sizes on Mac OS X.

LayoutStyle.INDENT can handle such complex cases nicely.
Comment 4 Tomas Pavek 2006-09-12 09:11:37 UTC
Yes, INDENT gap should be used here, not UNRELATED. The bug is that the GUI 
builder does not put the symbolic gap into the resulting layout definition 
(code), just the absolute number of pixels corresponding to the INDENT obtained 
from LayoutStyle at the moment (based on actual L&F of NetBeans IDE).

This should be fixed, but given that this is not defined in any guidelines, I'm 
lowering priority to P3.