繁体   English   中英

自动隐藏GWT弹出面板

[英]Autohiding of GWT popup panel

一段时间后如何隐藏GWT DecoratedPopupPanel? 我可以使用Timer类来实现,但是可能存在一些更优雅的方式吗?

也许GWT Scheduler比定时器更适合您的任务。

请参阅scheduleFixedDelay

绝对不。 您必须创建一个Timer对象来处理它

如果要在用户单击外部时将其隐藏,可以指定autohide属性

DecoratedPopupPanel

public DecoratedPopupPanel(boolean autoHide,
                           boolean modal)

    Creates an empty decorated popup panel, specifying its "auto-hide" and "modal" properties.

    Parameters:
        autoHide - true if the popup should be automatically hidden when the user clicks outside of it
        modal - true if keyboard or mouse events that do not target the PopupPanel or its children should be ignored

参考javaDoc

您发现的另一个选择是Timer类。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM