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 34238 - I18N - Wizard panels not sized properly
Summary: I18N - Wizard panels not sized properly
Status: VERIFIED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Dialogs&Wizards (show other bugs)
Version: 3.x
Hardware: Sun SunOS
: P2 blocker (vote)
Assignee: David Simonek
URL:
Keywords: I18N
Depends on:
Blocks: 33246
  Show dependency tree
 
Reported: 2003-06-06 23:43 UTC by Unknown
Modified: 2008-12-23 11:44 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Related CMP Wizard panel which is not sized correctly (98.34 KB, image/jpeg)
2003-06-06 23:46 UTC, Unknown
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2003-06-06 23:43:46 UTC
To see the affects of this bug, run SunOne Studio,
release
5 with a larger point size, for example, on Solaris:

% runide.sh -fontsize 20

To reproduce:

* Create a package
* Select New->All Templates
* Expand the J2EE node and select "Related CMP
Entity EJBs"
  and then select the Next button.
* On the next panel, you can leave the defaults as
is and select
  the Next button
* You'll notice on the next panel that the window
is not large
  enough to display all of the components, that
is, some are
  truncated. See the attached jpg image.

When debugging this, I found that when the panel
is being
displayed, eventually a property change event is
fired which
attempts to resize the NbPresenter object. At the
end of
the 'propertyChange' method in NbPresenter, the
size is set
to the minimum size. The call to 'getMinimumSize'
causes
all panels inside of the NbPresenter object to
have their
'getMinimumSize' method called. The related cmp
wizard panel
that I supplied was returning the correct minimum
size, however,
I added some 'println's to WizardDescriptor.java,
specifically
in the ImagedPanel class and noticed that the
minimum size
returned for that panel is way off. For example,
on the
actual panel (in the image), the ImagedPanel
(which displays
the wizard steps) has a width of 198, but
'getMinimumSize'
returns 77. So then the resulting size of the
NbPresenter 
object is 121 pixels too short which results in
the components
getting truncated.
Comment 1 Unknown 2003-06-06 23:46:09 UTC
Created attachment 10618 [details]
Related CMP Wizard panel which is not sized correctly
Comment 2 David Simonek 2003-06-12 18:43:26 UTC
hopefully fixed in main trunk, cvs output:
/cvs/openide/src/org/openide/WizardDescriptor.java,v  <-- 
WizardDescriptor.java
new revision: 1.85; previous revision: 1.84

Fixes ImagedPanel to return consistent minimum and preferred size, as
Joe requested.

However, I'm not sure if this fix really solves the problems - Joe,
could you test on your side? Fix in now psut in netbeans open source
repository, main trunk. I'm sorry I'm not able to build SunOne studio
at the moment. Thanks.
Comment 3 Unknown 2003-06-16 22:04:34 UTC
I just recompiled SunOne Studio with the modified
WizardDescriptor.java and another problem occurs. When
I start the wizard, the first panel looks fine. When I
go to the next panel, the left panel (with the wizard
steps) disappears. Once its gone, its gone for good too
(if I go next or previous, it never returns). So, this
fix does not work.

I did a little debugging and as it turns out the image
used in SunOne Studio for the ImagedPanel background is
one pixel by one pixel. So then the minimum and 
preferred size returned for the panel is one which is why
it disappears. Oddly, the first time through the code, 
the default minsize (198) is returned. I'm not quite
sure why.

In any case, that change probably needs to be backed out
of the trunk.
Comment 4 David Simonek 2003-06-17 16:27:45 UTC
Fix rollbacked, issue reopened.
Comment 5 David Simonek 2003-06-19 14:46:05 UTC
Joe, please try to check if preferred size of your panel is really OK.
Code in WizardDescriptor works OK for many wizards, so it's strange
that yours is different.

I'll try to put debug version of WizardDescriptor for you when I'll
have some time.
Comment 6 Jiri Rechtacek 2003-09-22 09:04:26 UTC
Dafe, I'll reassign to you because you participate in discussion with
Joe you have more information about this issue than me. If I'm wrong
assign back to me.
Comment 7 David Simonek 2004-01-26 11:44:36 UTC
I re-evaluated the problem and I'm almost 100% sure that code in CMP
wizard has to do preferred size hardcoding of some sort. Joe, please
search through the code and try to find and eliminate any calls to
setPreferredSize(size), which override automatic preferred size
computation for Swing controls. From the screenshot, it looks like
either combo box or tabs in tabbed pane set their pref sizes
explicitly, which is probably cause of error.
I couldn't find anything what may have caused this in core code.
Marking as worksforme. Please reopen with further details if problem
still occurs.
Comment 8 Marian Mirilovic 2004-02-27 15:43:15 UTC
Joe,
could you please mark issue as VERIFIED if agree or  reopen if disagree,
 thanks in advance.
Comment 9 Marian Mirilovic 2004-03-12 09:04:08 UTC
verified .....