org.pdfbox.pdmodel.documentinterchange.prepress
Class PDBoxStyle
java.lang.Object
org.pdfbox.pdmodel.documentinterchange.prepress.PDBoxStyle
- COSObjectable
public class PDBoxStyle
extends java.lang.Object
The Box Style specifies visual characteristics for displaying box areas.
GUIDELINE_STYLE_DASHED
public static final String GUIDELINE_STYLE_DASHED
Style for guideline.
GUIDELINE_STYLE_SOLID
public static final String GUIDELINE_STYLE_SOLID
Style for guideline.
PDBoxStyle
public PDBoxStyle()
Default Constructor.
PDBoxStyle
public PDBoxStyle(COSDictionary dic)
Constructor for an existing BoxStyle element.
dic
- The existing dictionary.
getCOSObject
public COSBase getCOSObject()
Convert this standard java object to a COS object.
- getCOSObject in interface COSObjectable
- The cos object that matches this Java object.
getDictionary
public COSDictionary getDictionary()
Convert this standard java object to a COS object.
- The cos object that matches this Java object.
getGuidelineColor
public PDColorSpaceInstance getGuidelineColor()
Get the color to be used for the guidelines. This is guaranteed to
not return null. The color space will always be DeviceRGB and the
default color is [0,0,0].
getGuidelineStyle
public String getGuidelineStyle()
Get the style for the guideline. The default is "S" for solid.
getGuidelineWidth
public float getGuidelineWidth()
Get the width of the of the guideline in default user space units.
The default is 1.
- The width of the guideline.
getLineDashPattern
public PDLineDashPattern getLineDashPattern()
Get the line dash pattern for this box style. This is guaranteed to not
return null. The default is [3],0.
setGuideLineColor
public void setGuideLineColor(PDColorSpaceInstance color)
Set the color space instance for this box style. This must be a
PDDeviceRGB!
color
- The new colorspace value.
setGuidelineStyle
public void setGuidelineStyle(String style)
Set the style for the box.
style
- The style for the box line.
setGuidelineWidth
public void setGuidelineWidth(float width)
Set the guideline width.
width
- The width in default user space units.
setLineDashPattern
public void setLineDashPattern(PDLineDashPattern pattern)
Set the line dash pattern associated with this box style.
pattern
- The patter for this box style.