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: | Animator listener is needed | ||
---|---|---|---|
Product: | platform | Reporter: | Ramesh Dara <dararamesh> |
Component: | Graph | Assignee: | apireviews <apireviews> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | jsandusky |
Priority: | P3 | Keywords: | API_REVIEW_FAST |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: |
Proposed patch
The second patch with AnimatorEvent |
Description
Ramesh Dara
2007-03-26 22:59:57 UTC
basically we'd like to have some way of being informed when the animation is complete - so that we can perform additional operations afterwards (such as scroll to visible, etc.) Attaching a patch for the AnimatorListener interface. Originally all built-in animators has been hidden and exposed by methods of SceneAnimator only. Now it is accessible by: Scene.getSceneAnimator().getPreferredLocationAnimator().addAnimatorListener(...) The preferredLocationAnimator takes care of preferred location animation of all widgets. If you invoke preferred-location-animator in the middle of previously started animation, the process is reset and continues from current situation to the new target. Patch contains update documentation, javadoc, automated test and increated spec number. If the proposed patch is sufficient for you, I am going to assign the issue to fast-track API review. Created attachment 40673 [details]
Proposed patch
This is exactly what we were hoping for (and more)! Thanks! Asking for fast-track API review. Y01 The newly added API methods and classes miss the @since tag, please add @since 2.2 there. Y02 The use of golden files in test is really inventive! Usually we just use Logger. At the begining of the test we create CharSequence log = Log.enable(...) and at the end we just do assertEquals("explog", log.toString()), no files are then needed and one can understand the whole test just by looking at its source code. Y03 Can you describe me the planned evolution story for AnimationListener? What if you find out that a method is missing or that it needs additional arguments? E.g. maybe you should add AnimatorEvent... Y01 - thanks for notifying - i have forgotten about it Y02 - i have not know about this approach - i will use it for simple tests like this AnimationListenerTest Y03 - I will create AnimatorEvent which will contain Animator reference and Progress value. The listener is an interface and I think users would not like it to be an abstract class. Therefore a new listener-method is going to be added only using a new listener interface. I do not fully understand reply to Y03, probably show here the diff before applying. Created attachment 41056 [details]
The second patch with AnimatorEvent
Patch applied. |