public class Sound extends Markup
Annot.BorderStyle
Modifier and Type | Field and Description |
---|---|
static int |
e_Mic
The Constant e_Mic.
|
static int |
e_Speaker
This integer list represents sub type of the Sound annotation.
|
static int |
e_Unknown
The Constant e_Unknown.
|
e_3D, e_action_trigger_activate, e_action_trigger_annot_blur, e_action_trigger_annot_down, e_action_trigger_annot_enter, e_action_trigger_annot_exit, e_action_trigger_annot_focus, e_action_trigger_annot_page_close, e_action_trigger_annot_page_invisible, e_action_trigger_annot_page_open, e_action_trigger_annot_page_visible, e_action_trigger_annot_up, 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_Watermark, e_Widget
Constructor and Description |
---|
Sound()
Creates an empty Sound annoitation.
|
Sound(Annot annot)
Creates a Sound annotation and initialize it using given annotation object.
|
Sound(Obj d)
Creates a Sound annotation and initialize it using given Cos/SDF object.
|
Modifier and Type | Method and Description |
---|---|
static Sound |
create(Doc doc,
Rect pos)
Creates a new Sound annotation, in the specified document.
|
int |
getIcon()
Get the sub type of the Sound annotation.
|
java.lang.String |
getIconName()
Get the sub type of the Sound annotation.
|
Obj |
getSoundStream()
Get the initial sound object of the Sound annotation.
|
void |
setIcon(int type)
Set the sub type of the Sound annotation.
|
void |
setIcon(java.lang.String type)
Set the sub type of the Sound annotation.
|
void |
setSoundStream(Obj sound_stream)
Set the initial sound object of the Sound annotation.
|
getBorderEffect, getBorderEffectIntensity, getContentRect, getCreationDates, getInteriorColor, getInteriorColorCompNum, getOpacity, getPadding, getPopup, getSubject, getTitle, setBorderEffect, SetBorderEffectIntensity, setContentRect, setCreationDates, setInteriorColor, setOpacity, SetPadding, setPopup, setSubject, setTitle
__Create, __GetHandle, __GetRefHandle, create, equals, flatten, getActiveAppearanceState, getAppearance, getAppearance, getAppearance, getBorderStyle, getColorAsCMYK, getColorAsGray, getColorAsRGB, getColorCompNum, getContents, getDate, getFlag, getOptionalContent, getPage, getRect, getRotation, getSDFObj, GetStructParent, getTriggerAction, getType, getUniqueID, getVisibleContentBox, isMarkup, isValid, refreshAppearance, removeAppearance, resize, setActiveAppearanceState, setAppearance, setAppearance, setAppearance, setBorderStyle, setColor, setContents, setDate, setFlag, setOptionalContent, setPage, setRect, setRotation, setStructParent, setUniqueID
public static final int e_Speaker
public static final int e_Mic
public static final int e_Unknown
public Sound(Obj d)
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
d
- the input Cos/SDF objectpublic Sound()
public Sound(Annot annot) throws PDFNetException
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
annot
- the input annotation objectPDFNetException
public static Sound create(Doc doc, Rect pos) throws PDFNetException
doc
- A document to which the annotation is added.pos
- A rectangle specifying the annotation's bounds, specified in
user space coordinates.PDFNetException
public Obj getSoundStream() throws PDFNetException
Note: The sound stream is a sound object defining the sound that shall be played when the annotation is activated.
PDFNetException
public void setSoundStream(Obj sound_stream) throws PDFNetException
Note: The sound stream is a sound object defining the sound that shall be played when the annotation is activated.
sound_stream
- - An SDF object representing a sound stream.PDFNetException
public int getIcon() throws PDFNetException
Note: The Icon indicates name of an icon that shall be used in displaying the annotation. Conforming readers shall provide predefined icon appearances for at least the standard types e_Speaker and e_Mic. Additional types may be supported as well. However, user defined sub types has to be represented by string, in the enum"Icon", it will just show as "e_Unknow". Default value: e_Speaker. The annotation dictionary's AP entry, if present, shall take precedence over the Name entry; see Table 168 and 12.5.5, "Appearance Streams."
PDFNetException
public void setIcon(int type) throws PDFNetException
Note: The Icon indicates name of an icon that shall be used in displaying the annotation. Conforming readers shall provide predefined icon appearances for at least the standard types e_Speaker and e_Mic. Additional types may be supported as well. However, user defined sub types has to be represented by string. In the enum"Icon", it will just show as "e_Unknow". Default value: e_Speaker. The annotation dictionary's AP entry, if present, shall take precedence over the Name entry; see Table 168 and 12.5.5, "Appearance Streams."
type
- An entry in the "GetIcon" enum
indicating the subtype of the Sound annotation.PDFNetException
public java.lang.String getIconName() throws PDFNetException
Note: The Icon indicates a name of an icon that shall be used in displaying the annotation. Conforming readers shall provide predefined icon appearances for at least the standard types Speaker and Mic. Additional types may be supported as well. Default value: Speaker. The annotation dictionary's AP entry, if present, shall take precedence over the Name entry; see Table 168 and 12.5.5, "Appearance Streams."
PDFNetException
public void setIcon(java.lang.String type) throws PDFNetException
Note: The Icon indicates a name of an icon that shall be used in displaying the annotation. Conforming readers shall provide predefined icon appearances for at least the standard types Speaker and Mic. Additional types may be supported as well. Default value: Speaker. The annotation dictionary's AP entry, if present, shall take precedence over the Name entry; see Table 168 and 12.5.5, "Appearance Streams."
type
- - A string indicating the subtype of the Sound annotation.PDFNetException