GWT - Adding visibility true/false handler

2019-08-04 01:59发布

问题:

Is there a simple way to add handlers/listeners to widgets so that the change to visibility can be detected ? Or do i have to create a system of my own ? (which means creating other widgets that wrap needed widgets and trigger events when setVisible(...) is called)

回答1:

Standard widgets have their own listeners and handlers. If your application requires your own events then you have to define custom user defined events, listener and handlers.



回答2:

overite setVisible(boolean visible) extend UIObject or use deffered binding