Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
book-of-vaadin.pdf
Скачиваний:
88
Добавлен:
24.03.2015
Размер:
13.43 Mб
Скачать

Mobile Applications with TouchKit

22.5.1. NavigationView

The NavigationView is a layout component that consists of a navigation bar and a content area. The content area is scrollable, so there is no need to use an inner panel component. In addition, there can be an optional toolbar component at the bottom of the view. A NavigationView is often used inside a NavigationManager to get view change animations.

Figure 22.3. Layout of the NavigationView

NavigationView has a full size by default. The content area is expanding, so that it takes all the space left over from the navigation bar and toolbar.

Navigation Bar

The navigation bar at the top of NavigationView is a NavigationBar component. It has two component slots, with one on the left and one on the right. The caption is displayed in the middle. The NavigationBar can be used elsewhere as well, such as for a view containing a form with save and cancel buttons in the upper right and left corners.

When the NavigationBar is used for navigation and you set the previous component with setPreviousComponent(), the left slot is automatically filled with a Back button. This is done automatically if you use the NavigationView inside a NavigationManager.

You can get access to the navigation bar component with getNavigationBar() to use its manipulator methods directly, but NavigationView also offers some shorthand methods: setLeftComponent(), setRightComponent(), and a setter and a getter for the caption.

NavigationView

485

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]