|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vaadin.server.AbstractClientConnector com.vaadin.ui.AbstractComponent com.vaadin.ui.AbstractComponentContainer com.vaadin.addon.touchkit.ui.NavigationView
public class NavigationView
The NavigationView is a component container which integrates well with the
NavigationManager
. It consists of a NavigationBar
, a content
area, and optionally a Toolbar
.
The content area is scrollable (i.e. no need to use a Panel
in it).
The NavigationView
is most commonly used with a
NavigationManager
which provides smooth forward/back animations.
In addition to the main content area (set with setContent(Component)
), a NavigationView
can contain a secondary component which, by
default, is positioned at the bottom of the layout. The secondary content is
set with setToolbar(Component)
, and is usually a Toolbar
.
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 | |
---|---|
NavigationView()
Constructs a NavigationView with an empty CssLayout as its
content. |
|
NavigationView(com.vaadin.ui.Component content)
Constructs a NavigationView with the given content. |
|
NavigationView(String caption)
Constructs a NavigationView with the given caption and an empty CssLayout as its content. |
|
NavigationView(String caption,
com.vaadin.ui.Component content)
Constructs a NavigationView with the given caption and content. |
Method Summary | |
---|---|
void |
addComponent(com.vaadin.ui.Component c)
Deprecated. use setContent or setToolbar instead |
String |
getCaption()
|
int |
getComponentCount()
|
Iterator<com.vaadin.ui.Component> |
getComponentIterator()
|
com.vaadin.ui.Component |
getContent()
|
com.vaadin.ui.Component |
getLeftComponent()
|
NavigationBar |
getNavigationBar()
|
NavigationManager |
getNavigationManager()
Gets the @link NavigationManager in which this view is contained. |
com.vaadin.ui.Component |
getPreviousComponent()
|
com.vaadin.ui.Component |
getRightComponent()
|
int |
getScrollPosition()
|
NavigationViewState |
getState()
|
com.vaadin.ui.Component |
getToolbar()
|
Iterator<com.vaadin.ui.Component> |
iterator()
|
protected void |
onBecomingVisible()
Called by NavigationManager when the view is about to become
visible. |
void |
removeAllComponents()
Removes the toolbar, and the current content (setting the content to an empty CssLayout ). |
void |
removeComponent(com.vaadin.ui.Component c)
The toolbar or content can be removed - other attempts will result in an IllegalArgumentException . |
void |
replaceComponent(com.vaadin.ui.Component oldComponent,
com.vaadin.ui.Component newComponent)
The main content and the toolbar can be replaced - other attempts will result in an IllegalArgumentException |
void |
setCaption(String caption)
|
void |
setContent(com.vaadin.ui.Component c)
Sets the main content of the NavigationView. |
void |
setLeftComponent(com.vaadin.ui.Component c)
Sets the component in the navigation bar's left slot. |
void |
setPreviousComponent(com.vaadin.ui.Component component)
|
void |
setRightComponent(com.vaadin.ui.Component c)
Sets the component in the navigation bar's right slot. |
void |
setScrollPosition(int scrollPosition)
Scrolls the view to the specified position. |
void |
setToolbar(com.vaadin.ui.Component toolbar)
Sets the toolbar component, usually a Toolbar . |
Methods inherited from class com.vaadin.ui.AbstractComponentContainer |
---|
addComponentAttachListener, addComponentDetachListener, addComponents, addListener, addListener, fireComponentAttachEvent, fireComponentDetachEvent, moveComponentsFrom, removeComponentAttachListener, removeComponentDetachListener, removeListener, removeListener, setHeight, setWidth |
Methods inherited from class com.vaadin.ui.AbstractComponent |
---|
addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getState, getStyleName, getWidth, getWidthUnits, isConnectorEnabled, isEnabled, isImmediate, isReadOnly, isVisible, removeListener, removeShortcutListener, removeStyleName, 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, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, 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 |
---|
public NavigationView(com.vaadin.ui.Component content)
content
- public NavigationView()
CssLayout
as its
content.
public NavigationView(String caption)
CssLayout
as its content.
caption
- the captionpublic NavigationView(String caption, com.vaadin.ui.Component content)
caption
- the captioncontent
- the contentMethod Detail |
---|
public void setContent(com.vaadin.ui.Component c)
CssLayout
will be used.
c
- the component to set as the contentpublic com.vaadin.ui.Component getContent()
@Deprecated public void addComponent(com.vaadin.ui.Component c)
addComponent
in interface com.vaadin.ui.ComponentContainer
addComponent
in class com.vaadin.ui.AbstractComponentContainer
public void removeComponent(com.vaadin.ui.Component c)
IllegalArgumentException
. If the content is removed, an empty
CssLayout
is set as the content.
removeComponent
in interface com.vaadin.ui.ComponentContainer
removeComponent
in class com.vaadin.ui.AbstractComponentContainer
public void removeAllComponents()
CssLayout
).
removeAllComponents
in interface com.vaadin.ui.ComponentContainer
removeAllComponents
in class com.vaadin.ui.AbstractComponentContainer
public NavigationBar getNavigationBar()
NavigationBar
public void setRightComponent(com.vaadin.ui.Component c)
c
- the component to set in the right slot.public com.vaadin.ui.Component getRightComponent()
public void setLeftComponent(com.vaadin.ui.Component c)
c
- the component to set in the left slot.public com.vaadin.ui.Component getLeftComponent()
public com.vaadin.ui.Component getPreviousComponent()
NavigationBar.getPreviousView()
public void setPreviousComponent(com.vaadin.ui.Component component)
NavigationBar.setPreviousView(Component)
public void setCaption(String caption)
setCaption
in interface com.vaadin.ui.Component
setCaption
in class com.vaadin.ui.AbstractComponent
public String getCaption()
getCaption
in interface com.vaadin.ui.Component
getCaption
in class com.vaadin.ui.AbstractComponent
protected void onBecomingVisible()
NavigationManager
when the view is about to become
visible.
public void replaceComponent(com.vaadin.ui.Component oldComponent, com.vaadin.ui.Component newComponent)
IllegalArgumentException
public Iterator<com.vaadin.ui.Component> getComponentIterator()
getComponentIterator
in interface com.vaadin.ui.ComponentContainer
getComponentIterator
in class com.vaadin.ui.AbstractComponentContainer
public void setToolbar(com.vaadin.ui.Component toolbar)
Toolbar
. If a previous
toolbar is set, it is removed from the layout and forgotten.
toolbar
- The component to put in the toolbar slot.public com.vaadin.ui.Component getToolbar()
public NavigationViewState getState()
getState
in class com.vaadin.ui.AbstractComponent
public void setScrollPosition(int scrollPosition)
scrollPosition
- the position to scroll to (y coordinate).public int getScrollPosition()
public NavigationManager getNavigationManager()
NavigationManager
in which this view is contained.
NavigationManager
or null if not inside one.public int getComponentCount()
public Iterator<com.vaadin.ui.Component> iterator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |