|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vaadin.navigator.Navigator.ClassBasedViewProvider
public static class Navigator.ClassBasedViewProvider
View provider which maps a single view name to a class to instantiate for
the view.
Note that the view class must be accessible by the class loader used by
the provider. This may require its visibility to be public.
This class is primarily for internal use by Navigator
.
Constructor Summary | |
---|---|
Navigator.ClassBasedViewProvider(String viewName,
Class<? extends View> viewClass)
Create a new view provider which creates new view instances based on a view class. |
Method Summary | |
---|---|
View |
getView(String viewName)
Create or return a pre-created instance of a view. |
Class<? extends View> |
getViewClass()
Get the view class for this provider. |
String |
getViewName()
Get the view name for this provider. |
String |
getViewName(String viewAndParameters)
Extract the view name from a combined view name and parameter string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Navigator.ClassBasedViewProvider(String viewName, Class<? extends View> viewClass)
viewName
- name of the views to create (not null)viewClass
- class to instantiate when a view is requested (not null)Method Detail |
---|
public String getViewName(String viewAndParameters)
ViewProvider
getViewName
in interface ViewProvider
viewAndParameters
- string with view name and its fragment parameters (if given),
not null
public View getView(String viewName)
ViewProvider
getView
in interface ViewProvider
viewName
- name of the view, not null
public String getViewName()
public Class<? extends View> getViewClass()
View
class
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |