com.vaadin.addon.touchkit.settings
Class TouchKitSettings

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

public class TouchKitSettings
extends Object
implements com.vaadin.server.BootstrapListener, com.vaadin.server.SessionInitListener, com.vaadin.server.SystemMessagesProvider

TouchKitSettings is a collection of tools that help modify various touch device related settings on the html page. The class must be bound to VaadinService and configured in an early phase to be functional.

This class should be instantiated by and used through the servlet class, which is TouchKitServlet by default.

See Also:
Serialized Form

Constructor Summary
TouchKitSettings()
          Creates and binds a TouchKitSettings instance to the VaadinService instance, which is automatically fetched from a thread local.
TouchKitSettings(com.vaadin.server.VaadinService vaadinService)
          Creates a new instance of TouchKitSettings and binds it to the given VaadinService.
 
Method Summary
 void addViewPortSettings(com.vaadin.addon.touchkit.settings.TouchKitSettings.SettingSelector<ViewPortSettings> viewPortSettingSelector)
          Adds a request dependent view port settings.
 ApplicationCacheSettings getApplicationCacheSettings()
           
 ApplicationIcons getApplicationIcons()
           
 com.vaadin.server.SystemMessages getSystemMessages(com.vaadin.server.SystemMessagesInfo systemMessagesInfo)
           
 ViewPortSettings getViewPortSettings()
           
 WebAppSettings getWebAppSettings()
           
 void modifyBootstrapFragment(com.vaadin.server.BootstrapFragmentResponse response)
           
 void modifyBootstrapPage(com.vaadin.server.BootstrapPageResponse response)
           
 void sessionInit(com.vaadin.server.SessionInitEvent event)
           
 void setApplicationCacheSettings(ApplicationCacheSettings applicationCacheSettings)
          Sets the ApplicationCacheSettings instance to use.
 void setApplicationIcons(ApplicationIcons applicationIcons)
          Sets the ApplicationIcons instance to use.
 void setViewPortSettings(ViewPortSettings viewPortSettings)
          Sets the ViewPortSettings instance to use by default.
 void setWebAppSettings(WebAppSettings iosWebAppSettings)
          Sets the WebAppSettings instance to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TouchKitSettings

public TouchKitSettings()
Creates and binds a TouchKitSettings instance to the VaadinService instance, which is automatically fetched from a thread local.


TouchKitSettings

public TouchKitSettings(com.vaadin.server.VaadinService vaadinService)
Creates a new instance of TouchKitSettings and binds it to the given VaadinService.

Parameters:
vaadinService - the vaadin service to which the new instance should be bound.
Method Detail

getViewPortSettings

public ViewPortSettings getViewPortSettings()
Returns:
The ViewPortSettings used by default.

getWebAppSettings

public WebAppSettings getWebAppSettings()
Returns:
The WebAppSettings

getApplicationIcons

public ApplicationIcons getApplicationIcons()
Returns:
The ApplicationIcons

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

sessionInit

public void sessionInit(com.vaadin.server.SessionInitEvent event)
                 throws com.vaadin.server.ServiceException
Specified by:
sessionInit in interface com.vaadin.server.SessionInitListener
Throws:
com.vaadin.server.ServiceException

getApplicationCacheSettings

public ApplicationCacheSettings getApplicationCacheSettings()
Returns:
The ApplicationCacheSettings

setApplicationCacheSettings

public void setApplicationCacheSettings(ApplicationCacheSettings applicationCacheSettings)
Sets the ApplicationCacheSettings instance to use.

Parameters:
applicationCacheSettings - the ApplicationCacheSettings instance to use.

setApplicationIcons

public void setApplicationIcons(ApplicationIcons applicationIcons)
Sets the ApplicationIcons instance to use.

Parameters:
applicationIcons - the ApplicationIcons instance to use.

setViewPortSettings

public void setViewPortSettings(ViewPortSettings viewPortSettings)
Sets the ViewPortSettings instance to use by default.

Parameters:
viewPortSettings - the ViewPortSettings instance to use.
See Also:
addViewPortSettings(SettingSelector)

addViewPortSettings

public void addViewPortSettings(com.vaadin.addon.touchkit.settings.TouchKitSettings.SettingSelector<ViewPortSettings> viewPortSettingSelector)
Adds a request dependent view port settings. If selector returns settings, it will override default view port setting.

Parameters:
viewPortSettingSelector -

setWebAppSettings

public void setWebAppSettings(WebAppSettings iosWebAppSettings)
Sets the WebAppSettings instance to use.

Parameters:
iosWebAppSettings - the WebAppSettings instance to use.

getSystemMessages

public com.vaadin.server.SystemMessages getSystemMessages(com.vaadin.server.SystemMessagesInfo systemMessagesInfo)
Specified by:
getSystemMessages in interface com.vaadin.server.SystemMessagesProvider


Copyright © 2014 Vaadin Ltd. All rights reserved.