Package io.guise.framework.event
Class AbstractNavigateActionListener
- java.lang.Object
-
- io.guise.framework.event.AbstractNavigateActionListener
-
- All Implemented Interfaces:
ActionListener
,GuiseEventListener
,java.util.EventListener
- Direct Known Subclasses:
AbstractNavigateModalActionListener
,NavigateActionListener
public abstract class AbstractNavigateActionListener extends java.lang.Object implements ActionListener
An abstract that listens for action events and keeps information for navigating in response.- Author:
- Garret Wilson
-
-
Constructor Summary
Constructors Constructor Description AbstractNavigateActionListener(com.globalmentor.net.URIPath navigationPath)
Constructs a listener to navigate to the provided path.AbstractNavigateActionListener(java.net.URI navigationURI)
Constructs a listener to navigate to the provided URI.AbstractNavigateActionListener(java.net.URI navigationURI, java.lang.String viewportID)
Constructs a listener to navigate to the provided URI in the identified viewport.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(ActionEvent actionEvent)
Called when an action is initiated.java.net.URI
getNavigationURI()
java.lang.String
getViewportID()
-
-
-
Constructor Detail
-
AbstractNavigateActionListener
public AbstractNavigateActionListener(com.globalmentor.net.URIPath navigationPath)
Constructs a listener to navigate to the provided path.- Parameters:
navigationPath
- A path that is either relative to the application context path or is absolute.- Throws:
java.lang.NullPointerException
- if the given path isnull
.java.lang.IllegalArgumentException
- if the provided path specifies a URI scheme (i.e. the URI is absolute) and/or authority (in which caseAbstractNavigateActionListener(URI)
should be used instead).
-
AbstractNavigateActionListener
public AbstractNavigateActionListener(java.net.URI navigationURI)
Constructs a listener to navigate to the provided URI.- Parameters:
navigationURI
- The URI for navigation when the action occurs.- Throws:
java.lang.NullPointerException
- if the given navigation URI isnull
.
-
AbstractNavigateActionListener
public AbstractNavigateActionListener(java.net.URI navigationURI, java.lang.String viewportID)
Constructs a listener to navigate to the provided URI in the identified viewport.- Parameters:
navigationURI
- The URI for navigation when the action occurs.viewportID
- The ID of the viewport in which navigation should occur, ornull
if navigation should occur in the current viewport.- Throws:
java.lang.NullPointerException
- if the given navigation URI isnull
.
-
-
Method Detail
-
getNavigationURI
public java.net.URI getNavigationURI()
- Returns:
- The requested navigation URI.
-
getViewportID
public java.lang.String getViewportID()
- Returns:
- The ID of the viewport in which navigation should occur, or
null
if navigation should occur in the current viewport..
-
actionPerformed
public void actionPerformed(ActionEvent actionEvent)
Called when an action is initiated.This implementation requests navigation from the session.
- Specified by:
actionPerformed
in interfaceActionListener
- Parameters:
actionEvent
- The event indicating the source of the action.
-
-