|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.Window
This class provides access to the browser window's methods, properties, and events.
Field Summary |
Fields inherited from class java.lang.Object |
typeId, typeName |
Constructor Summary | |
Window()
|
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(String msg)
Displays a message in a modal dialog box. |
static boolean |
confirm(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. |
String |
getTitle()
Gets the browser window's current title. |
static void |
open(String url,
String name,
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(String size)
Sets the size of the margins used within the window's client area. |
void |
setTitle(String title)
Sets the browser window's title. |
Methods inherited from class java.lang.Object |
equals, finalize, hashCode, toString |
Constructor Detail |
public Window()
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(String msg)
public static boolean confirm(String msg)
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 void open(String url, String name, 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(String size)
size
- the window's new margin size, in CSS units.public String getTitle()
public void setTitle(String title)
title
- the new window title.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |