org.faceless.pdf2.viewer2.feature
Class FormButtonWidgetFactory

java.lang.Object
  extended by org.faceless.pdf2.viewer2.ViewerFeature
      extended by org.faceless.pdf2.viewer2.AnnotationComponentFactory
          extended by org.faceless.pdf2.viewer2.feature.FormButtonWidgetFactory

public class FormButtonWidgetFactory
extends AnnotationComponentFactory

Create annotations to handle WidgetAnnotation objects belonging to a FormButton. The name of this feature is FormButtonWidgetFactory

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

Field Summary
 
Fields inherited from class org.faceless.pdf2.viewer2.AnnotationComponentFactory
FOCUSBORDER
 
Constructor Summary
FormButtonWidgetFactory()
          Create a new FormButtonWidgetFactory.
 
Method Summary
 JComponent createComponent(PagePanel pagepanel, PDFAnnotation annot)
           Return a JComponent that will visually represent the specified PDFAnnotation.
static FormButtonWidgetFactory getInstance()
          Deprecated. since 2.11 just calls the public constructor
 boolean matches(PDFAnnotation annot)
          Return true if this AnnotationComponentFactory could create a JComponent for the specified PDFAnnotation.
 
Methods inherited from class org.faceless.pdf2.viewer2.AnnotationComponentFactory
addStockDetailsToEditComponent, bindComponentLocation, bindComponentLocation, bindComponentLocation, bindComponentLocation, copyAnnotationState, createDeleteAction, createEditAction, createEditComponent, createFlattenAction, createNewAnnotation, createNewAnnotation, getAnnotationType, getPreferences, getViewer, initialize, makeComponentDraggable, paintComponent, paintComponentAnnotations, popupPropertyMenu, postEdit, toString
 
Methods inherited from class org.faceless.pdf2.viewer2.ViewerFeature
getAllEnabledFeatures, getAllFeatures, getCustomJavaScript, getFeatureProperty, getFeatureURLProperty, getName, isEnabledByDefault, setFeatureName, teardown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FormButtonWidgetFactory

public FormButtonWidgetFactory()
Create a new FormButtonWidgetFactory.

Since:
2.10.6
Method Detail

getInstance

public static FormButtonWidgetFactory getInstance()
Deprecated. since 2.11 just calls the public constructor

Return a FormButtonWidgetFactory


matches

public boolean matches(PDFAnnotation annot)
Description copied from class: AnnotationComponentFactory
Return true if this AnnotationComponentFactory could create a JComponent for the specified PDFAnnotation.

Specified by:
matches in class AnnotationComponentFactory

createComponent

public JComponent createComponent(PagePanel pagepanel,
                                  PDFAnnotation annot)
Description copied from class: AnnotationComponentFactory

Return a JComponent that will visually represent the specified PDFAnnotation. The default implementation returns a JPanel that will display the annotation appearance - it's usually best to call super.createComponent() then add any required listeners in the subclasses.

By default this method returns a JCompoment whose paintComponent() method is overridden to call paintComponent(this, this.ui, g) followed by paintComponentAnnotations(this, g) - typically, the main reason to override this method is when a different type of object is required (eg. a JTextField)

Overrides:
createComponent in class AnnotationComponentFactory
Parameters:
pagepanel - the panel the JComponent will be added to
annot - the annotation
See Also:
paintComponentAnnotations(), paintComponent()


Copyright © 2001-2010 Big Faceless Organization