public class WindowManager extends Object implements RegisterEvent.HasRegisterHandlers<Widget>, UnregisterEvent.HasUnregisterHandlers<Widget>
Widget instances and provides
z-order management and window activation behavior.| Constructor and Description |
|---|
WindowManager() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
activateNext(Widget widget)
Activates the next window in the access stack.
|
boolean |
activatePrevious(Widget widget)
Activates the previous widget in the access stack.
|
HandlerRegistration |
addRegisterHandler(RegisterEvent.RegisterHandler<Widget> handler)
Adds a
RegisterEvent handler. |
HandlerRegistration |
addUnregisterHandler(UnregisterEvent.UnregisterHandler<Widget> handler)
Adds a
UnregisterEvent handler. |
boolean |
bringToFront(Widget widget)
Brings the specified widget to the front of any other active widgets.
|
static WindowManager |
get()
Returns the singleton instance.
|
Widget |
get(String id)
Gets a registered window by id, only applies to components.
|
Widget |
getActive()
Gets the currently-active widget in the group.
|
Stack<Widget> |
getStack()
Returns the ordered widgets.
|
List<Widget> |
getWindows()
Returns the visible widgets.
|
void |
hideAll()
Hides all widgets that are registered to this WindowManager.
|
void |
register(Widget widget)
Registers the window with the WindowManager.
|
void |
sendToBack(Widget widget)
Sends the specified window to the back of other active widgets.
|
void |
unregister(Window widget)
Unregisters the window with the WindowManager.
|
public static WindowManager get()
public boolean activateNext(Widget widget)
widget - the reference windowpublic boolean activatePrevious(Widget widget)
widget - the reference windowpublic HandlerRegistration addRegisterHandler(RegisterEvent.RegisterHandler<Widget> handler)
RegisterEvent.HasRegisterHandlersRegisterEvent handler.addRegisterHandler in interface RegisterEvent.HasRegisterHandlers<Widget>handler - the handlerpublic HandlerRegistration addUnregisterHandler(UnregisterEvent.UnregisterHandler<Widget> handler)
UnregisterEvent.HasUnregisterHandlersUnregisterEvent handler.addUnregisterHandler in interface UnregisterEvent.HasUnregisterHandlers<Widget>handler - the handlerpublic boolean bringToFront(Widget widget)
Window instances will automatically call this method when focused,
all other types must call manually.widget - the windowpublic Widget get(String id)
id - the widget idpublic Widget getActive()
public void hideAll()
public void register(Widget widget)
Window instances will
automatically register and unregister themselves. All other types must
register / unregister manually.widget - the windowpublic void sendToBack(Widget widget)
widget - the widgetpublic void unregister(Window widget)
widget - the widgetCopyright © 2012. All Rights Reserved.