org.faceless.pdf2.viewer2
Class ViewerFeature

java.lang.Object
  extended by org.faceless.pdf2.viewer2.ViewerFeature
Direct Known Subclasses:
ActionHandler, AnnotationComponentFactory, Exporter, Importer, Menus, MultiWindow, SidePanelFactory, TextHighlighter, ToolbarDisabling, ToolbarFloating, Toolbars, ViewerWidget

public abstract class ViewerFeature
extends Object

The ViewerFeature class can be used to control the various features of the PDFViewer, such as widgets, side panels, annotations and action handlers. Most of the interesting methods are in the subclasses, particularly ViewerWidget, but the getAllFeatures() method is commonly called to return a list of all the features available to the viewer.

The list of default features is specified by the org.faceless.pdf2.viewer2.ViewerFeature service provider file. The bfopdf.jar file contains this file in the META-INF/services folder, which lists the classnames of each feature to load by default. Each feature specified this way must be a subclass of ViewerFeature, and contain a zero-parameter constructor or a getInstance() method that returns a singleton. Additional features may be specified this way in any other Jars available to the application. See the Java Service Provider Interface documentation for more information.

See the viewer tutorial for more detail on how to use this class and the "viewer" package.

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.8

Constructor Summary
protected ViewerFeature(String name)
          Create a new ViewerFeature
 
Method Summary
static List getAllFeatures()
          Return a Collection of all the features available, which can be passed to the PDFViewer constructor or used as a base for your own set of features.
 String getName()
          Return the name of this Feature
 void initialize(PDFViewer viewer)
          Called when the feature is first added to a viewer
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ViewerFeature

protected ViewerFeature(String name)
Create a new ViewerFeature

Parameters:
name - the name of the feature
Method Detail

getAllFeatures

public static final List getAllFeatures()
Return a Collection of all the features available, which can be passed to the PDFViewer constructor or used as a base for your own set of features.


initialize

public void initialize(PDFViewer viewer)
Called when the feature is first added to a viewer


getName

public final String getName()
Return the name of this Feature


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2008 Big Faceless Organization