We didn't want to expose a setAnimation() method in PopupPanel until we had
time to work out an API that would work for all widgets.  However, you can
use a JSNI to access protected methods from another package..  I know it
isn't pretty, but it should get the job done.

private native void doSetAnimationType(PopupPanel popup) /*-{
pop...@com.google.gwt.user.client.ui.popuppanel
::setAnimationType(Lcom/google/gwt/user/client/ui/PopupPanel$AnimationType;)(
@com.google.gwt.user.client.ui.PopupPanel.AnimationType::ROLL_DOWN);
}-*/;

Thanks,
John LaBanca
jlaba...@google.com


On Mon, Sep 13, 2010 at 9:35 AM, Joel Webber <j...@google.com> wrote:

> @jlabanca: Sounds like a bit of an anachronism in the code. Is this
> something we can clean up now (and do you need a hand getting it done if
> so)?
>
> Le 13 septembre 2010 03:50, stuckagain <david.no...@gmail.com> a écrit :
>
> Hi,
>>
>> While factoring out a dependency on GWT incubator I stumbled upon the
>> way the animation type is selected in the PopupPanel.
>>
>> This is what the javadoc says:
>> /**
>>   * Sets the animation used to animate this popup. Used by gwt-
>> incubator to
>>   * allow DropDownPanel to override the default popup animation. Not
>> protected
>>   * because the exact API may change in gwt 1.6.
>>   *
>>   * @param animation the animation to use for this popup
>>   */
>>  void setAnimation(ResizeAnimation animation) {
>>    resizeAnimation = animation;
>>  }
>>
>> So basically I will have to put my code in the same package if I want
>> to re-enable the rolldown animation instead of the centered one for
>> PopupPanel...
>>
>> David
>>
>> --
>> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>>
>
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to