Class GenericNamedActionHandler
- java.lang.Object
-
- org.faceless.pdf2.viewer2.ViewerFeature
-
- org.faceless.pdf2.viewer2.ActionHandler
-
- org.faceless.pdf2.viewer2.feature.GenericNamedActionHandler
-
public class GenericNamedActionHandler extends ActionHandler
Create an action handler to handle "Named" actions. Unlike most of the ActionHandler features, this one will only work inside aPDFViewer
- applying it to a standaloneDocumentPanel
won't work. In addition this is intended as a generic fallback handler, and so should always be added after any more specific handlers. The name of this feature is GenericNamedActionHandlerThis 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.8
-
-
Constructor Summary
Constructors Constructor Description GenericNamedActionHandler()
Create a new GenericNamedActionHandler
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matches(DocumentPanel panel, PDFAction action)
Return true if this ActionFactory can handle the specifiedPDFAction
static void
run(DocumentPanel docpanel, String action)
Run the specified "named" action.void
run(DocumentPanel docpanel, PDFAction action)
Run the specified action-
Methods inherited from class org.faceless.pdf2.viewer2.ActionHandler
toString
-
Methods inherited from class org.faceless.pdf2.viewer2.ViewerFeature
getAllEnabledFeatures, getAllFeatures, getCustomJavaScript, getFeatureProperty, getFeatureURLProperty, getName, initialize, isEnabledByDefault, setFeatureName, teardown
-
-
-
-
Method Detail
-
matches
public boolean matches(DocumentPanel panel, PDFAction action)
Description copied from class:ActionHandler
Return true if this ActionFactory can handle the specifiedPDFAction
- Specified by:
matches
in classActionHandler
-
run
public void run(DocumentPanel docpanel, PDFAction action)
Description copied from class:ActionHandler
Run the specified action- Specified by:
run
in classActionHandler
- Parameters:
docpanel
- the DocumentPanel running the actionaction
- the action
-
run
public static void run(DocumentPanel docpanel, String action)
Run the specified "named" action.- Parameters:
docpanel
- the active DocumentPanelaction
- the named action to run- Since:
- 2.11.12
-
-