com.vaadin.addon.touchkit.settings
Class WebAppSettings

java.lang.Object
  extended by com.vaadin.addon.touchkit.settings.WebAppSettings
All Implemented Interfaces:
com.vaadin.server.BootstrapListener, Serializable, EventListener

public class WebAppSettings
extends Object
implements com.vaadin.server.BootstrapListener

The WebAppSettings class is used to configure various settings that control how the application behaves when linked to from mobile devices. Some of these settings are platform specific, most introduced by Apple for their "home screen web app" concept. See the Apple Meta tags documentation for details.

See Also:
Serialized Form

Constructor Summary
WebAppSettings()
           
 
Method Summary
 String getStartupImage()
           
 String getStatusBarStyle()
           
 boolean isWebAppCapable()
           
 void modifyBootstrapFragment(com.vaadin.server.BootstrapFragmentResponse response)
           
 void modifyBootstrapPage(com.vaadin.server.BootstrapPageResponse response)
           
 void setStartupImage(String startupImage)
          Sets the image that the device may use as a place-holder while the web application is starting up - e.g splash-screen or screenshot of initial screen.
 void setStatusBarStyle(String statusBarStyle)
          Some mobile devices (like Apple's iOS devices) may allow customizing status bars appearances.
 void setWebAppCapable(boolean webAppCapable)
          Sets a header that tells the client whether the application is designed to be used as a web application rather than a web page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebAppSettings

public WebAppSettings()
Method Detail

setWebAppCapable

public void setWebAppCapable(boolean webAppCapable)
Sets a header that tells the client whether the application is designed to be used as a web application rather than a web page. If this is set to true, the client may for instance hide the browsers own UI and give more space for the web app. E.g. if app with this header is added to the home screen on an iOS device, browser controls are hidden when the application is started via the home screen icon.

Parameters:
webAppCapable - true to treat the application as a web application rather than a web page.

isWebAppCapable

public boolean isWebAppCapable()
Returns:
true if the app is to be treated as a web application instead of a web page. The default is true.
See Also:
setWebAppCapable(boolean)

setStatusBarStyle

public void setStatusBarStyle(String statusBarStyle)
Some mobile devices (like Apple's iOS devices) may allow customizing status bars appearances. See the apple-mobile-web-app-status-bar-style documentation for details.

Parameters:
statusBarStyle - The style of the status bar.

getStatusBarStyle

public String getStatusBarStyle()
Returns:
the status bar style or null if none set.
See Also:
setStatusBarStyle(String)

setStartupImage

public void setStartupImage(String startupImage)
Sets the image that the device may use as a place-holder while the web application is starting up - e.g splash-screen or screenshot of initial screen.

Parameters:
startupImage - the splash screen image to use.

getStartupImage

public String getStartupImage()
Returns:
the splash screen image used or null if none set.
See Also:
setStartupImage(String)

modifyBootstrapFragment

public void modifyBootstrapFragment(com.vaadin.server.BootstrapFragmentResponse response)
Specified by:
modifyBootstrapFragment in interface com.vaadin.server.BootstrapListener

modifyBootstrapPage

public void modifyBootstrapPage(com.vaadin.server.BootstrapPageResponse response)
Specified by:
modifyBootstrapPage in interface com.vaadin.server.BootstrapListener


Copyright © 2014 Vaadin Ltd. All rights reserved.