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 203554 - Out of Sync: Designer Vertical Resizability Button & Vertical Resizable Property
Summary: Out of Sync: Designer Vertical Resizability Button & Vertical Resizable Property
Status: RESOLVED INVALID
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Natural Layout (show other bugs)
Version: 7.1
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-11 22:04 UTC by MackSix
Modified: 2011-10-26 23:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Project that exhibits the error. (24.61 KB, application/zip)
2011-10-11 22:04 UTC, MackSix
Details
Screenshot showing problem. (230.54 KB, image/png)
2011-10-11 22:05 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2011-10-11 22:04:55 UTC
Created attachment 111892 [details]
Project that exhibits the error.

The attached project shows a filler (glue) that has it's Vertical Resizable Property enabled in the Properties Pop-up and Window, but the Vertical Resizable Button on the Designer Toolbar is not toggled to the ON position.

1) Open attached project.
2) Open NewJFrame.java in Designer.
3) Expand tree in Navigator to highlight filler1.
4) Notice "Change Vertical Resizability" Button on Designer Toolbar is in the OFF position.
5) Open up Properties Pop-up for filler1 and notice Vertical Resizable is checked.
6) Notice in Properties window that Vertical Resizable is also checked.

Expected Results: "Change Vertical Resizability" Button should be in the ON position.

See attached screenshot.

Product Version: NetBeans IDE Dev (Build 201110110600)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Comment 1 MackSix 2011-10-11 22:05:45 UTC
Created attachment 111893 [details]
Screenshot showing problem.
Comment 2 MackSix 2011-10-11 22:30:52 UTC
In addition, I noticed that if selecting the "Vertical Resizable" check box in Properties Window for jTabbedPane1, the "Change Vertical Resizability" button on Designer Toolbar does not change either.
Comment 3 Jan Stola 2011-10-12 11:42:22 UTC
This is a missunderstanding. These are different kinds of resizability. 

The 'Vertical Resizable' property in Properties window is a very low-end property that you usually don't want to modify directly (unless you know very well what you are doing). It determines just a "local" resizability of the given component. In other words, it requests the component to be resizable if other circumstances allow this. The component still may end up in a non-resizable group. If this happens then the component will grow just to occupy the available size in the group but it will not cause the whole group to grow. In other words, the component will not resize when the enclosing container will resize (if placed in a non-resizable group). See GroupLayout.createParallelGroup(GroupLayout.Alignment alignment, boolean resizable) for more details.

The toolbar buttons on the other hand attempt to cover the resizability on the global scale. In other words, they are pressed/selected when the given component will resize if its enclosing container will resize. This is the high-level property/action that you are usually interested in.
Comment 4 MackSix 2011-10-12 16:43:48 UTC
Are you saying these should have nothing to do with one another when selected or deselected?

If I toggle the Designer Toolbar button it should not toggle the property and vice-versa? Or is one dependent on the other in some cases? or...?
Comment 5 Jan Stola 2011-10-13 12:13:54 UTC
(In reply to comment #4)
> Are you saying these should have nothing to do with one another when selected
> or deselected?
> 
> If I toggle the Designer Toolbar button it should not toggle the property and
> vice-versa? Or is one dependent on the other in some cases? or...?

When the high-level toolbar button is pressed then the low-level property (the one in Properties window) must be checked, but it can happen that the low-level property is checked and the toolbar button is not selected. In other words, the low-level property being checked is a necessary condition for the toolbar button to be pressed, but it is not a sufficient condition.
Comment 6 MackSix 2011-10-26 23:16:12 UTC
I was looking at this and I can group 3 buttons in a column that have 3 different horizontal widths. I ensure they are in the same group by selecting all 3 and then left aligning them with the tool bar button. Now if I resize the 2 thinner ones horizontally and snap to the same size as the largest one, I see that the Horizontal Resizable property is checked as you said it should. All is well.

If I do the same routine, but instead of sizing the widths of the thinner buttons in the designer, I check the Horizontal Resizable property, and I see the 2 buttons automatically size to fit the width of the group. In this case the global Horizontal Resizability toolbar button is selected too. Not that there is any problem with that if that is the way it is supposed to work, I just don't understand why it would be necessary for it to be applied doing it this way.