|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.crionics.jpdf.graphic.PdfGraphic
public class PdfGraphic
java representation of a Pdf graphic element.
| Constructor Summary | |
|---|---|
PdfGraphic(java.lang.String name,
PdfImage imageObject)
Creates a new Graphic object. |
|
| Method Summary | |
|---|---|
void |
addAlternateImage(AbstractImage image,
boolean useForPrinting)
Allows the creation of an alternate image for an existing one. |
int |
getHeight()
Returns the height of the graphic in pixels. |
AbstractImage |
getImage()
Returns the Image Object of the current graphical object. |
java.lang.String |
getName()
Returns the Name referencing the current graphic in the PDF Document. |
int |
getWidth()
Returns the width of the graphic in pixels. |
boolean |
isColor()
Returns true if the graphic contains colors |
void |
setColor(boolean color)
Sets the color. |
void |
setImage(AbstractImage image)
Updates the current image with the supplied Images Object. |
void |
setImage(java.io.File imageFile)
Updates the current image, with the supplied Image File. |
void |
setImage(java.awt.Image image)
Updates the current image with the supplied AWT Image. |
void |
setImage(java.lang.String imageFilename)
Updates the current image with the supplied Image Filename. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PdfGraphic(java.lang.String name,
PdfImage imageObject)
name - The name referencing the image in the Document.imageObject - The Image Object| Method Detail |
|---|
public void addAlternateImage(AbstractImage image,
boolean useForPrinting)
throws java.io.IOException,
PdfException
image - The alternate image (@link ImageConvertor);useForPrinting - true if the specified alternate image is to be used when the
PDF is printed.
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.
public int getHeight()
throws java.io.IOException,
PdfException
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.
public AbstractImage getImage()
throws java.io.IOException,
PdfException
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.public java.lang.String getName()
public int getWidth()
throws java.io.IOException,
PdfException
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.public boolean isColor()
public void setColor(boolean color)
color - The color to set
public void setImage(AbstractImage image)
throws java.io.IOException,
PdfException
image - The Images Object to write in the PDF document.
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.
public void setImage(java.io.File imageFile)
throws java.io.IOException,
PdfException
ImageConvertor.loadImage(File), do the
required operations and then use the method
setImage(AbstractImage)
imageFile - The Image File to write in the PDF document. (Can be a JPEG or
any other image recognized by the AWT API).
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.
public void setImage(java.awt.Image image)
throws java.io.IOException,
PdfException
ImageConvertor.loadImage(Image), do the
required operations and then use the method
setImage(AbstractImage)
image - The AWT Image to write in the PDF document.
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.
public void setImage(java.lang.String imageFilename)
throws java.io.IOException,
PdfException
ImageConvertor.loadImage(String), do the
required operations and then use the method
setImage(AbstractImage)
imageFilename - The filename of the Image to write in the PDF document. (Can
be a JPEG or any other image recognized by the AWT API).
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||