pdftron.PDF.Annots
Class Popup

java.lang.Object
  extended by pdftron.PDF.Annot
      extended by pdftron.PDF.Annots.Popup

public class Popup
extends Annot

A pop-up annotation (PDF 1.3) displays text in a pop-up window for entry and editing. It shall not appear alone but is associated with a markup annotation, its parent annotation, and shall be used for editing the parent’s text. It shall have no appearance stream or associated actions of its own and shall be identified by the Popup entry in the parent’s annotation dictionary.


Nested Class Summary
 
Nested classes/interfaces inherited from class pdftron.PDF.Annot
Annot.BorderStyle
 
Field Summary
 
Fields inherited from class pdftron.PDF.Annot
e_3D, e_Caret, e_Circle, e_down, e_FileAttachment, e_FreeText, e_hidden, e_Highlight, e_Ink, e_invisible, e_Line, e_Link, e_locked, e_locked_contents, e_Movie, e_no_rotate, e_no_view, e_no_zoom, e_normal, e_Polygon, e_Polyline, e_Popup, e_print, e_PrinterMark, e_Projection, e_read_only, e_Redact, e_RichMedia, e_rollover, e_Screen, e_Sound, e_Square, e_Squiggly, e_Stamp, e_StrikeOut, e_Text, e_toggle_no_view, e_TrapNet, e_Underline, e_Unknown, e_Watermark, e_Widget
 
Constructor Summary
Popup()
          Creates an empty Popup annotation.
Popup(Annot annot)
          Creates a Popup annotation and initialize it using given annotation object.
Popup(Obj d)
          Creates a Popup annotation and initialize it using given Cos/SDF object.
 
Method Summary
static Popup create(Doc doc, Rect pos)
          Creates a new Popup annotation, in the specified document.
 Annot getParent()
          Get the Parent annotation of the Popup annotation.
 boolean isOpen()
          Get the initial openning condition of Popup.
 void setOpen(boolean is_open)
          Set the initial openning condition of Popup.
 void setParent(Annot parent)
          Set the Parent annotation of the Popup annotation.
 
Methods inherited from class pdftron.PDF.Annot
__Create, __GetHandle, __GetRefHandle, create, equals, flatten, getActiveAppearanceState, getAppearance, getAppearance, getAppearance, getBorderStyle, getColorAsCMYK, getColorAsGray, getColorAsRGB, getColorCompNum, getContents, getDate, getFlag, getOptionalContent, getPage, getRect, getSDFObj, GetStructParent, getType, getUniqueID, isMarkup, isValid, refreshAppearance, removeAppearance, resize, setActiveAppearanceState, setAppearance, setAppearance, setAppearance, setBorderStyle, setColor, setContents, setDate, setFlag, setOptionalContent, setPage, setRect, setStructParent, setUniqueID
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Popup

public Popup(Obj d)
Creates a Popup annotation and initialize it using given Cos/SDF object.

Parameters:
d - the input Cos/SDF object
Note:
The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Popup

public Popup()
Creates an empty Popup annotation.


Popup

public Popup(Annot annot)
      throws PDFNetException
Creates a Popup annotation and initialize it using given annotation object.

Parameters:
annot - the annot
Throws:
PDFNetException
Note:
The constructor does not copy any data, but is instead the logical equivalent of a type cast.
Method Detail

create

public static Popup create(Doc doc,
                           Rect pos)
                    throws PDFNetException
Creates a new Popup annotation, in the specified document.

Parameters:
doc - A document to which the Popup annotation is added.
pos - A rectangle specifying the Popup annotation's bounds, specified in user space coordinates.
Returns:
A newly created blank Popup annotation.
Throws:
PDFNetException

getParent

public Annot getParent()
                throws PDFNetException
Get the Parent annotation of the Popup annotation.

Returns:
An annot object which is the parent annotation of the Popup annotation.
Throws:
PDFNetException
Note:
This annotation object represents the parent annotation with which this pop-up annotation shall be associated. If this entry is present, the parent annotation’s Contents, M, C, and Tentries shall override those of the pop-up annotation itself.

setParent

public void setParent(Annot parent)
               throws PDFNetException
Set the Parent annotation of the Popup annotation. (Optional)

Parameters:
parent - An annot object which is the parent annotation of the Popup annotation.
Throws:
PDFNetException
Note:
This annotation object represents the parent annotation with which this pop-up annotation shall be associated. If this entry is present, the parent annotation’s Contents, M, C, and Tentries shall override those of the pop-up annotation itself.

isOpen

public boolean isOpen()
               throws PDFNetException
Get the initial openning condition of Popup.

Returns:
A bool indicating whether the Popup is initially open.
Throws:
PDFNetException
Note:
This Open option is a flag specifying whether the pop-up annotation shall initially be displayed open. Default value: false (closed). If this entry is present, the parent annotation’s Contents, M, C, and Tentries shall override those of the pop-up annotation itself.

setOpen

public void setOpen(boolean is_open)
             throws PDFNetException
Set the initial openning condition of Popup. (Optional)

Parameters:
is_open - A bool indicating whether the Popup is initially open.
Throws:
PDFNetException
Note:
This Open option is a flag specifying whether the pop-up annotation shall initially be displayed open. Default value: false (closed). If this entry is present, the parent annotation’s Contents, M, C, and Tentries shall override those of the pop-up annotation itself.


© 2002-2011 PDFTron Systems Inc.