java.lang.Object | ||
↳ | com.pdftron.pdf.Annot | |
↳ | com.pdftron.pdf.annots.Screen |
A screen annotation (PDF 1.5) specifies a region of a page upon which media clips may be played. It also serves as an object from which actions can be triggered. 12.6.4.13, "Rendition Actions" discusses the relationship between screen annotations and rendition actions.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | e_Always | This enum represents the circumstances under which the icon shall be scaled inside the annotation rectangle . | |||||||||
int | e_Anamorphic | This integer list represents the scale type of the Screen annotation e_Anamorphic - Scale the icon to fill the annotation rectangle exactly, without regard to its original aspect ratio (ratio of width to height). | |||||||||
int | e_CAboveI | The Constant e_CAboveI. | |||||||||
int | e_CBelowI | The Constant e_CBelowI. | |||||||||
int | e_CLeftIRight | The Constant e_CLeftIRight. | |||||||||
int | e_COverlayI | The Constant e_COverlayI. | |||||||||
int | e_CRightILeft | The Constant e_CRightILeft. | |||||||||
int | e_Never | The Constant e_Never. | |||||||||
int | e_NoCaption | The Constant e_NoCaption. | |||||||||
int | e_NoIcon | This enum represents the Icon and Caption Relation of the Screen annotation e_NoIcon - No icon; caption only e_NoCaption - No caption; icon only e_CBelowI - Caption below the icon e_CAboveI - Caption above the icon e_CRightILeft - Caption to the right of the icon e_CLeftIRight - Caption to the left of the icon e_COverlayI - Caption overlaid directly on the icon Default value: e_NoIcon. | |||||||||
int | e_Proportional | The Constant e_Proportional. | |||||||||
int | e_WhenBigger | The Constant e_WhenBigger. | |||||||||
int | e_WhenSmaller | The Constant e_WhenSmaller. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pdftron.pdf.Annot
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Screen(Obj d)
Creates a Screen annotation and initialize it using given Cos/SDF object.
| |||||||||||
Screen()
Creates an empty Screen annotation.
| |||||||||||
Screen(Annot annot)
Creates a Screen annotation and initialize it using given annotation object.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
SetScaleCondition(int sd)
Set the condition under which the icon should be scaled.
| ||||||||||
static Screen |
create(Doc doc, Rect pos)
Creates a new Screen annotation, in the specified document.
| ||||||||||
Action |
getAction()
Get the action of the Screen annotation.
| ||||||||||
ColorPt |
getBackgroundColor()
Get the background color of the Screen annotation.
| ||||||||||
int |
getBackgroundColorCompNum()
Get the number indicating background color space of the Screen annotation.
| ||||||||||
ColorPt |
getBorderColor()
Get the border color of the Screen annotation.
| ||||||||||
int |
getBorderColorCompNum()
Get the number indicating border color space of the Screen annotation.
| ||||||||||
boolean |
getFitFull()
Get the fit full option being used.
| ||||||||||
double |
getHIconLeftOver()
Get the horizontal leftover of the icon within the annotatin.
| ||||||||||
int |
getIconCaptionRelation()
Get the Icon and caption relationship of the Screen annotation.
| ||||||||||
String |
getMouseDownCaptionText()
Get the button down caption text of the Screen annotation.
| ||||||||||
Obj |
getMouseDownIcon()
Get the Mouse Down icon associated with the Screen annotation.
| ||||||||||
String |
getRolloverCaptionText()
Get the roll over caption text of the Screen annotation.
| ||||||||||
Obj |
getRolloverIcon()
Get the rollover icon associated with the Screen annotation.
| ||||||||||
int |
getScaleCondition()
Get the condition under which the icon should be scaled.
| ||||||||||
int |
getScaleType()
Get the Scale Type of the Screen annotation.
| ||||||||||
String |
getStaticCaptionText()
Get static caption text of the Screen annotation.
| ||||||||||
Obj |
getStaticIcon()
Get the static icon associated with the Screen annotation.
| ||||||||||
String |
getTitle()
Get the title of the Screen Annotation.
| ||||||||||
double |
getVIconLeftOver()
Get the vertical leftover of the icon within the annotation.
| ||||||||||
void |
setAction(Action action)
Set the action of the Screen annotation
(Optional; PDF 1.1 )
Note: The action is an action that shall be performed when the annotation is activated | ||||||||||
void |
setBackgroundColor(ColorPt c, int CompNum)
Set the background color of the Screen.
| ||||||||||
void |
setBorderColor(ColorPt c, int CompNum)
Set the border color of the Screen.
| ||||||||||
void |
setFitFull(boolean ff)
Set the fit full option being used.
| ||||||||||
void |
setHIconLeftOver(double hl)
Set the horizontal leftover of the icon within the annotatin.
| ||||||||||
void |
setIconCaptionRelation(int icr)
Set the Icon and caption relationship of the Screen annotation.
| ||||||||||
void |
setMouseDownCaptionText(String ct)
Set the button down caption text of the Screen annotation.
| ||||||||||
void |
setMouseDownIcon(Obj ic)
Set the Mouse Down icon associated with the Screen annotation.
| ||||||||||
void |
setRolloverCaptionText(String ct)
Set the roll over caption text of the Screen annotation.
| ||||||||||
void |
setRolloverIcon(Obj ic)
Set the rollover icon associated with the Screen annotation.
| ||||||||||
void |
setScaleType(int st)
Set the Scale Type of the Screen annotation.
| ||||||||||
void |
setStaticCaptionText(String ct)
Set static caption text of the Screen annotation.
| ||||||||||
void |
setStaticIcon(Obj ic)
Set the static icon associated with the Screen annotation.
| ||||||||||
void |
setTitle(String title)
Set the title of the Screen Annotation.
| ||||||||||
void |
setVIconLeftOver(double vl)
Set the vertical leftover of the icon within the annotatin.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pdftron.pdf.Annot
| |||||||||||
From class
java.lang.Object
|
This enum represents the circumstances under which the icon shall be scaled inside the annotation rectangle . e_Always, e_WhenBigger, e_WhenSmaller, e_Never
This integer list represents the scale type of the Screen annotation e_Anamorphic - Scale the icon to fill the annotation rectangle exactly, without regard to its original aspect ratio (ratio of width to height). e_Proportional - Scale the icon to fit the width or height of the annotation rectangle while maintaining the icon's original aspect ratio. If the required horizontal and vertical scaling factors are different, use the smaller of the two, centering the icon within the annotation rectangle in the other dimension. Default value: e_Proportional.
The Constant e_CAboveI.
The Constant e_CBelowI.
The Constant e_CLeftIRight.
The Constant e_COverlayI.
The Constant e_CRightILeft.
The Constant e_Never.
The Constant e_NoCaption.
This enum represents the Icon and Caption Relation of the Screen annotation e_NoIcon - No icon; caption only e_NoCaption - No caption; icon only e_CBelowI - Caption below the icon e_CAboveI - Caption above the icon e_CRightILeft - Caption to the right of the icon e_CLeftIRight - Caption to the left of the icon e_COverlayI - Caption overlaid directly on the icon Default value: e_NoIcon.
The Constant e_Proportional.
The Constant e_WhenBigger.
The Constant e_WhenSmaller.
Creates a Screen annotation and initialize it using given Cos/SDF object.
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
d | the input Cos/SDF object |
---|
Creates an empty Screen annotation.
Creates a Screen annotation and initialize it using given annotation object.
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
annot | the annot |
---|
PDFNetException |
---|
Set the condition under which the icon should be scaled. (Optional)
Note: the ScaleCondition spedifies the circumstances under which the icon shall be scaled inside the annotation rectangle. The options are as follows: e_Always - Always scale. e_WhenBigger - Scale only when the icon is bigger than the annotation rectangle. e_WhenSmaller - Scale only when the icon is smaller than the annotation rectangle. e_Never - Never scale. Default value: e_Always.
This property is part of the Icon Fit dictionary, where the Icon Fit dictionary specifys how to display the button's icon within the annotation rectangle of its widget annotation(Optional; pushbutton fields only) If present, the icon fit dictionary shall apply to all of the annotation's icons (normal, rollover, and alternate).
sd | An entry of the "ScaleCondition" enum which the icon should be scaled. |
---|
PDFNetException |
---|
Creates a new Screen annotation, in the specified document.
doc | A document to which the annotation is added. |
---|---|
pos | A rectangle specifying the annotation's bounds, specified in user space coordinates. |
PDFNetException |
---|
Get the action of the Screen annotation.
Note: The action is an action that shall be performed when the annotation is activated
PDFNetException |
---|
Get the background color of the Screen annotation.
Note: that the color can be in different color spaces: Gray, RGB, or CMYK. Call "GetBackgroundColorCompNum" to access the color space information corresponding to the border color.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
PDFNetException |
---|
Get the number indicating background color space of the Screen annotation.
Note: This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
PDFNetException |
---|
Get the border color of the Screen annotation.
Note: that the color can be in different color spaces: Gray, RGB, or CMYK. Call "GetBorderColorCompNum" to access the color space information corresponding to the border color.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
PDFNetException |
---|
Get the number indicating border color space of the Screen annotation.
Note: This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
PDFNetException |
---|
Get the fit full option being used.
Note: the FitFull value, if true, indicates that the button appearance shall be scaled to fit fully within the bounds of the annotation without taking into consideration the line width of the border. Default value: false.
PDFNetException |
---|
Get the horizontal leftover of the icon within the annotatin.
Note: the horizontal leftover is a number that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the left. A value of 0.0 shall position the icon at the left of the annotation rectangle. A value of 0.5 shall center it in the horizontal direction within the rectangle. This entry shall be used only if the icon is scaled proportionally. Default value: 0.5.
PDFNetException |
---|
Get the Icon and caption relationship of the Screen annotation.
Note: the IconCaptionRelation entry indicates where to position the text of the widget annotation's caption relative to its icon, the options are as follows: e_NoIcon - No icon; caption only e_NoCaption - No caption; icon only e_CBelowI - Caption below the icon e_CAboveI - Caption above the icon e_CRightILeft - Caption to the right of the icon e_CLeftIRight - Caption to the left of the icon e_CoverlayI - Caption overlaid directly on the icon Default value: e_NoIcon.
PDFNetException |
---|
Get the button down caption text of the Screen annotation.
Note: The button down caption shall be displayed when the mouse button is pressed within its active area.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
PDFNetException |
---|
Get the Mouse Down icon associated with the Screen annotation.
Note: The Mouse Down icon object is a form XObject defining the widget annotation's alternate (down) icon, which shall be displayed when the mouse button is pressed within its active area.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
PDFNetException |
---|
Get the roll over caption text of the Screen annotation.
Note: The rollover caption shall be displayed when the user rolls the cursor into its active area without pressing the mouse button.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
PDFNetException |
---|
Get the rollover icon associated with the Screen annotation.
Note: The rollover icon object is a form XObject defining the widget annotation's rollover icon, which shall be displayed when the user rolls the cursor into its active area without pressing the mouse button.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
PDFNetException |
---|
Get the condition under which the icon should be scaled.
Note: the ScaleCondition spedifies the circumstances under which the icon shall be scaled inside the annotation rectangle. The options are as follows: e_Always - Always scale. e_WhenBigger - Scale only when the icon is bigger than the annotation rectangle. e_WhenSmaller - Scale only when the icon is smaller than the annotation rectangle. e_Never - Never scale. Default value: e_Always.
This property is part of the Icon Fit dictionary, where the Icon Fit dictionary specifys how to display the button's icon within the annotation rectangle of its widget annotation(Optional; pushbutton fields only) If present, the icon fit dictionary shall apply to all of the annotation's icons (normal, rollover, and alternate).
PDFNetException |
---|
Get the Scale Type of the Screen annotation.
Note: The type of scaling that shall be used: e_Anamorphic - Anamorphic scaling: Scale the icon to fill the annotation rectangle exactly, without regard to its original aspect ratio (ratio of width to height). e_Proportional - Proportional scaling: Scale the icon to fit the width or height of the annotation rectangle while maintaining the icon's original aspect ratio. If the required horizontal and vertical scaling factors are different, use the smaller of the two, centering the icon within the annotation rectangle in the other dimension. Default value: P.
This property is part of the Icon Fit dictionary, where the Icon Fit dictionary specifys how to display the button's icon within the annotation rectangle of its widget annotation(Optional; pushbutton fields only) If present, the icon fit dictionary shall apply to all of the annotation's icons (normal, rollover, and alternate).
PDFNetException |
---|
Get static caption text of the Screen annotation.
Note: The static caption is the widget annotation's normal caption, which shall be displayed when it is not interacting with the user. Unlike the remaining entries with the captions, which apply only to widget annotations associated with pushbutton fields, the Static Caption(CA) entry may be used with any type of button field, including check boxes.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
PDFNetException |
---|
Get the static icon associated with the Screen annotation.
Note: The static icon object is a form XObject defining the widget annotation's normal icon, which shall be displayed when it is not interacting with the user.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
PDFNetException |
---|
Get the title of the Screen Annotation.
PDFNetException |
---|
Get the vertical leftover of the icon within the annotation.
Note: the vertical leftover is a number that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the bottom of the icon. A value of 0.0 shall position the icon at the bottom of the annotation rectangle. A value of 0.5 shall center it in the vertical direction within the rectangle. This entry shall be used only if the icon is scaled proportionally. Default value: 0.5.
PDFNetException |
---|
Set the action of the Screen annotation (Optional; PDF 1.1 )
Note: The action is an action that shall be performed when the annotation is activated
action | An action object representing the action of the Screen annotation. |
---|
PDFNetException |
---|
Set the background color of the Screen. (Optional)
Note: it is necessary to make sure the consistancy between the ColorPt type and the ColorSpace::Type value. e_device_gray corresponds to an array of two numbers; e_device_rgb corresponds to an array of 3 numbers, e_device_cmyk corresponds to an array of 4 numnbers, while e_null correspons to an arry of 0 number. Entries out of the specified color space array length will be desgarded. However, missing entries for a specified color space will throw exception either when setting the color or when later retrieving color(colorspace) information.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
c | A ColorPt object that denotes the color of the wdget background. |
---|---|
CompNum | An int whose value implies the color space used for the parameter c. |
PDFNetException |
---|
Set the border color of the Screen. (Optional)
* Note: it is necessary to make sure the consistancy between the ColorPt type and the ColorSpace::Type value. e_device_gray corresponds to an array of two numbers; e_device_rgb corresponds to an array of 3 numbers, e_device_cmyk corresponds to an array of 4 numnbers, while e_null correspons to an arry of 0 number. Entries out of the specified color space array length will be desgarded. However, missing entries for a specified color space will throw exception either when setting the color or when later retrieving color(colorspace) information.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
c | A ColorPt object that denotes the color of the wdget border. |
---|---|
CompNum | An int whose value implies the color space used for the parameter c. |
PDFNetException |
---|
Set the fit full option being used. (Optional)
Note: the FitFull value, if true, indicates that the button appearance shall be scaled to fit fully within the bounds of the annotation without taking into consideration the line width of the border. Default value: false.
ff | A boolean value indicating the fit full option being used. |
---|
PDFNetException |
---|
Set the horizontal leftover of the icon within the annotatin. (Optional)
Note: the horizontal leftover is a number that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the left. A value of 0.0 shall position the icon at the left of the annotation rectangle. A value of 0.5 shall center it in the horizontal direction within the rectangle. This entry shall be used only if the icon is scaled proportionally. Default value: 0.5.
hl | A number indicating the horizontal leftover of the icon within the annotation. |
---|
PDFNetException |
---|
Set the Icon and caption relationship of the Screen annotation. (Optional; pushbutton fields only)
Note: the IconCaptionRelation entry indicates where to position the text of the widget annotation's caption relative to its icon. The options are as follows: e_NoIcon - No icon; caption only e_NoCaption - No caption; icon only e_CBelowI - Caption below the icon e_CAboveI - Caption above the icon e_CRightILeft - Caption to the right of the icon e_CLeftIRight - Caption to the left of the icon e_CoverlayI - Caption overlaid directly on the icon Default value: e_NoIcon.
icr | An entry of the "IconCaptionRelation" enum which represents the relationship between the icon and the caption of the Screen annotation. |
---|
PDFNetException |
---|
Set the button down caption text of the Screen annotation. (Optional; button fields only)
Note: The button down caption shall be displayed when the mouse button is pressed within its active area.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
ct | A string containing the button down text of the Screen annotation. |
---|
PDFNetException |
---|
Set the Mouse Down icon associated with the Screen annotation. (Optional; button fields only) Set the Mouse Down icon associated with the Screen annotation.
Note: The Mouse Down icon object is a form XObject defining the widget annotation's alternate (down) icon, which shall be displayed when the mouse button is pressed within its active area.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
ic | An SDF object that represents the Mouse Down icon associated with the Screen annotation. |
---|
PDFNetException |
---|
Set the roll over caption text of the Screen annotation. (Optional; button fields only)
Note: The rollover caption shall be displayed when the user rolls the cursor into its active area without pressing the mouse button.
ct | A string containing the roll over caption text of the Screen annotation. |
---|
PDFNetException |
---|
Set the rollover icon associated with the Screen annotation. (Optional; button fields only)
Note: The rollover icon object is a form XObject defining the widget annotation's rollover icon, which shall be displayed when the user rolls the cursor into its active area without pressing the mouse button.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
ic | An SDF object that represents the rollover icon associated with the Screen annotation. |
---|
PDFNetException |
---|
Set the Scale Type of the Screen annotation. (Optional)
Note: The type of scaling that shall be used: e_Anamorphic - Anamorphic scaling: Scale the icon to fill the annotation rectangle exactly, without regard to its original aspect ratio (ratio of width to height). e_Proportional - Proportional scaling: Scale the icon to fit the width or height of the annotation rectangle while maintaining the icon's original aspect ratio. If the required horizontal and vertical scaling factors are different, use the smaller of the two, centering the icon within the annotation rectangle in the other dimension. Default value: P.
This property is part of the Icon Fit dictionary, where the Icon Fit dictionary specifys how to display the button's icon within the annotation rectangle of its widget annotation(Optional; pushbutton fields only) If present, the icon fit dictionary sh
st | - an entry of the "ScaleType" enum which represents the Scale Type of the Screen annotation. |
---|
PDFNetException | all apply to all of the annotation's icons (normal, rollover, and alternate). |
---|
Set static caption text of the Screen annotation. (Optional; button fields only)
Note: The static caption is the widget annotation's normal caption, which shall be displayed when it is not interacting with the user. Unlike entries "RC, AC, I, RI, IX, IF, TP", which apply only to widget annotations associated with pushbutton fields, the Static Caption(CA) entry may be used with any type of button field, including check boxes.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
ct | A string containing the static caption text of the Screen annotation. |
---|
PDFNetException |
---|
Set the static icon associated with the Screen annotation. (Optional; button fields only)
Note: The static icon object is a form XObject defining the widget annotation's normal icon, which shall be displayed when it is not interacting with the user.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
ic | An SDF object that represents the static icon associated with the Screen annotation. |
---|
PDFNetException |
---|
Set the title of the Screen Annotation. (Optional)
title | A string representing the title of the Screen Annotation |
---|
PDFNetException |
---|
Set the vertical leftover of the icon within the annotatin. (Optional)
Note: the vertical leftover is a number that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the bottom of the icon. A value of 0.0 shall position the icon at the bottom of the annotation rectangle. A value of 0.5 shall center it in the vertical direction within the rectangle. This entry shall be used only if the icon is scaled proportionally. Default value: 0.5.
vl | A number indicating the vertical leftover of the icon within the annotation. |
---|
PDFNetException |
---|