|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.Window
public class Window
This class provides access to the browser window's methods, properties, and events.
Method Summary | |
---|---|
static void |
addWindowCloseListener(WindowCloseListener listener)
Adds a listener to receive window closing events. |
static void |
addWindowResizeListener(WindowResizeListener listener)
Adds a listener to receive window resize events. |
static void |
alert(java.lang.String msg)
Displays a message in a modal dialog box. |
static boolean |
confirm(java.lang.String msg)
Displays a message in a modal dialog box, along with the standard 'OK' and 'Cancel' buttons. |
static void |
enableScrolling(boolean enable)
Use this method to explicitly disable the window's scrollbars. |
static int |
getClientHeight()
Gets the height of the browser window's client area. |
static int |
getClientWidth()
Gets the width of the browser window's client area. |
static java.lang.String |
getTitle()
Gets the browser window's current title. |
static void |
open(java.lang.String url,
java.lang.String name,
java.lang.String features)
Opens a new browser window. |
static void |
removeWindowCloseListener(WindowCloseListener listener)
Removes a window closing listener. |
static void |
removeWindowResizeListener(WindowResizeListener listener)
Removes a window resize listener. |
static void |
setMargin(java.lang.String size)
Sets the size of the margins used within the window's client area. |
static void |
setTitle(java.lang.String title)
Sets the browser window's title. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void addWindowCloseListener(WindowCloseListener listener)
listener
- the listener to be informed when the window is closingpublic static void addWindowResizeListener(WindowResizeListener listener)
listener
- the listener to be informed when the window is resizedpublic static void alert(java.lang.String msg)
msg
- the message to be displayed.public static boolean confirm(java.lang.String msg)
msg
- the message to be displayed.
true
if 'OK' is clicked, false
if
'Cancel' is clicked.public static void enableScrolling(boolean enable)
enable
- false
to disable window scrollingpublic static int getClientHeight()
public static int getClientWidth()
public static java.lang.String getTitle()
public static void open(java.lang.String url, java.lang.String name, java.lang.String features)
url
- the URL that the new window will displayname
- the name of the window (e.g. "_blank")features
- the features to be enabled/disabled on this windowpublic static void removeWindowCloseListener(WindowCloseListener listener)
listener
- the listener to be removedpublic static void removeWindowResizeListener(WindowResizeListener listener)
listener
- the listener to be removedpublic static void setMargin(java.lang.String size)
size
- the window's new margin size, in CSS units.public static void setTitle(java.lang.String title)
title
- the new window title.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |