Class PDBoxStyle
java.lang.Object
org.apache.pdfbox.pdmodel.documentinterchange.prepress.PDBoxStyle
- All Implemented Interfaces:
COSObjectable
The Box Style specifies visual characteristics for displaying box areas.
- Author:
- Ben Litchfield
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault Constructor.PDBoxStyle
(COSDictionary dic) Constructor for an existing BoxStyle element. -
Method Summary
Modifier and TypeMethodDescriptionConvert this standard java object to a COS object.Get the RGB color to be used for the guidelines.Get the style for the guideline.float
Get the width of the of the guideline in default user space units.Get the line dash pattern for this box style.void
setGuideLineColor
(PDColor color) Set the color space instance for this box style.void
setGuidelineStyle
(String style) Set the style for the box.void
setGuidelineWidth
(float width) Set the guideline width.void
setLineDashPattern
(COSArray dashArray) Set the line dash pattern associated with this box style.
-
Field Details
-
GUIDELINE_STYLE_SOLID
Style for guideline.- See Also:
-
GUIDELINE_STYLE_DASHED
Style for guideline.- See Also:
-
-
Constructor Details
-
PDBoxStyle
public PDBoxStyle()Default Constructor. -
PDBoxStyle
Constructor for an existing BoxStyle element.- Parameters:
dic
- The existing dictionary.
-
-
Method Details
-
getCOSObject
Convert this standard java object to a COS object.- Specified by:
getCOSObject
in interfaceCOSObjectable
- Returns:
- The cos object that matches this Java object.
-
getGuidelineColor
Get the RGB color to be used for the guidelines. This is guaranteed to not return null. The default color is [0,0,0].- Returns:
- The guideline color.
-
setGuideLineColor
Set the color space instance for this box style. This must be a PDDeviceRGB!- Parameters:
color
- The new colorspace value.
-
getGuidelineWidth
public float getGuidelineWidth()Get the width of the of the guideline in default user space units. The default is 1.- Returns:
- The width of the guideline.
-
setGuidelineWidth
public void setGuidelineWidth(float width) Set the guideline width.- Parameters:
width
- The width in default user space units.
-
getGuidelineStyle
Get the style for the guideline. The default is "S" for solid.- Returns:
- The guideline style.
- See Also:
-
setGuidelineStyle
Set the style for the box.- Parameters:
style
- The style for the box line.- See Also:
-
getLineDashPattern
Get the line dash pattern for this box style. This is guaranteed to not return null. The default is [3],0.- Returns:
- The line dash pattern.
-
setLineDashPattern
Set the line dash pattern associated with this box style.- Parameters:
dashArray
- The patter for this box style.
-