Package org.eclipse.ui.internal

# Class NavigationHistoryAction

java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.jface.action.AbstractAction
org.eclipse.jface.action.Action
org.eclipse.ui.actions.PartEventAction
org.eclipse.ui.internal.PageEventAction
org.eclipse.ui.internal.NavigationHistoryAction

All Implemented Interfaces:
  `IAction`, `ActionFactory.IWorkbenchAction`, `IPageListener`, `IPartListener`

public class NavigationHistoryAction extends PageEventAction
The `NavigationHistoryAction` moves navigation history back and forward.

## Field Summary

### Fields inherited from interface org.eclipse.jface.action.IAction

`AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT`

## Constructor Summary

Constructors
Constructor
Description
`NavigationHistoryAction(IWorkbenchWindow window, boolean forward)`
Create a new instance of `NavigationHistoryAction`

## Method Summary

Modifier and Type
Method
Description
`void`
`dispose()`
The `PageEventAction` implementation of this `ActionFactory.IWorkbenchAction` method deregisters the part and page listener adding by the constructor.
`void`
`pageActivated(IWorkbenchPage page)`
The `PageEventAction` implementation of this `IPageListener` method records that the given page is active.
`void`
`pageClosed(IWorkbenchPage page)`
The `PageEventAction` implementation of this `IPageListener` method clears the active page if it just closed.
`void`
`run()`
The default implementation of this `IAction` method does nothing.
`void`
`update()`

### Methods inherited from class org.eclipse.ui.internal.PageEventAction

`getActivePage, getWorkbenchWindow, pageOpened`

### Methods inherited from class org.eclipse.ui.actions.PartEventAction

`getActivePart, partActivated, partBroughtToTop, partClosed, partDeactivated, partOpened`

### Methods inherited from class org.eclipse.jface.action.Action

`convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText`

### Methods inherited from class org.eclipse.jface.action.AbstractAction

`addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener`

### Methods inherited from class org.eclipse.core.commands.common.EventManager

`addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject`

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.eclipse.jface.action.IAction

`addPropertyChangeListener, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, removePropertyChangeListener, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText`

## Constructor Details

### NavigationHistoryAction

public NavigationHistoryAction(IWorkbenchWindow window, boolean forward)
Create a new instance of `NavigationHistoryAction`

Parameters:
  `window` - the workbench window this action applies to
  `forward` - if this action should move history forward of backward

## Method Details

### dispose

public void dispose()
Description copied from class: `PageEventAction`
The `PageEventAction` implementation of this `ActionFactory.IWorkbenchAction` method deregisters the part and page listener adding by the constructor. Subclasses should extend this method to do additional cleanup.

Specified by:
  `dispose` in interface `ActionFactory.IWorkbenchAction`
Overrides:
  `dispose` in class `PageEventAction`

### pageClosed

public void pageClosed(IWorkbenchPage page)
Description copied from class: `PageEventAction`
The `PageEventAction` implementation of this `IPageListener` method clears the active page if it just closed. Subclasses may extend this method if action availability has to be recalculated.

Specified by:
  `pageClosed` in interface `IPageListener`
Overrides:
  `pageClosed` in class `PageEventAction`
Parameters:
  `page` - the page that was closed
See Also:
  - `IWorkbenchPage.close()`

### pageActivated

public void pageActivated(IWorkbenchPage page)
Description copied from class: `PageEventAction`
The `PageEventAction` implementation of this `IPageListener` method records that the given page is active. Subclasses may extend this method if action availability has to be recalculated.

Specified by:
  `pageActivated` in interface `IPageListener`
Overrides:
  `pageActivated` in class `PageEventAction`
Parameters:
  `page` - the page that was activated
See Also:
  - `IWorkbenchWindow.setActivePage(org.eclipse.ui.IWorkbenchPage)`

### run

public void run()
Description copied from class: `Action`
The default implementation of this `IAction` method does nothing. Subclasses should override this method if they do not need information from the triggering event, or override `runWithEvent(Event)` if they do.

Specified by:
  `run` in interface `IAction`
Overrides:
  `run` in class `Action`
See Also:
  - `How radio buttons are handled`
  - `How check boxes are handled`

### update

public void update()