org.faceless.pdf2.viewer2.feature

## Class TextCopyAction

- java.lang.Object
- - org.faceless.pdf2.viewer2.ViewerFeature
  - - org.faceless.pdf2.viewer2.feature.TextCopyAction

- All Implemented Interfaces:
    DocumentPanelListener, TextSelectionAction

      public class TextCopyAction
      extends ViewerFeature
      implements TextSelectionAction, DocumentPanelListener

  A `TextSelectionAction` that will copy the selected text to the System clipboard. The name of this feature is TextCopyAction

  This code is copyright the Big Faceless Organization. You're welcome to use, modify and distribute it in any form in your own projects, provided those projects continue to make use of the Big Faceless PDF library.

  Since:
    2.11.19

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TextCopyAction()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `documentUpdated(DocumentPanelEvent event)` Called when an `DocumentPanelEvent` is raised
    `String` | `getDescription()` Get the name of this Action, to appear in the popup menu.
    `void` | `initialize(PDFViewer viewer)` Called when the feature is first added to a viewer
    `boolean` | `isEnabled()` Indicates whether this action is enabled.
    `void` | `selectAction(DocumentPanel docpanel, TextSelection.RangeList range)` Run the action.

    - ### Methods inherited from class org.faceless.pdf2.viewer2.ViewerFeature

      `getAllEnabledFeatures, getAllFeatures, getCustomJavaScript, getFeatureProperty, getFeatureURLProperty, getName, isEnabledByDefault, setFeatureName, teardown, toString`

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

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

- - ### Constructor Detail

    - #### TextCopyAction

          public TextCopyAction()

  - ### Method Detail

    - #### getDescription

          public String getDescription()

      Description copied from interface: `TextSelectionAction`
      Get the name of this Action, to appear in the popup menu.
      Specified by:
        `getDescription` in interface `TextSelectionAction`

    - #### isEnabled

          public boolean isEnabled()

      Description copied from interface: `TextSelectionAction`
      Indicates whether this action is enabled.
      Specified by:
        `isEnabled` in interface `TextSelectionAction`

    - #### initialize

          public void initialize(PDFViewer viewer)

      Description copied from class: `ViewerFeature`
      Called when the feature is first added to a viewer
      Overrides:
        `initialize` in class `ViewerFeature`

    - #### documentUpdated

          public void documentUpdated(DocumentPanelEvent event)

      Description copied from interface: `DocumentPanelListener`
      Called when an `DocumentPanelEvent` is raised
      Specified by:
        `documentUpdated` in interface `DocumentPanelListener`

    - #### selectAction

          public void selectAction(DocumentPanel docpanel,
                                   TextSelection.RangeList range)

      Description copied from interface: `TextSelectionAction`
      Run the action.
      Specified by:
        `selectAction` in interface `TextSelectionAction`
      Parameters:
        `docpanel` - the DocumentPanel this action is being run on.
        `range` - the `TextSelection.RangeList` containing the list of selected text items, which may be from multiple pages

Copyright © 2001-2015 Big Faceless Organization