org.faceless.pdf2.viewer2.feature
Class MarkupSelectionAction

java.lang.Object
  extended by org.faceless.pdf2.viewer2.ViewerFeature
      extended by org.faceless.pdf2.viewer2.feature.TextSelectionAction
          extended by org.faceless.pdf2.viewer2.feature.MarkupSelectionAction
Direct Known Subclasses:
HighlightSelectionAction, StrikeOutSelectionAction, UnderlineSelectionAction

public class MarkupSelectionAction
extends TextSelectionAction

A TextSelectionAction that will create an AnnotationMarkup of the specified type on the selected text.

The following initialization parameters can be specified to configure this feature.
colorA 32-bit color value, eg 0x80FF0000 (for translucent red)
typeThe type of Markup - Highlight, Underline, StrikeOut or Squiggly
descriptionThe description of this markup

Since:
2.11.7

Constructor Summary
MarkupSelectionAction(String name)
           
 
Method Summary
 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
 void selectAction(DocumentPanel docpanel, TextSelection.RangeList list)
          Run the action.
 void setColor(Color color)
           
 void setDescription(String desc)
          Set the description that's returned by getDescription()
 void setType(String type)
          Set the type of AnnotationMarkup.
 
Methods inherited from class org.faceless.pdf2.viewer2.ViewerFeature
getAllEnabledFeatures, getAllFeatures, getCustomJavaScript, getFeatureProperty, getName, isEnabledByDefault, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MarkupSelectionAction

public MarkupSelectionAction(String name)
Method Detail

setDescription

public void setDescription(String desc)
Set the description that's returned by getDescription()


getDescription

public String getDescription()
Description copied from class: TextSelectionAction
Get the name of this Action, to appear in the popup menu.

Specified by:
getDescription in class TextSelectionAction

setType

public void setType(String type)
Set the type of AnnotationMarkup.

Parameters:
type - one of "Highlight", "Underline", "StrikeOut" or "Squiggly"

setColor

public void setColor(Color color)

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

selectAction

public void selectAction(DocumentPanel docpanel,
                         TextSelection.RangeList list)
Description copied from class: TextSelectionAction
Run the action.

Specified by:
selectAction in class TextSelectionAction
Parameters:
docpanel - the DocumentPanel this action is being run on.
list - the TextSelection.RangeList containing the list of selected text items


Copyright © 2001-2009 Big Faceless Organization