com.vaadin.flow.server.
Class AppShellSettings
Initial page settings class for modifying the application shell.
Since:
3.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFavIcon
(Inline.Position position, String rel, String href, String sizes) Append a fav icon link to initial page head.
void
addFavIcon
(String rel, String href, String sizes) Append a fav icon link to initial page head.
void
addInlineFromFile
(Inline.Position position, String file, Inline.Wrapping type) Inline contents from classpath file to head of initial page.
void
addInlineFromFile
(TargetElement target, Inline.Position position, String file, Inline.Wrapping type) Inline contents from classpath file to head of initial page.
void
addInlineFromFile
(String file, Inline.Wrapping type) Inline contents from classpath file to append to head of initial page.
void
addInlineWithContents
(Inline.Position position, String contents, Inline.Wrapping type) Add content to head of initial page.
void
addInlineWithContents
(TargetElement target, Inline.Position position, String contents, Inline.Wrapping type) Add content to the specified target of initial page.
void
addInlineWithContents
(String contents, Inline.Wrapping type) Add content to append to head of initial page.
void
addLink
(Inline.Position position, String href) Add a link to initial page head.
void
addLink
(Inline.Position position, String rel, String href) Add a link to initial page head.
void
Add a link to initial page head.
void
Add a link to be appended to initial page head.
void
Append a link to initial page head.
void
Append a link to initial page head.
void
addMetaTag
(Inline.Position position, String name, String content) Add a meta tag to initial page head.
void
addMetaTag
(String name, String content) Add a meta tag to be appended to initial page head.
Get the web browser used for the request used for these settings.
Get the current request.
getUi()
Get the target UI instance.
void
setBodySize
(String width, String height) Set the body size.
void
setPageTitle
(String title) Set the page title.
void
setViewport
(String viewport) Set the viewport value.
-
Constructor Details
-
AppShellSettings
public AppShellSettings()
-
-
Method Details
-
getRequest
Get the current request.
Returns:
used request
-
getUi
Get the target UI instance.
Returns:
ui instance
-
getBrowser
Get the web browser used for the request used for these settings.
Returns:
browser information
-
setViewport
Set the viewport value. Since viewport can be set only once per page, call to this method will have preference over the
Viewport
annotation. If the method is called multiple times, the last one will be used.Parameters:
viewport
- viewport value to set -
setBodySize
Set the body size. If the method is called multiple times, the last one will be used.
Parameters:
width
- body withheight
- body height -
setPageTitle
Set the page title. If the method is called multiple times, the last one will be used.
Parameters:
title
- title -
addInlineFromFile
Inline contents from classpath file to append to head of initial page.
Parameters:
file
- dependency file to read and write to headtype
- dependency type -
addInlineFromFile
Inline contents from classpath file to head of initial page.
Parameters:
position
- prepend or appendfile
- dependency file to read and write to headtype
- dependency type -
addInlineFromFile
public void addInlineFromFile(TargetElement target, Inline.Position position, String file, Inline.Wrapping type) Inline contents from classpath file to head of initial page.
Parameters:
target
- head of bodyposition
- prepend or appendfile
- dependency file to read and write to headtype
- dependency type -
addInlineWithContents
Add content to append to head of initial page.
Parameters:
contents
- inline content to be added to the pagetype
- type of content which can be JavaScript or Stylesheet (CSS) -
addInlineWithContents
Add content to head of initial page.
Parameters:
position
- prepend or appendcontents
- inline content to be added to the pagetype
- type of content which can be JavaScript or Stylesheet (CSS) -
addInlineWithContents
public void addInlineWithContents(TargetElement target, Inline.Position position, String contents, Inline.Wrapping type) Add content to the specified target of initial page.
Parameters:
target
- head of bodyposition
- prepend or appendcontents
- inline content to be added to the pagetype
- type of content which can be JavaScript or Stylesheet (CSS) -
addLink
Add a link to be appended to initial page head.
Parameters:
href
- link href -
addLink
Add a link to initial page head.
Parameters:
position
- prepend or appendhref
- link href -
addLink
Append a link to initial page head.
Parameters:
href
- location of the linked documentattributes
- map of attributes for link element -
addLink
Add a link to initial page head.
Parameters:
position
- prepend or appendhref
- location of the linked documentattributes
- map of attributes for link element -
addLink
Append a link to initial page head.
Parameters:
rel
- link relationshiphref
- location of the linked document -
addLink
Add a link to initial page head.
Parameters:
position
- prepend or appendrel
- link relationshiphref
- location of the linked document -
addFavIcon
Append a fav icon link to initial page head.
Parameters:
rel
- link relationshiphref
- location of the fav iconsizes
- size of the linked fav icon -
addFavIcon
Append a fav icon link to initial page head.
Parameters:
position
- prepend or appendrel
- link relationshiphref
- location of the fav iconsizes
- size of the linked fav icon -
addMetaTag
Add a meta tag to be appended to initial page head.
Parameters:
name
- meta tag namecontent
- meta tag content -
addMetaTag
Add a meta tag to initial page head.
Parameters:
position
- prepend or appendname
- meta tag namecontent
- meta tag content
-