[英]Autohiding of GWT popup panel
一段時間后如何隱藏GWT DecoratedPopupPanel? 我可以使用Timer類來實現,但是可能存在一些更優雅的方式嗎?
也許GWT Scheduler
比定時器更適合您的任務。
絕對不。 您必須創建一個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.