org.faceless.pdf2.viewer2.feature
Class AnnotationTextFactory

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

public class AnnotationTextFactory
extends AnnotationComponentFactory

Create annotations that handle AnnotationText objects The name of this feature is "AnnotationText".

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

Method Summary
 JComponent createComponent(PagePanel pagepanel, PDFAnnotation a)
          Return a JComponent that will visually represent the specified PDFAnnotation.
 JComponent createEditComponent(PDFAnnotation gannot, boolean readonly, boolean create)
          Return a JComponent that can be used to edit the annotation or display additional information.
 PDFAnnotation createNewAnnotation()
          Return a brand new annotation of the type that is edited with this factory.
 String getAnnotationType()
          Return the name of the type of widgets this AnnotationComponentFactory creates or edits.
static AnnotationTextFactory getInstance()
          Return the AnnotationTextFactory
 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
bindComponentLocation, bindComponentLocation, bindComponentLocation, paintComponent, toString
 
Methods inherited from class org.faceless.pdf2.viewer2.ViewerFeature
getAllFeatures, getName, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstance

public static AnnotationTextFactory getInstance()
Return the AnnotationTextFactory


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

getAnnotationType

public String getAnnotationType()
Description copied from class: AnnotationComponentFactory
Return the name of the type of widgets this AnnotationComponentFactory creates or edits.

Overrides:
getAnnotationType in class AnnotationComponentFactory

createComponent

public JComponent createComponent(PagePanel pagepanel,
                                  PDFAnnotation a)
Description copied from class: AnnotationComponentFactory
Return a JComponent that will visually represent the specified PDFAnnotation.

Specified by:
createComponent in class AnnotationComponentFactory
Parameters:
pagepanel - the panel the JComponent will be added to
a - the annotation

createNewAnnotation

public PDFAnnotation createNewAnnotation()
Description copied from class: AnnotationComponentFactory
Return a brand new annotation of the type that is edited with this factory. If this factory cannot be used to create a new annotation, this method can return null (the default)

Overrides:
createNewAnnotation in class AnnotationComponentFactory

createEditComponent

public JComponent createEditComponent(PDFAnnotation gannot,
                                      boolean readonly,
                                      boolean create)
Description copied from class: AnnotationComponentFactory
Return a JComponent that can be used to edit the annotation or display additional information. If the annotation has no dialog that should work with it in this way, this method should return null (the default)

Overrides:
createEditComponent in class AnnotationComponentFactory
Parameters:
gannot - the annotation
readonly - whether we are displaying or editing the annotation
create - if readonly if false, whether we are editing an existing or creating a new annotation


Copyright © 2001-2008 Big Faceless Organization