|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.server.Page
public class Page
| Nested Class Summary | |
|---|---|
static class |
Page.BrowserWindowResizeEvent
Event that is fired when a browser window containing a uI is resized. |
static interface |
Page.BrowserWindowResizeListener
Listener that gets notified when the size of the browser window containing the uI has changed. |
static class |
Page.FragmentChangedEvent
Event fired when uri fragment changes. |
static interface |
Page.FragmentChangedListener
Listener that listens changes in URI fragment. |
| Field Summary | |
|---|---|
static com.vaadin.shared.ui.BorderStyle |
BORDER_DEFAULT
Deprecated. from 7.0, use BorderStyle.DEFAULT instead. |
static com.vaadin.shared.ui.BorderStyle |
BORDER_MINIMAL
Deprecated. from 7.0, use BorderStyle.MINIMAL instead. |
static com.vaadin.shared.ui.BorderStyle |
BORDER_NONE
Deprecated. from 7.0, use BorderStyle.NONE instead. |
| Constructor Summary | |
|---|---|
Page(UI uI)
|
|
| Method Summary | |
|---|---|
void |
addBrowserWindowResizeListener(Page.BrowserWindowResizeListener resizeListener)
Adds a new Page.BrowserWindowResizeListener to this uI. |
void |
addFragmentChangedListener(Page.FragmentChangedListener listener)
|
void |
addListener(Page.BrowserWindowResizeListener resizeListener)
Deprecated. Since 7.0, replaced by addBrowserWindowResizeListener(BrowserWindowResizeListener) |
void |
addListener(Page.FragmentChangedListener listener)
Deprecated. Since 7.0, replaced by addFragmentChangedListener(FragmentChangedListener) |
int |
getBrowserWindowHeight()
Gets the last known height of the browser window in which this UI resides. |
int |
getBrowserWindowWidth()
Gets the last known width of the browser window in which this uI resides. |
static Page |
getCurrent()
Gets the Page to which the current uI belongs. |
java.lang.String |
getFragment()
Gets currently set URI fragment. |
JavaScript |
getJavaScript()
|
WebBrowser |
getWebBrowser()
|
void |
init(VaadinRequest request)
|
void |
open(Resource resource,
java.lang.String windowName,
int width,
int height,
com.vaadin.shared.ui.BorderStyle border)
Deprecated. only retained to maintain compatibility with LegacyWindow.open methods. See documentation for UI.LegacyWindow.open(Resource, String, int, int, BorderStyle)
for discussion about replacing API. |
void |
open(java.lang.String url,
java.lang.String windowName)
Opens the given URL in a window with the given name. |
void |
open(java.lang.String url,
java.lang.String windowName,
int width,
int height,
com.vaadin.shared.ui.BorderStyle border)
Opens the given URL in a window with the given size, border and name. |
void |
paintContent(PaintTarget target)
|
void |
removeBrowserWindowResizeListener(Page.BrowserWindowResizeListener resizeListener)
Removes a Page.BrowserWindowResizeListener from this UI. |
void |
removeFragmentChangedListener(Page.FragmentChangedListener listener)
|
void |
removeListener(Page.BrowserWindowResizeListener resizeListener)
Deprecated. Since 7.0, replaced by removeBrowserWindowResizeListener(BrowserWindowResizeListener) |
void |
removeListener(Page.FragmentChangedListener listener)
Deprecated. Since 7.0, replaced by removeFragmentChangedListener(FragmentChangedListener) |
void |
setBrowserWindowSize(int width,
int height)
Updates the internal state with the given values. |
void |
setFragment(java.lang.String newFragment)
Sets URI fragment. |
void |
setFragment(java.lang.String newFragment,
boolean fireEvents)
Sets URI fragment. |
void |
setLocation(java.lang.String url)
Navigates this page to the given URL. |
void |
setTitle(java.lang.String title)
Sets the page title. |
void |
showNotification(Notification notification)
Deprecated. Use Notification.show(Page) instead. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Deprecated public static final com.vaadin.shared.ui.BorderStyle BORDER_NONE
BorderStyle.NONE instead.@Deprecated public static final com.vaadin.shared.ui.BorderStyle BORDER_MINIMAL
BorderStyle.MINIMAL instead.@Deprecated public static final com.vaadin.shared.ui.BorderStyle BORDER_DEFAULT
BorderStyle.DEFAULT instead.| Constructor Detail |
|---|
public Page(UI uI)
| Method Detail |
|---|
public void addFragmentChangedListener(Page.FragmentChangedListener listener)
@Deprecated public void addListener(Page.FragmentChangedListener listener)
addFragmentChangedListener(FragmentChangedListener)
public void removeFragmentChangedListener(Page.FragmentChangedListener listener)
@Deprecated public void removeListener(Page.FragmentChangedListener listener)
removeFragmentChangedListener(FragmentChangedListener)
public void setFragment(java.lang.String newFragment,
boolean fireEvents)
Page.FragmentChangedEvent
newFragment - id of the new fragmentfireEvent - true to fire eventPage.FragmentChangedEvent,
Page.FragmentChangedListenerpublic void setFragment(java.lang.String newFragment)
Page.FragmentChangedEvent
newFragment - id of the new fragmentPage.FragmentChangedEvent,
Page.FragmentChangedListenerpublic java.lang.String getFragment()
To listen changes in fragment, hook a
Page.FragmentChangedListener.
public void init(VaadinRequest request)
public WebBrowser getWebBrowser()
public void setBrowserWindowSize(int width,
int height)
width - The new widthheight - The new heightpublic void addBrowserWindowResizeListener(Page.BrowserWindowResizeListener resizeListener)
Page.BrowserWindowResizeListener to this uI. The listener
will be notified whenever the browser window within which this uI resides
is resized.
resizeListener - the listener to addBrowserWindowResizeListener#browserWindowResized(BrowserWindowResizeEvent),
#setResizeLazy(boolean)@Deprecated public void addListener(Page.BrowserWindowResizeListener resizeListener)
addBrowserWindowResizeListener(BrowserWindowResizeListener)
public void removeBrowserWindowResizeListener(Page.BrowserWindowResizeListener resizeListener)
Page.BrowserWindowResizeListener from this UI. The listener
will no longer be notified when the browser window is resized.
resizeListener - the listener to remove@Deprecated public void removeListener(Page.BrowserWindowResizeListener resizeListener)
removeBrowserWindowResizeListener(BrowserWindowResizeListener)
public int getBrowserWindowHeight()
public int getBrowserWindowWidth()
public JavaScript getJavaScript()
public void paintContent(PaintTarget target)
throws PaintException
PaintExceptionpublic void setLocation(java.lang.String url)
url - the URL to show
public void open(java.lang.String url,
java.lang.String windowName)
The supplied windowName is used as the target name in a
window.open call in the client. This means that special values such as
"_blank", "_self", "_top", "_parent" have special meaning. An empty or
null window name is also a special case.
"", null and "_self" as windowName all causes the URL to be
opened in the current window, replacing any old contents. For
downloadable content you should avoid "_self" as "_self" causes the
client to skip rendering of any other changes as it considers them
irrelevant (the page will be replaced by the response from the URL). This
can speed up the opening of a URL, but it might also put the client side
into an inconsistent state if the window content is not completely
replaced e.g., if the URL is downloaded instead of displayed in the
browser.
"_blank" as windowName causes the URL to always be opened in a
new window or tab (depends on the browser and browser settings).
"_top" and "_parent" as windowName works as specified by the HTML
standard.
Any other windowName will open the URL in a window with that
name, either by opening a new window/tab in the browser or by replacing
the contents of an existing window with that name.
Please note that opening a popup window in this way may be blocked by the
browser's popup-blocker because the new browser window is opened when
processing a response from the server. To avoid this, you should instead
use Link for opening the window because browsers are more
forgiving then the window is opened directly from a client-side click
event.
url - the URL to open.windowName - the name of the window.
public void open(java.lang.String url,
java.lang.String windowName,
int width,
int height,
com.vaadin.shared.ui.BorderStyle border)
windowName, see
open(String, String).
Please note that opening a popup window in this way may be blocked by the
browser's popup-blocker because the new browser window is opened when
processing a response from the server. To avoid this, you should instead
use Link for opening the window because browsers are more
forgiving then the window is opened directly from a client-side click
event.
url - the URL to open.windowName - the name of the window.width - the width of the window in pixelsheight - the height of the window in pixelsborder - the border style of the window.
@Deprecated
public void open(Resource resource,
java.lang.String windowName,
int width,
int height,
com.vaadin.shared.ui.BorderStyle border)
UI.LegacyWindow.open(Resource, String, int, int, BorderStyle)
for discussion about replacing API.
@Deprecated public void showNotification(Notification notification)
notification - The notification message to showNotificationpublic static Page getCurrent()
nullUI.getCurrent()public void setTitle(java.lang.String title)
title - the new page title to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||