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 112234 - Expanding Page icon to show components leaves minus button on floating on canvas
Summary: Expanding Page icon to show components leaves minus button on floating on canvas
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Graph (show other bugs)
Version: 3.x
Hardware: PC All
: P3 blocker (vote)
Assignee: issues@platform
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-07 20:08 UTC by Yousuf Haider
Modified: 2010-04-01 14:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (213.03 KB, image/jpeg)
2007-08-07 20:08 UTC, Yousuf Haider
Details
Bug screenshot (115.21 KB, image/png)
2007-08-21 10:49 UTC, David Kaspar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Haider 2007-08-07 20:08:36 UTC
jdk6u2
Build:200708070000

Steps to reproduce:
1. Create new VW JSF project.
2. Open PFE and add 3 or 4 of each of the components to the page using the context menu of page icon in PFE.
3. Save and close faces-config file and open it again. 
4. Now expand the page using the '+' button on the page icon to show all the components. The Page will expand to show
the components. The '+' (plus button will be changed to a '-' button but when the page expands the '-' button is left on
the canvas rather on the page icon itself.

Change view to faces-config and then come back to Project view and try expanding the page again. The same thing will
happen again.

Drag page icon to resolve the issue.

If the description is too confusing please take a look at the attached screen shot.
Comment 1 Yousuf Haider 2007-08-07 20:08:55 UTC
Created attachment 46291 [details]
screenshot
Comment 2 Joelle Lam 2007-08-07 22:15:01 UTC
David, I have seen this too.. Any idea what this is caused by.  I am using the VMDNodeWidget.
Comment 3 David Kaspar 2007-08-08 08:08:53 UTC
I do not know the root cause but it looks like that VMDNodeWidget header has wrongly resolved layout. If you would call:
"myVMDNodeWidget.getHeader ().setCheckClipping (true);" then the "-" icon would disappear.

This requires futher investigation. Mainly it is about locations, boundaries, layout and constrain of each widget within
the VMDNodeWidget.

The easiest solution would be to reproduce it with test.vmd.VMDTest example. Joelle, could you modify the example to
reproduce this issue? Thanks.
Comment 4 David Kaspar 2007-08-21 10:47:38 UTC
I change VMDColorScheme in my VMDGraphScene to "NetBeans60Scheme" and I put some nodes in my scene, one of the nodes has
a pin with a large text. When I press the button (+), the node is contracted, but the icon (+) stays in the same place.
In the attachment is the image of the bug. 
Comment 5 David Kaspar 2007-08-21 10:49:18 UTC
Created attachment 46956 [details]
Bug screenshot
Comment 6 David Kaspar 2007-08-31 09:16:29 UTC
This issue is caused by the problem in justify-aware layout.

The header is not reflecting a new value of the node widget since the widget is still the same - only size of inner pin
widget is changing.

Temporary workaround is to apply following patch:

         Rectangle rectangle = minimized ? new Rectangle () : null;
         for (Widget widget : getChildren ())
             if (widget != header  &&  widget != pinsSeparator) {
-                getScene ().getSceneAnimator ().animatePreferredBounds (widget,
 minimized  && isMinimizableWidget (widget) ? rectangle : null);
+                SceneAnimator sceneAnimator = getScene ().getSceneAnimator ();
+                sceneAnimator.animatePreferredBounds (widget, minimized  && isM
inimizableWidget (widget) ? rectangle : null);
+                final Animator animator = sceneAnimator.getPreferredBoundsAnima
tor ();
+                animator.addAnimatorListener(new AnimatorListener () {
+                    public void animatorStarted(AnimatorEvent event) {
+                    }
+
+                    public void animatorReset(AnimatorEvent event) {
+                    }
+
+                    public void animatorFinished(AnimatorEvent event) {
+                        animator.removeAnimatorListener (this);
+                    }
+
+                    public void animatorPreTick(AnimatorEvent event) {
+                    }
+
+                    public void animatorPostTick(AnimatorEvent event) {
+                        header.revalidate();
+                    }
+                });
             }
         minimizeWidget.setImage (scheme.getMinimizeWidgetImage (this));
     }

Still leaving the issue as unresolved until proper fix is introduced.