Class NavigateModalActionListener

  • All Implemented Interfaces:
    ActionListener, GuiseEventListener, java.util.EventListener

    public final class NavigateModalActionListener
    extends AbstractNavigateModalActionListener
    A object that listens for action events and in response modally changes the navigation. This class if declared final because it encapsulates a set of known, bounded functionality that may be deferred to the client if possible.
    Author:
    Garret Wilson
    • Constructor Detail

      • NavigateModalActionListener

        public NavigateModalActionListener​(java.lang.String navigationPath,
                                           ModalNavigationListener modalListener)
        Constructs a listener to navigate modally to the provided path.
        Parameters:
        navigationPath - A path that is either relative to the application context path or is absolute.
        modalListener - The listener to respond to the end of modal interaction.
        Throws:
        java.lang.NullPointerException - if the given path and/or modal listener is null.
        java.lang.IllegalArgumentException - if the provided path specifies a URI scheme (i.e. the URI is absolute) and/or authority (in which case NavigateModalActionListener(URI, ModalNavigationListener) should be used instead).
      • NavigateModalActionListener

        public NavigateModalActionListener​(java.net.URI navigationURI,
                                           ModalNavigationListener modalListener)
        Constructs a listener to navigate modally to the provided URI.
        Parameters:
        navigationURI - The URI for navigation when the action occurs.
        modalListener - The listener to respond to the end of modal interaction.
        Throws:
        java.lang.NullPointerException - if the given navigation URI and/or modal listener is null.
    • Method Detail

      • actionPerformed

        public void actionPerformed​(ActionEvent actionEvent)
        Called when an action is initiated.

        This implementation requests navigation from the session.

        This implementation requests modal navigation from the session.

        Specified by:
        actionPerformed in interface ActionListener
        Overrides:
        actionPerformed in class AbstractNavigateActionListener
        Parameters:
        actionEvent - The event indicating the source of the action.