How to hide GWT DecoratedPopupPanel after some time? I can make it with Timer class, but may be exist some more elegant way?
Maybe GWT Scheduler
is more elegant way for your task than timer.
Absolutely not. You must create a Timer object to handle it
if you want to hide it when user clicks outside it you can specify autohide property
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
refer javaDoc
other option is Timer class as you have discovered.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.