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.
Summary: | Expanding Page icon to show components leaves minus button on floating on canvas | ||
---|---|---|---|
Product: | platform | Reporter: | Yousuf Haider <yousufh> |
Component: | Graph | Assignee: | issues@platform <issues> |
Status: | NEW --- | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 3.x | ||
Hardware: | PC | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
screenshot
Bug screenshot |
Description
Yousuf Haider
2007-08-07 20:08:36 UTC
Created attachment 46291 [details]
screenshot
David, I have seen this too.. Any idea what this is caused by. I am using the VMDNodeWidget. 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. 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. Created attachment 46956 [details]
Bug screenshot
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. |