viewerfeature.java
来自「Java生成PDF Java生成PDF Java生成PDF」· Java 代码 · 共 124 行
JAVA
124 行
// $Id: ViewerFeature.java,v 1.38 2007/11/15 01:33:26 mike Exp $package org.faceless.pdf2.viewer2;import org.faceless.pdf2.viewer2.feature.*;import java.util.*;/** * The ViewerFeature class can be used to control the various features of the * {@link PDFViewer}, such as widgets, side panels, annotations and action handlers. * See the <a href="doc-files/tutorial.html">viewer tutorial</a> for more detail on how to use this class and the "viewer" package. * <p><i>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.</i></p> * @since 2.8 */public abstract class ViewerFeature{ private final String name; /** * Return a Collection of all the features available, which can be passed * to the {@link PDFViewer} constructor or used as a base for your * own set of features. */ public static final List getAllFeatures() { return java.util.Arrays.asList(new ViewerFeature[] { Toolbars.getInstance(), Menus.getInstance(), MultiWindow.getInstance(), ToolbarDisabling.getInstance(), ToolbarFloating.getInstance(), new Open(), new Save(), new Print(), new Info(), new Close(), new Quit(), new FullScreenMode(), new PageFirst(), new PagePrevious(), new PageNumber(), new TotalPages(), new PageNext(), new PageLast(), new ZoomFit(), new ZoomFitWidth(), new ZoomFitHeight(), new ZoomIn(), new ZoomOut(), new ZoomLevel(), new RotateClockwise(), new RotateAntiClockwise(), new ExportAsTIFF(), new InvisiblySignDocument(), new ManageIdentities(), // Panels. Would be nice to have Comments, Attachments OutlinePanel.getInstance(), ThumbnailPanel.getInstance(), SignaturePanel.getInstance(), // Form Widgets - all done FormButtonWidgetFactory.getInstance(), FormRadioButtonWidgetFactory.getInstance(), FormTextWidgetFactory.getInstance(), FormChoiceWidgetFactory.getInstance(), new FormBlankSignatureWidgetFactory(), new FormSignedSignatureWidgetFactory(), new XFA(), // General Annots. Missing FileAttachment, all markup annots, FreeText and Sound AnnotationLinkFactory.getInstance(), AnnotationNoteFactory.getInstance(), AnnotationStampFactory.getInstance(), // Action handlers. Missing GoToE, GoToR, Launch, Thread, Sound, // Movie, JavaScript, SetOCGState, Trans, GoToActionHandler.getInstance(), ShowHideActionHandler.getInstance(), FormResetActionHandler.getInstance(), FormImportDataActionHandler.getInstance(), FormSubmitActionHandler.getInstance(), AppletURLActionHandler.getInstance(), GenericNamedActionHandler.getInstance(), // Always last in Actions new SplashScreen(), new About(), new ShowConsole(), new Coordinates(), new AnnotationAdd(), }); } /** * Create a new ViewerFeature * @param name the name of the feature */ protected ViewerFeature(String name) { this.name = name; } /** * Called when the feature is first added to a viewer */ public void initialize(final PDFViewer viewer) { } /** * Return the name of this Feature */ public final String getName() { return name; } public String toString() { return name; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?