Package io.mateu.mdd.vaadin.navigation
Class MateuViewProvider
- java.lang.Object
-
- io.mateu.mdd.vaadin.navigation.MateuViewProvider
-
- All Implemented Interfaces:
com.vaadin.navigator.ViewProvider,Serializable
public class MateuViewProvider extends Object implements com.vaadin.navigator.ViewProvider
Mateu's implementation of Vaadin's ViewProvider It basically converts a path to a View. Views are stored in a stack, so they are kept in memory and reused when possible. It also controls if the View must be opened in a new modal window or in the main plane.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MateuViewProvider(ViewStack stack)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.mateu.mdd.shared.interfaces.AppgetApp()EditorViewComponentgetCurrentEditor()intgetFirstViewInWindow()StringgetLastState()com.vaadin.navigator.ViewgetLastView()ViewStackgetStack()com.vaadin.navigator.ViewgetView(String path)This is the main method.StringgetViewName(String s)voidsetCurrentEditor(EditorViewComponent currentEditor)voidsetFirstViewInWindow(int firstViewInWindow)voidsetLastView(com.vaadin.navigator.View lastView)
-
-
-
Constructor Detail
-
MateuViewProvider
public MateuViewProvider(ViewStack stack)
-
-
Method Detail
-
setLastView
public void setLastView(com.vaadin.navigator.View lastView)
-
getLastView
public com.vaadin.navigator.View getLastView()
-
getViewName
public String getViewName(String s)
- Specified by:
getViewNamein interfacecom.vaadin.navigator.ViewProvider
-
getApp
public io.mateu.mdd.shared.interfaces.App getApp()
-
getFirstViewInWindow
public int getFirstViewInWindow()
-
setFirstViewInWindow
public void setFirstViewInWindow(int firstViewInWindow)
-
getView
public com.vaadin.navigator.View getView(String path)
This is the main method.- Specified by:
getViewin interfacecom.vaadin.navigator.ViewProvider- Parameters:
path- the path as in the browser- Returns:
- the view, or null if we do not want to update the browser url
-
getStack
public ViewStack getStack()
-
getCurrentEditor
public EditorViewComponent getCurrentEditor()
-
setCurrentEditor
public void setCurrentEditor(EditorViewComponent currentEditor)
-
getLastState
public String getLastState()
-
-