com.holonplatform.vaadin.navigator.internal

## Class DefaultViewNavigatorChangeEvent

- java.lang.Object
- - java.util.EventObject
  - - com.vaadin.navigator.ViewChangeListener.ViewChangeEvent
    - - com.holonplatform.vaadin.navigator.internal.DefaultViewNavigatorChangeEvent

- All Implemented Interfaces:
    ViewNavigator.ViewNavigatorChangeEvent, Serializable

      public class DefaultViewNavigatorChangeEvent
      extends com.vaadin.navigator.ViewChangeListener.ViewChangeEvent
      implements ViewNavigator.ViewNavigatorChangeEvent

  Default `ViewNavigator.ViewNavigatorChangeEvent` implementation.
  Since:
    5.0.0
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultViewNavigatorChangeEvent(N navigator, com.vaadin.navigator.View oldView, String oldViewName, com.vaadin.navigator.View newView, String viewName, String parameters, com.vaadin.ui.Window containerWindow)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <N extends com.vaadin.navigator.Navigator & ViewNavigator> DefaultViewNavigatorChangeEvent` | `create(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event, String oldViewName, N navigator, com.vaadin.ui.Window containerWindow)` Create a new `DefaultViewNavigatorChangeEvent` from a standard `ViewChangeListener.ViewChangeEvent`.
    `Optional<String>` | `getOldViewName()` Returns the name of the view being deactivated, if any
    `ViewNavigator` | `getViewNavigator()` Returns the navigator that triggered this event.
    `Optional<com.vaadin.ui.Window>` | `getWindow()` If the navigation to the view being activated is requested in window, returns the `Window` into which the view is displayed.

    - ### Methods inherited from class com.vaadin.navigator.ViewChangeListener.ViewChangeEvent

      `getNavigator, getNewView, getOldView, getParameterMap, getParameterMap, getParameters, getViewName`

    - ### Methods inherited from class java.util.EventObject

      `getSource, toString`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.holonplatform.vaadin.navigator.ViewNavigator.ViewNavigatorChangeEvent

      `getNewView, getOldView, getParameters, getViewName`

- - ### Constructor Detail

    - #### DefaultViewNavigatorChangeEvent

          public DefaultViewNavigatorChangeEvent(N navigator,
                                                 com.vaadin.navigator.View oldView,
                                                 String oldViewName,
                                                 com.vaadin.navigator.View newView,
                                                 String viewName,
                                                 String parameters,
                                                 com.vaadin.ui.Window containerWindow)

  - ### Method Detail

    - #### getViewNavigator

          public ViewNavigator getViewNavigator()

      Description copied from interface: `ViewNavigator.ViewNavigatorChangeEvent`
      Returns the navigator that triggered this event.
      Specified by:
        `getViewNavigator` in interface `ViewNavigator.ViewNavigatorChangeEvent`
      Returns:
        the `ViewNavigator` (not null)

    - #### getOldViewName

          public Optional<String> getOldViewName()

      Description copied from interface: `ViewNavigator.ViewNavigatorChangeEvent`
      Returns the name of the view being deactivated, if any
      Specified by:
        `getOldViewName` in interface `ViewNavigator.ViewNavigatorChangeEvent`
      Returns:
        the old View name, empty if none

    - #### getWindow

          public Optional<com.vaadin.ui.Window> getWindow()

      Description copied from interface: `ViewNavigator.ViewNavigatorChangeEvent`
      If the navigation to the view being activated is requested in window, returns the `Window` into which the view is displayed.
      Specified by:
        `getWindow` in interface `ViewNavigator.ViewNavigatorChangeEvent`
      Returns:
        Optional view container window

    - #### create

          public static <N extends com.vaadin.navigator.Navigator & ViewNavigator> DefaultViewNavigatorChangeEvent create(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event,
                                                                                                                          String oldViewName,
                                                                                                                          N navigator,
                                                                                                                          com.vaadin.ui.Window containerWindow)

      Create a new `DefaultViewNavigatorChangeEvent` from a standard `ViewChangeListener.ViewChangeEvent`.
      Parameters:
        `event` - Original `ViewChangeListener.ViewChangeEvent`
        `oldViewName` - Optional old view name
        `navigator` - View navigator source of the event
        `containerWindow` - Optional View Window
      Returns:
        A new `DefaultViewNavigatorChangeEvent`

Copyright © 2019 The Holon Platform. All rights reserved.