com.jasperassistant.designer.viewer.actions
Class ExportMenuAction

java.lang.Object
  extended byorg.eclipse.jface.action.Action
      extended bycom.jasperassistant.designer.viewer.actions.AbstractReportViewerAction
          extended bycom.jasperassistant.designer.viewer.actions.ExportMenuAction
All Implemented Interfaces:
java.util.EventListener, org.eclipse.jface.action.IAction, org.eclipse.jface.action.IMenuCreator, IReportViewerListener

public class ExportMenuAction
extends AbstractReportViewerAction
implements org.eclipse.jface.action.IMenuCreator

Export menu action. Provides a pull down menu that can be used to place specific export action.

Author:
Peter Severin (peter_p_s@users.sourceforge.net)

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, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
 
Constructor Summary
ExportMenuAction(IReportViewer viewer)
           
 
Method Summary
protected  boolean calculateEnabled()
          Calculates the enablement condition
 void dispose()
          An explicit dispose method that must be called in case when the action is removed from its container dynamically (as opposed to the static toolbar/menu constructed only once).
 org.eclipse.jface.action.IAction getDefaultAction()
           
 org.eclipse.swt.widgets.Menu getMenu(org.eclipse.swt.widgets.Control parent)
           
 org.eclipse.swt.widgets.Menu getMenu(org.eclipse.swt.widgets.Menu parent)
           
 org.eclipse.jface.action.MenuManager getMenuManager()
          Returns the menu manager associated with this action.
 void run()
           
 void setDefaultAction(org.eclipse.jface.action.IAction defaultAction)
          Sets the default action that gets executed when the menu button is clicked.
 
Methods inherited from class com.jasperassistant.designer.viewer.actions.AbstractReportViewerAction
getReportViewer, runBusy, viewerStateChanged
 
Methods inherited from class org.eclipse.jface.action.Action
addPropertyChangeListener, convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, firePropertyChange, firePropertyChange, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, notifyResult, removeAcceleratorText, removeMnemonics, removePropertyChangeListener, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExportMenuAction

public ExportMenuAction(IReportViewer viewer)
See Also:
AbstractReportViewerAction.AbstractReportViewerAction(IReportViewer)
Method Detail

calculateEnabled

protected boolean calculateEnabled()
Description copied from class: AbstractReportViewerAction
Calculates the enablement condition

Specified by:
calculateEnabled in class AbstractReportViewerAction
Returns:
true if the action should be enabled
See Also:
AbstractReportViewerAction.calculateEnabled()

run

public void run()
Specified by:
run in interface org.eclipse.jface.action.IAction
Overrides:
run in class AbstractReportViewerAction
See Also:
AbstractReportViewerAction.run()

getMenuManager

public org.eclipse.jface.action.MenuManager getMenuManager()
Returns the menu manager associated with this action. Actions added to the menu manager will appear in the drop-down menu.

Returns:
the menu manager

dispose

public void dispose()
Description copied from class: AbstractReportViewerAction
An explicit dispose method that must be called in case when the action is removed from its container dynamically (as opposed to the static toolbar/menu constructed only once). Calling this method will detach the action from the associated report viewer.

Specified by:
dispose in interface org.eclipse.jface.action.IMenuCreator
Overrides:
dispose in class AbstractReportViewerAction
See Also:
AbstractReportViewerAction.dispose()

getMenu

public org.eclipse.swt.widgets.Menu getMenu(org.eclipse.swt.widgets.Control parent)
Specified by:
getMenu in interface org.eclipse.jface.action.IMenuCreator
See Also:
IMenuCreator.getMenu(org.eclipse.swt.widgets.Control)

getMenu

public org.eclipse.swt.widgets.Menu getMenu(org.eclipse.swt.widgets.Menu parent)
Specified by:
getMenu in interface org.eclipse.jface.action.IMenuCreator
See Also:
IMenuCreator.getMenu(org.eclipse.swt.widgets.Menu)

getDefaultAction

public org.eclipse.jface.action.IAction getDefaultAction()
Returns:
the default action
See Also:
setDefaultAction(IAction)

setDefaultAction

public void setDefaultAction(org.eclipse.jface.action.IAction defaultAction)
Sets the default action that gets executed when the menu button is clicked.

Parameters:
defaultAction - the default action