@Deprecated public abstract class LegacyApplication extends Object implements ErrorHandler
Constructor and Description |
---|
LegacyApplication()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addWindow(LegacyWindow uI)
Deprecated.
Adds a new browser level window to this application.
|
void |
close()
Deprecated.
|
void |
doInit(URL url)
Deprecated.
|
void |
error(ErrorEvent event)
Deprecated.
Invoked when an error occurs.
|
VaadinSession |
getContext()
Deprecated.
|
String |
getLogoutURL()
Deprecated.
Returns the URL user is redirected to on application close.
|
LegacyWindow |
getMainWindow()
Deprecated.
Gets the mainWindow of the application.
|
String |
getTheme()
Deprecated.
Gets the application's theme.
|
URL |
getURL()
Deprecated.
|
LegacyWindow |
getWindow(String name)
Deprecated.
Gets a UI by name.
|
Collection<LegacyWindow> |
getWindows()
Deprecated.
Gets the set of windows contained by the application.
|
protected abstract void |
init()
Deprecated.
|
boolean |
isRunning()
Deprecated.
|
void |
removeWindow(LegacyWindow uI)
Deprecated.
Removes the specified window from the application.
|
void |
setLogoutURL(String logoutURL)
Deprecated.
Sets the URL user is redirected to on application close.
|
void |
setMainWindow(LegacyWindow mainWindow)
Deprecated.
Sets the main window of this application.
|
void |
setTheme(String theme)
Deprecated.
Sets the application's theme.
|
public void setMainWindow(LegacyWindow mainWindow)
mainWindow
- the UI to set as the default windowpublic void doInit(URL url)
protected abstract void init()
public LegacyWindow getMainWindow()
The main window is the window attached to the application URL (
getURL()
) and thus which is show by default to the user.
Note that each application must have at least one main window.
public void setTheme(String theme)
Note that this theme can be overridden for a specific UI with
VaadinSession#getThemeForUI(UI)
. Setting theme to be
null
selects the default theme. For the available theme
names, see the contents of the VAADIN/themes directory.
theme
- the new theme for this application.public String getTheme()
null
is
returned.public LegacyWindow getWindow(String name)
Gets a UI by name. Returns null
if the application is not
running or it does not contain a window corresponding to the name.
name
- the name of the requested windownull
to use the
default windowpublic void addWindow(LegacyWindow uI)
#addWindow(UI, String)
uI
- the UI window to add to the application#addWindow(UI, String)
public void removeWindow(LegacyWindow uI)
and
#getWindowName(UI)
.
Note that removing window from the application does not close the browser window - the window is only removed from the server-side.
uI
- the UI to removepublic Collection<LegacyWindow> getWindows()
Note that the returned set of windows can not be modified.
public void error(ErrorEvent event)
ErrorHandler
error
in interface ErrorHandler
event
- the fired event.public VaadinSession getContext()
public void close()
public boolean isRunning()
public URL getURL()
public String getLogoutURL()
null
, the application is closed normally as defined by the
application running environment.
Desktop application just closes the application window and web-application redirects the browser to application main URL.
public void setLogoutURL(String logoutURL)
null
, the application is closed normally as defined by the
application running environment: Desktop application just closes the
application window and web-application redirects the browser to
application main URL.logoutURL
- the logoutURL to set.Copyright © 2019 Vaadin Ltd. All rights reserved.