Runtime

## org.eclipse.gmf.runtime.diagram.ui.printing.providers
Class DiagramWithPrintGlobalActionHandler

    java.lang.Object
      org.eclipse.gmf.runtime.common.ui.services.action.global.AbstractGlobalActionHandler
          org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler
              org.eclipse.gmf.runtime.diagram.ui.printing.providers.DiagramWithPrintGlobalActionHandler

All Implemented Interfaces:
  IGlobalActionHandler

Direct Known Subclasses:
  DiagramWithPrintGlobalActionHandler

public class DiagramWithPrintGlobalActionHandler
extends DiagramGlobalActionHandler

Concrete class that implements the `IGlobalActionHandler` interface and provides a command for `GlobalActionId.PRINT`.

Constructor Summary
`DiagramWithPrintGlobalActionHandler()` Constructor for DiagramWithPrintGlobalActionHandler.

Method Summary
`boolean` `canHandle(IGlobalActionContext cntxt)` Return true if the handler can handle the context
`protected void` `doPrint(IGlobalActionContext cntxt)`
`ICommand` `getCommand(IGlobalActionContext cntxt)` Return the ICommand for the context
`protected PreferencesHint` `getPreferencesHint(IEditorPart editorPart)` Gets the preferences hint that is to be used to find the appropriate preference store from which to retrieve diagram preference values.

Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler
`canCopy, canCut, canPaste, canSave, createPasteViewRequest, getCopyCommand, getCutCommand, getMapMode, getSelectedViews, selectAddedObject`

Methods inherited from class org.eclipse.gmf.runtime.common.ui.services.action.global.AbstractGlobalActionHandler
`getLabel`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DiagramWithPrintGlobalActionHandler

    public DiagramWithPrintGlobalActionHandler()

  Constructor for DiagramWithPrintGlobalActionHandler.

Method Detail

### getCommand

    public ICommand getCommand(IGlobalActionContext cntxt)

  Description copied from interface: `IGlobalActionHandler`
  Return the ICommand for the context

  Specified by:
    `getCommand` in interface `IGlobalActionHandler`
  Overrides:
    `getCommand` in class `DiagramGlobalActionHandler`

### doPrint

    protected void doPrint(IGlobalActionContext cntxt)

  Parameters:
    `cntxt` -

### canHandle

    public boolean canHandle(IGlobalActionContext cntxt)

  Description copied from interface: `IGlobalActionHandler`
  Return true if the handler can handle the context

  Specified by:
    `canHandle` in interface `IGlobalActionHandler`
  Overrides:
    `canHandle` in class `DiagramGlobalActionHandler`

### getPreferencesHint

    protected PreferencesHint getPreferencesHint(IEditorPart editorPart)

  Gets the preferences hint that is to be used to find the appropriate preference store from which to retrieve diagram preference values. The preference hint is mapped to a preference store in the preference registry <@link DiagramPreferencesRegistry>.

  Returns:
    the preferences hint

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.