|
ElegantJ PDF Library Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.elegantj.pdf.PDFObject
com.elegantj.pdf.PDFPattern
Provides the PDFPattern object with the no. of Predefined Patterns like STAR, CIRCLE, OVAL, CHECK, HORIZONTAL, VERTICAL and INCLINED lines One can supply the customizable background and foreground for the PDFPattern It can works with PDFImage and user specified Graphics too. PDFPattern will be renderered according to the following preference : 1. First preference will be given to the PatternGraphics 2. Second preference will be given to the PDFImage 3. If both PatternGraphics and PDFImage are null, then Pattern will be renderered according to the PatternStyle.
| Field Summary | |
static int |
CHECK_PATTERN
Represents the CHECK pattern The possible value for the PDFPattern style |
static int |
CIRCLE_PATTERN
Represents the CIRCLE pattern The possible value for the PDFPattern style |
static int |
HORIZONTAL_LINE_PATTERN
Represents the HORIZONTAL LINE pattern The possible value for the PDFPattern style |
static int |
INCLINED_LINE_PATTERN
Represents the INCLINED LINE pattern The possible value for the PDFPattern style |
static int |
OVAL_PATTERN
Represents the OVAL pattern The possible value for the PDFPattern style |
static int |
STAR_PATTERN
Represents the STAR pattern The possible value for the PDFPattern style |
static int |
VERTICAL_LINE_PATTERN
Represents the VERTICAL LINE pattern The possible value for the PDFPattern style |
| Constructor Summary | |
PDFPattern()
Constructs the PDFPattern |
|
| Method Summary | |
java.lang.Object |
clone()
Returns the clone of this object |
java.awt.Color |
getBackground()
Returns the background color of the PDFPattern |
int |
getBoundingBoxHeight()
Returns the bounding box height of the PDFPattern |
int |
getBoundingBoxWidth()
Returns the bounding box width of the PDFPattern |
java.awt.Color |
getForeground()
Returns the foreground color of the PDFPattern |
java.lang.String |
getName()
Returns the name of the PDFPattern |
java.lang.String |
getPatternGraphics()
Returns the pattern graphics of the PDFPattern |
int |
getPatternStyle()
Returns the pattern style of the PDFPattern |
PDFImage |
getPDFImage()
Returns the PDFImage, which used as a pattern |
void |
setBackground(java.awt.Color background)
Sets the background color for the PDFPattern |
void |
setBoundingBoxHeight(int boundingBoxHeight)
Sets the bounding box height for the PDFPattern |
void |
setBoundingBoxWidth(int boundingBoxWidth)
Sets the bounding box width for the PDFPattern |
void |
setForeground(java.awt.Color foreground)
Sets the foreground color for the PDFPattern |
void |
setImage(PDFImage pdfImage)
Sets the PDFImage as a pattern |
void |
setPatternGraphics(java.lang.String patternGraphics)
Sets the pattern graphics for the PDFPattern |
void |
setPatternStyle(int patternStyle)
Sets the PatternStyle for the PDFPattern |
| Methods inherited from class com.elegantj.pdf.PDFObject |
getPDFObjectID, getPDFObjectRefStr, getPDFObjectType, setPDFObjectID, setPDFObjectType |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int STAR_PATTERN
public static final int CIRCLE_PATTERN
public static final int OVAL_PATTERN
public static final int CHECK_PATTERN
public static final int HORIZONTAL_LINE_PATTERN
public static final int VERTICAL_LINE_PATTERN
public static final int INCLINED_LINE_PATTERN
| Constructor Detail |
public PDFPattern()
| Method Detail |
public void setPatternStyle(int patternStyle)
patternStyle - The possible values are STAR_PATTERN, CIRCLE_PATTERN, OVAL_PATTERN,
CHECK_PATTERN, HORIZONTAL_LINE_PATTERN, "VERTICAL_LINE_PATTERN, INCLINED_LINE_PATTERNpublic int getPatternStyle()
public void setBackground(java.awt.Color background)
background - The background color
This background color will be considered only,
if PDFImage is not set as a PDFPattern using metohd setImage,
and also user specified pattern is not set using method setPatternGraphics
Default value of the background color is Whitepublic java.awt.Color getBackground()
public void setForeground(java.awt.Color foreground)
foreground - The background color
This foreground color will be considered only,
if PDFImage is not set as a PDFPattern using method setImage,
and also user specified pattern is not set using method setPatternGraphics
Default value of the foreground color is Bluepublic java.awt.Color getForeground()
public void setImage(PDFImage pdfImage)
pdfImage - The PDFImage, to set as a pattern
If one can set the PDFImage for the PDFPattern
then the Pattern Style, Background, Foreground and PatternGraphics
will not be consideredpublic PDFImage getPDFImage()
public void setBoundingBoxWidth(int boundingBoxWidth)
boundingBoxWidth - The bounding box width
If user want only predefined types of Pattern style then no need to set it
This will be only considered, if the customize graphics pattern is set
and predefined pattern style is not setpublic int getBoundingBoxWidth()
public void setBoundingBoxHeight(int boundingBoxHeight)
public int getBoundingBoxHeight()
public void setPatternGraphics(java.lang.String patternGraphics)
patternGraphics - The pattern graphics for the PDFPattern
If user want to use only predefined types of Pattern style, then no need to set it.
This graphics must be according to the PDF Specification.
If this graphics is not proper, then Acrobat Reader could not open this
PDF file successfully.
If one can set the pattern graphics for the PDFPattern
explicitly, then the Foreground, Background, PatternStyle will be not considered,
also user have to set the BoundingBoxWidth and BoundingBoxHeight if has set the pattern graphics,
Other wise this pattern graphics not working and the pattern generated
based on the current pattern stylepublic java.lang.String getPatternGraphics()
public java.lang.String getName()
public java.lang.Object clone()
|
ElegantJ PDF Library Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||