com.qoppa.pdf.annotations
Class Widget

java.lang.Object
  extended bycom.qoppa.pdf.annotations.Annotation
      extended bycom.qoppa.pdf.annotations.Widget
Direct Known Subclasses:
WidgetButton, WidgetChoice, WidgetSignature, WidgetText

public abstract class Widget
extends Annotation


Field Summary
static int HIGH_INVERT
           
static int HIGH_NONE
           
static int HIGH_OUTLINE
           
static int HIGH_PUSH
           
static int HIGH_TOGGLE
           
static DecimalFormat NUMBER_FORMAT
           
 
Fields inherited from class com.qoppa.pdf.annotations.Annotation
BORDERSTYLE_BEVELED, BORDERSTYLE_DASHED, BORDERSTYLE_INSETS, BORDERSTYLE_SOLID, BORDERSTYLE_UNDERLINE, FLAGS_HIDDEN, FLAGS_INVISIBLE, FLAGS_LOCKED, FLAGS_NOROTATE, FLAGS_NOVIEW, FLAGS_NOZOOM, FLAGS_PRINTABLE, FLAGS_READONLY
 
Constructor Summary
Widget(QFormField field, PDFDictionary widgetDict, boolean keepDict)
           
 
Method Summary
 boolean canEdit()
           
abstract  void fieldValueChanged()
           
 String getAppearanceState()
           
 Color getBackground()
           
 Color getBorderColor()
           
 String getCaption()
           
 String getDA()
           
 JComponent getEditingComponent()
           
 QFormField getField()
           
 PDFFont getFont()
           
 int getGenNumber()
           
 int getHighlightMode()
           
 int getJustify()
           
 Hashtable getMarkedContentInfo(Vector commands)
           
 PDFStream getNormalStream()
           
 int getObjNumber()
           
 IPDFPage getPage()
           
 PDFObjectManager getPDFObjectManager()
           
 String getSubtype()
          Gets the annotation's subtype string.
 PDFDictionary getWidgetDict()
           
 boolean isEditable()
           
 void normalizeRectangle(double paperHeight)
           
 void paintImpl(Graphics g, boolean hasFocus)
           
 void revalidate()
          Revalidates this annotation.
 void setAppearanceState(String aState)
           
 void setBackground(Color background)
           
 void setBorderColor(Color borderColor)
           
 void setCaption(String caption)
           
 void setDA(String da)
           
 void setField(QFormField field)
           
 void setFont(PDFFont font)
           
 void setGenNumber(int genNumber)
           
 void setHidden(boolean hidden)
          Sets this Annotation's HIDDEN flag.
 void setHighlightMode(int highlightMode)
           
 void setObjNumber(int objNumber)
           
 void setPage(IPDFPage page)
           
 void setPDFObjectManager(PDFObjectManager objectManager)
           
 void setPrintable(boolean printable)
          Sets the value of the PRINTABLE flag.
 void setWidgetHighlight(boolean highlight)
          Flags this widget so that when displayed, it will display a highlight over the widget.
 
Methods inherited from class com.qoppa.pdf.annotations.Annotation
createComponent, getActions, getAppearStream, getBorderStyle, getBorderWidth, getColor, getComponent, getContents, getCreationDate, getCreator, getFlags, getName, getOpacity, getPopup, getRectangle, getTriggerActions, isHidden, isInvisible, isLocked, isNoRotate, isNoView, isNoZoom, isPrintable, isReadOnly, paint, paintAppearStream, print, setActions, setAppearStream, setBorderStyle, setBorderWidth, setColor, setComponent, setComponentVisible, setCreationDate, setCreator, setFlags, setInvisible, setLocked, setName, setNoRotate, setNoView, setNoZoom, setOpacity, setPopup, setReadOnly, setRectangle, setTriggerActions, shiftRectangle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NUMBER_FORMAT

public static final DecimalFormat NUMBER_FORMAT

HIGH_NONE

public static final int HIGH_NONE
See Also:
Constant Field Values

HIGH_INVERT

public static final int HIGH_INVERT
See Also:
Constant Field Values

HIGH_OUTLINE

public static final int HIGH_OUTLINE
See Also:
Constant Field Values

HIGH_PUSH

public static final int HIGH_PUSH
See Also:
Constant Field Values

HIGH_TOGGLE

public static final int HIGH_TOGGLE
See Also:
Constant Field Values
Constructor Detail

Widget

public Widget(QFormField field,
              PDFDictionary widgetDict,
              boolean keepDict)
Method Detail

canEdit

public boolean canEdit()

getAppearanceState

public String getAppearanceState()

getBackground

public Color getBackground()

getCaption

public String getCaption()

getBorderColor

public Color getBorderColor()

getHighlightMode

public int getHighlightMode()

getField

public QFormField getField()

getSubtype

public String getSubtype()
Description copied from class: Annotation
Gets the annotation's subtype string.

Specified by:
getSubtype in class Annotation
Returns:
The annotation subtype.

getWidgetDict

public PDFDictionary getWidgetDict()

setHighlightMode

public void setHighlightMode(int highlightMode)

setAppearanceState

public void setAppearanceState(String aState)

setBackground

public void setBackground(Color background)

setBorderColor

public void setBorderColor(Color borderColor)

setCaption

public void setCaption(String caption)

fieldValueChanged

public abstract void fieldValueChanged()
                                throws PDFException
Throws:
PDFException

isEditable

public boolean isEditable()

getGenNumber

public int getGenNumber()

setGenNumber

public void setGenNumber(int genNumber)

getMarkedContentInfo

public Hashtable getMarkedContentInfo(Vector commands)

getNormalStream

public PDFStream getNormalStream()

getObjNumber

public int getObjNumber()

setObjNumber

public void setObjNumber(int objNumber)

setField

public void setField(QFormField field)

setHidden

public void setHidden(boolean hidden)
Description copied from class: Annotation
Sets this Annotation's HIDDEN flag. A hidden annotation will not be displayed on the screen and will not print.

Overrides:
setHidden in class Annotation
Parameters:
hidden - The new value of the HIDDEN flag.

setPrintable

public void setPrintable(boolean printable)
Description copied from class: Annotation
Sets the value of the PRINTABLE flag.

Overrides:
setPrintable in class Annotation
Parameters:
printable - The new value for the PRINTABLE flag.

getPDFObjectManager

public PDFObjectManager getPDFObjectManager()

setPDFObjectManager

public void setPDFObjectManager(PDFObjectManager objectManager)

paintImpl

public void paintImpl(Graphics g,
                      boolean hasFocus)

revalidate

public void revalidate()
Description copied from class: Annotation
Revalidates this annotation.

Specified by:
revalidate in class Annotation

getFont

public PDFFont getFont()

getEditingComponent

public JComponent getEditingComponent()

getJustify

public int getJustify()

setFont

public void setFont(PDFFont font)

getDA

public String getDA()

setDA

public void setDA(String da)

normalizeRectangle

public void normalizeRectangle(double paperHeight)

setPage

public void setPage(IPDFPage page)

getPage

public IPDFPage getPage()

setWidgetHighlight

public void setWidgetHighlight(boolean highlight)
Flags this widget so that when displayed, it will display a highlight over the widget. This is intended so that a viewer will locate fields more easily on a form.

Parameters:
highlight - Boolean flag indicating whether the field should be highlighted.