|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.qoppa.pdf.annotations.Annotation
com.qoppa.pdf.annotations.Sound
Class representing a Sound annotation in a PDF document. Sound annotations are displayed using a speaker icon and can be double-clicked to play back the audio content.
| Field Summary |
| 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 | |
Sound()
Constructs a sound annotation with no sound. |
|
Sound(AudioFormat format,
byte[] content)
Constructs a sound annotation from an AudioFormat object and an array of bytes containing the audio content. |
|
Sound(AudioInputStream audioStream)
Constructs a sound annotation from an AudioInputStream. |
|
| Method Summary | |
JComponent |
createComponent(Point2D cropOrigin,
IPDFActionHandler actionHandler)
Creates a JComponent object capable of displaying this annotation. |
byte[] |
getContent()
Return this sound annotation's sound content as a byte array. |
AudioFormat |
getFormat()
Return this annotation's audio format. |
Rectangle2D |
getRectangle()
Override getRectangle: The bounds of this annotation are always the size of the icon. |
String |
getSubtype()
Returns this annotation's subtype: "Sound" |
boolean |
isPrintable()
Sound icon never prints. |
void |
paintImpl(Graphics g,
boolean hasFocus)
Draws the text icon. |
void |
revalidate()
Revalidates this annotation. |
void |
setAudio(AudioInputStream audioStream)
Sets the audio content of this Sound annotation. |
void |
setContent(byte[] content)
|
void |
setFormat(AudioFormat format)
|
| Methods inherited from class com.qoppa.pdf.annotations.Annotation |
getActions, getAppearStream, getBorderStyle, getBorderWidth, getColor, getComponent, getContents, getCreationDate, getCreator, getFlags, getLayer, getName, getOpacity, getPopup, getTriggerActions, isHidden, isInvisible, isLocked, isNoRotate, isNoView, isNoZoom, isReadOnly, paint, print, setActions, setAppearStream, setBorderStyle, setBorderWidth, setColor, setComponent, setComponentVisible, setCreationDate, setCreator, setFlags, setHidden, setInvisible, setLayer, setLocked, setName, setNoRotate, setNoView, setNoZoom, setOpacity, setPopup, setPrintable, setReadOnly, setRectangle, setTriggerActions, shiftRectangle |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Sound()
public Sound(AudioFormat format,
byte[] content)
format - The format of the audio.content - The audio content.
public Sound(AudioInputStream audioStream)
throws IOException
audioStream - The audio stream.| Method Detail |
public void setAudio(AudioInputStream audioStream)
throws IOException
audioStream - Stream containing the sound content.
IOExceptionpublic byte[] getContent()
PDFExceptionpublic AudioFormat getFormat()
public String getSubtype()
getSubtype in class Annotation
public JComponent createComponent(Point2D cropOrigin,
IPDFActionHandler actionHandler)
createComponent in class Annotation
public void paintImpl(Graphics g,
boolean hasFocus)
g - The graphics object to use when drawing.public void revalidate()
Annotation
revalidate in class Annotationpublic Rectangle2D getRectangle()
getRectangle in class Annotationpublic boolean isPrintable()
isPrintable in class Annotationpublic void setContent(byte[] content)
public void setFormat(AudioFormat format)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||