|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractComponentContainer
com.vaadin.ui.UI
com.vaadin.ui.UI.LegacyWindow
@Deprecated public static class UI.LegacyWindow
Helper class to emulate the main window from Vaadin 6 using UIs. This
class should be used in the same way as Window used as a browser level
window in Vaadin 6 with LegacyApplication
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.vaadin.ui.UI |
---|
UI.CloseEvent, UI.CloseListener, UI.LegacyWindow |
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractComponent |
---|
AbstractComponent.ComponentErrorEvent, AbstractComponent.ComponentErrorHandler |
Nested classes/interfaces inherited from interface com.vaadin.server.VariableOwner |
---|
VariableOwner.ErrorEvent |
Nested classes/interfaces inherited from interface com.vaadin.ui.Component |
---|
Component.ErrorEvent, Component.ErrorListener, Component.Event, Component.Focusable, Component.Listener |
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable |
---|
Sizeable.Unit |
Nested classes/interfaces inherited from interface com.vaadin.ui.ComponentContainer |
---|
ComponentContainer.ComponentAttachEvent, ComponentContainer.ComponentAttachListener, ComponentContainer.ComponentDetachEvent, ComponentContainer.ComponentDetachListener |
Field Summary |
---|
Fields inherited from class com.vaadin.ui.UI |
---|
actionManager |
Fields inherited from interface com.vaadin.server.Sizeable |
---|
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS |
Constructor Summary | |
---|---|
UI.LegacyWindow()
Deprecated. Create a new legacy window |
|
UI.LegacyWindow(java.lang.String caption)
Deprecated. Creates a new legacy window with the given caption |
|
UI.LegacyWindow(java.lang.String caption,
ComponentContainer content)
Deprecated. Creates a legacy window with the given caption and content layout |
Method Summary | |
---|---|
void |
addListener(Page.BrowserWindowResizeListener resizeListener)
Deprecated. As of 7.0, use the similarly named api in Page instead |
void |
executeJavaScript(java.lang.String script)
Deprecated. as of 7.0, use JavaScript.getCurrent().execute(String) instead |
LegacyApplication |
getApplication()
Deprecated. |
int |
getBrowserWindowHeight()
Deprecated. As of 7.0, use the similarly named api in Page instead |
int |
getBrowserWindowWidth()
Deprecated. As of 7.0, use the similarly named api in Page instead |
java.lang.String |
getName()
Deprecated. Gets the unique name of the window. |
java.net.URL |
getURL()
Deprecated. Gets the full URL of the window. |
protected void |
init(WrappedRequest request)
Deprecated. Initializes this UI. |
void |
open(Resource resource)
Deprecated. As of 7.0, use getPage().setLocation instead |
void |
open(Resource resource,
java.lang.String windowName)
Deprecated. As of 7.0, use getPage().open instead |
void |
open(Resource resource,
java.lang.String windowName,
int width,
int height,
com.vaadin.shared.ui.BorderStyle border)
Deprecated. As of 7.0, use getPage().open instead |
void |
removeListener(Page.BrowserWindowResizeListener resizeListener)
Deprecated. As of 7.0, use the similarly named api in Page instead |
void |
setApplication(LegacyApplication application)
Deprecated. |
void |
setCaption(java.lang.String caption)
Deprecated. Setting the caption of a UI is not supported. |
void |
setName(java.lang.String name)
Deprecated. Sets the unique name of the window. |
Methods inherited from class com.vaadin.server.AbstractClientConnector |
---|
addExtension, addMethodInvocationToQueue, createState, encodeState, getAllChildrenIterable, getConnectorId, getExtensions, getResource, getRpcManager, getRpcProxy, handleConnectorRequest, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setResource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.vaadin.server.LegacyComponent |
---|
markAsDirty |
Methods inherited from interface com.vaadin.server.VariableOwner |
---|
isEnabled, isImmediate |
Methods inherited from interface com.vaadin.ui.Component |
---|
addListener, addStyleName, attach, getCaption, getIcon, getId, getLocale, getParent, getStyleName, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setEnabled, setIcon, setId, setReadOnly, setStyleName, setVisible |
Methods inherited from interface com.vaadin.server.ClientConnector |
---|
beforeClientResponse, detach, encodeState, getExtensions, handleConnectorRequest, markAsDirtyRecursive, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setParent |
Methods inherited from interface com.vaadin.shared.Connector |
---|
getConnectorId |
Methods inherited from interface com.vaadin.server.RpcTarget |
---|
getRpcManager |
Methods inherited from interface com.vaadin.server.Sizeable |
---|
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setSizeFull, setSizeUndefined, setWidth, setWidth |
Constructor Detail |
---|
public UI.LegacyWindow()
public UI.LegacyWindow(java.lang.String caption)
caption
- the caption of the windowpublic UI.LegacyWindow(java.lang.String caption, ComponentContainer content)
caption
- content
- Method Detail |
---|
protected void init(WrappedRequest request)
UI
The WrappedRequest
can be used to get information about the
request that caused this UI to be created. WrappedRequest.BrowserDetails
will be
available in the request.
init
in class UI
request
- the wrapped request that caused this UI to be createdpublic void setApplication(LegacyApplication application)
public LegacyApplication getApplication()
public java.lang.String getName()
The name also determines the URL that can be used for direct access
to a window. All windows can be accessed through
http://host:port/app/win
where http://host:port/app
is the application URL (as returned by VaadinSession.getURL()
and win
is the window name.
Note! Portlets do not support direct window access through URLs.
public void setName(java.lang.String name)
The name also determines the URL that can be used for direct access
to a window. All windows can be accessed through
http://host:port/app/win
where http://host:port/app
is the application URL (as returned by VaadinSession.getURL()
and win
is the window name.
This method can only be called before the window is added to an application.
Note! Portlets do not support direct window access through URLs.
name
- the new name for the window or null if the application
should automatically assign a name to it
java.lang.IllegalStateException
- if the window is attached to an applicationpublic java.net.URL getURL()
Note! This method can not be used for portlets.
@Deprecated public void open(Resource resource)
Resource
.
resource
- the resource to show in this UI@Deprecated public void open(Resource resource, 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 resource 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 resource). This can
speed up the opening of a resource, but it might also put the client
side into an inconsistent state if the window content is not
completely replaced e.g., if the resource is downloaded instead of
displayed in the browser.
"_blank" as windowName
causes the resource 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 resource 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.
As of Vaadin 7.0.0, the functionality for opening a Resource in a
Page has been replaced with similar methods based on a String URL.
This is because the usage of Resource is problematic with memory
management and with security features in some browsers. Is is
recommended to instead use Link
for starting downloads.
resource
- the resource.windowName
- the name of the window.@Deprecated public void open(Resource resource, java.lang.String windowName, int width, int height, com.vaadin.shared.ui.BorderStyle border)
windowName
, see
open(Resource, String)
.
As of Vaadin 7.0.0, the functionality for opening a Resource in a
Page has been replaced with similar methods based on a String URL.
This is because the usage of Resource is problematic with memory
management and with security features in some browsers. Is is
recommended to instead use Link
for starting downloads.
resource
- the resource.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 addListener(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)
,
UI.setResizeLazy(boolean)
@Deprecated public void removeListener(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 int getBrowserWindowHeight()
@Deprecated public int getBrowserWindowWidth()
@Deprecated public void executeJavaScript(java.lang.String script)
This method allows one to inject javascript from the server to client. A client implementation is not required to implement this functionality, but currently all web-based clients do implement this.
Executing javascript this way often leads to cross-browser compatibility issues and regressions that are hard to resolve. Use of this method should be avoided and instead it is recommended to create new widgets with GWT. For more info on creating own, reusable client-side widgets in Java, read the corresponding chapter in Book of Vaadin.
script
- JavaScript snippet that will be executed.public void setCaption(java.lang.String caption)
UI
setCaption
in interface Component
setCaption
in class UI
caption
- the new caption String
for the component.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |