com.vaadin.addon.touchkit.ui
Class SwipeView

java.lang.Object
  extended by com.vaadin.server.AbstractClientConnector
      extended by com.vaadin.ui.AbstractComponent
          extended by com.vaadin.ui.AbstractSingleComponentContainer
              extended by com.vaadin.addon.touchkit.ui.SwipeView
All Implemented Interfaces:
com.vaadin.event.MethodEventSource, com.vaadin.server.ClientConnector, com.vaadin.server.Sizeable, com.vaadin.shared.Connector, com.vaadin.ui.Component, com.vaadin.ui.HasComponents, com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.SingleComponentContainer, Serializable, Iterable<com.vaadin.ui.Component>

public class SwipeView
extends com.vaadin.ui.AbstractSingleComponentContainer

The SwipeView is a simple layout which has a scrollable content area. It is meant to be used inside a NavigationManager where it controls its parent on horizontal swipe gestures aka horizontal scrolls. Swiping navigates forward/backward in the NavigationManager.

To make usage as fluent as possible, it is suggested to set both next and previous component in the NavigationManager. This can be done using a NavigationManager.NavigationListener.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents
com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListener
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
 
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
 
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
com.vaadin.server.Sizeable.Unit
 
Field Summary
 
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
SwipeView()
          Constructs a SwipeView.
SwipeView(com.vaadin.ui.Component content)
          Constructs a SwipeView with the given Component as its content.
SwipeView(String caption)
          Constructs a SwipeView with the given caption.
 
Method Summary
 NavigationManager getNavigationManager()
           
 int getScrollPosition()
           
 SwipeViewSharedState getState()
           
 void setScrollPosition(int scrollPosition)
          Sets the vertical scroll position
 
Methods inherited from class com.vaadin.ui.AbstractSingleComponentContainer
addComponentAttachListener, addComponentDetachListener, fireComponentAttachEvent, fireComponentDetachEvent, getComponentCount, getContent, iterator, removeComponentAttachListener, removeComponentDetachListener, removeFromParent, setContent, setHeight, setWidth
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getState, getStyleName, getWidth, getWidthUnits, isConnectorEnabled, isEnabled, isImmediate, isReadOnly, isVisible, removeListener, removeShortcutListener, removeStyleName, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setIcon, setId, setImmediate, setLocale, setParent, setPrimaryStyleName, setReadOnly, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth
 
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hasListeners, isAttached, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, 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.ui.Component
addListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible
 
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
 
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
 
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setSizeFull, setSizeUndefined, setWidth
 

Constructor Detail

SwipeView

public SwipeView()
Constructs a SwipeView.


SwipeView

public SwipeView(String caption)
Constructs a SwipeView with the given caption.

Parameters:
caption - the caption

SwipeView

public SwipeView(com.vaadin.ui.Component content)
Constructs a SwipeView with the given Component as its content.

Parameters:
content - the component to be wrapped in SwipeView
Method Detail

getState

public SwipeViewSharedState getState()
Overrides:
getState in class com.vaadin.ui.AbstractComponent

setScrollPosition

public void setScrollPosition(int scrollPosition)
Sets the vertical scroll position

Parameters:
scrollPosition - the vertical scroll position (y-coordinate)

getScrollPosition

public int getScrollPosition()
Returns:
the vertical scroll position.

getNavigationManager

public NavigationManager getNavigationManager()
Returns:
the parent NavigationManager or null if not inside one


Copyright © 2014 Vaadin Ltd. All rights reserved.