|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.faceless.pdf2.viewer2.ViewerFeature
org.faceless.pdf2.viewer2.AnnotationComponentFactory
org.faceless.pdf2.viewer2.feature.AnnotationEllipseFactory
public class AnnotationEllipseFactory
Create annotations that handle Ellipse AnnotationShape objects.
The name of this feature is AnnotationEllipse
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.
| Field Summary |
|---|
| Fields inherited from class org.faceless.pdf2.viewer2.AnnotationComponentFactory |
|---|
FOCUSBORDER |
| Constructor Summary | |
|---|---|
AnnotationEllipseFactory()
|
|
| Method Summary | |
|---|---|
protected void |
copyAnnotationState(PDFAnnotation source,
PDFAnnotation target)
Copies the properties of a given source annotation created by this factory to a target annotation of the same type. |
JComponent |
createComponent(PagePanel pagepanel,
PDFAnnotation a)
Return a JComponent that will visually represent the specified PDFAnnotation. |
JComponent |
createEditComponent(PDFAnnotation annot,
boolean readonly,
boolean create)
Return a JComponent that can be used to edit the annotation or display additional information. |
protected JComponent |
createEditor(AnnotationShape annot,
PDFParser parser)
|
PDFAnnotation |
createNewAnnotation(float x1,
float y1,
float x2,
float y2)
Returns a new annotation of this factory's type with specified bounds. |
String |
getAnnotationType()
Return the name of the type of widgets this AnnotationComponentFactory creates or edits. |
boolean |
matches(PDFAnnotation annot)
Return true if this AnnotationComponentFactory could create a JComponent
for the specified PDFAnnotation. |
protected boolean |
matchesShape(AnnotationShape annot)
|
protected void |
setPreferencePrefix(String prefix)
|
| Methods inherited from class org.faceless.pdf2.viewer2.AnnotationComponentFactory |
|---|
bindComponentLocation, bindComponentLocation, bindComponentLocation, createDeleteAction, createEditAction, createNewAnnotation, getPreferences, getViewer, initialize, makeComponentDraggable, paintComponent, paintComponentAnnotations, popupPropertyMenu, postEdit, redrawAnnotation, toString |
| Methods inherited from class org.faceless.pdf2.viewer2.ViewerFeature |
|---|
getAllEnabledFeatures, getAllFeatures, getCustomJavaScript, getFeatureProperty, getName, isEnabledByDefault |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AnnotationEllipseFactory()
| Method Detail |
|---|
public String getAnnotationType()
AnnotationComponentFactory
getAnnotationType in class AnnotationComponentFactoryprotected boolean matchesShape(AnnotationShape annot)
public PDFAnnotation createNewAnnotation(float x1,
float y1,
float x2,
float y2)
AnnotationComponentFactory
createNewAnnotation in class AnnotationComponentFactoryx1 - the lower left x coordinatey1 - the lower left y coordinatex2 - the top right x coordinatey2 - the top right y coordinateprotected void setPreferencePrefix(String prefix)
protected JComponent createEditor(AnnotationShape annot,
PDFParser parser)
public boolean matches(PDFAnnotation annot)
AnnotationComponentFactoryJComponent
for the specified PDFAnnotation.
matches in class AnnotationComponentFactory
public JComponent createComponent(PagePanel pagepanel,
PDFAnnotation a)
AnnotationComponentFactoryReturn 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)
createComponent in class AnnotationComponentFactorypagepanel - the panel the JComponent will be added toa - the annotationpaintComponentAnnotations(),
paintComponent()
public JComponent createEditComponent(PDFAnnotation annot,
boolean readonly,
boolean create)
AnnotationComponentFactory
createEditComponent in class AnnotationComponentFactoryannot - the annotationreadonly - whether we are displaying or editing the annotationcreate - if readonly if false, whether we are editing an existing or creating a new annotation
protected void copyAnnotationState(PDFAnnotation source,
PDFAnnotation target)
AnnotationComponentFactory
copyAnnotationState in class AnnotationComponentFactorysource - the annotation to copy properties fromtarget - the annotation to copy properties to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||