Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.documentinterchange.prepress

public Class PDBoxStyle

extends Object
implements COSObjectable
Class Inheritance
All Implemented Interfaces
org.apache.pdfbox.pdmodel.common.COSObjectable
Imports
org.apache.pdfbox.cos.COSArray, .COSDictionary, .COSInteger, .COSName, org.apache.pdfbox.pdmodel.common.COSObjectable, org.apache.pdfbox.pdmodel.graphics.PDLineDashPattern, org.apache.pdfbox.pdmodel.graphics.color.PDColor, .PDDeviceRGB

The Box Style specifies visual characteristics for displaying box areas.
Author
Ben Litchfield

Field Summary

Modifier and TypeField and Description
private final COSDictionary
public static final String
GUIDELINE_STYLE_DASHED

Style for guideline.

public static final String
GUIDELINE_STYLE_SOLID

Style for guideline.

Constructor Summary

AccessConstructor and Description
public
PDBoxStyle()

Default Constructor.

public
PDBoxStyle(COSDictionary
The existing dictionary.
dic
)

Constructor for an existing BoxStyle element.

Method Summary

Modifier and TypeMethod and Description
public COSDictionary

Returns:

The cos object that matches this Java object.
getCOSObject
()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Convert this standard java object to a COS object.

public PDColor

Returns:

The guideline color.
getGuidelineColor
()

Get the RGB color to be used for the guidelines.

public String

Returns:

The guideline style.
getGuidelineStyle
()

Get the style for the guideline.

public float

Returns:

The width of the guideline.
getGuidelineWidth
()

Get the width of the of the guideline in default user space units.

public PDLineDashPattern

Returns:

The line dash pattern.
getLineDashPattern
()

Get the line dash pattern for this box style.

public void
setGuideLineColor(PDColor
The new colorspace value.
color
)

Set the color space instance for this box style.

public void
setGuidelineStyle(String
The style for the box line.
style
)

Set the style for the box.

public void
setGuidelineWidth(float
The width in default user space units.
width
)

Set the guideline width.

public void
setLineDashPattern(COSArray
The patter for this box style.
dashArray
)

Set the line dash pattern associated with this box style.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dictionaryback to summary
private final COSDictionary dictionary
GUIDELINE_STYLE_DASHEDback to summary
public static final String GUIDELINE_STYLE_DASHED

Style for guideline.

GUIDELINE_STYLE_SOLIDback to summary
public static final String GUIDELINE_STYLE_SOLID

Style for guideline.

Constructor Detail

PDBoxStyleback to summary
public PDBoxStyle()

Default Constructor.

PDBoxStyleback to summary
public PDBoxStyle(COSDictionary dic)

Constructor for an existing BoxStyle element.

Parameters
dic:COSDictionary

The existing dictionary.

Method Detail

getCOSObjectback to summary
public COSDictionary getCOSObject()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Convert this standard java object to a COS object.

Returns:COSDictionary

The cos object that matches this Java object.

Annotations
@Override
getGuidelineColorback to summary
public PDColor 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:PDColor

The guideline color.

getGuidelineStyleback to summary
public String getGuidelineStyle()

Get the style for the guideline. The default is "S" for solid.

Returns:String

The guideline style.

See Also
PDBoxStyle#GUIDELINE_STYLE_DASHED, PDBoxStyle#GUIDELINE_STYLE_SOLID
getGuidelineWidthback to summary
public float getGuidelineWidth()

Get the width of the of the guideline in default user space units. The default is 1.

Returns:float

The width of the guideline.

getLineDashPatternback to summary
public PDLineDashPattern getLineDashPattern()

Get the line dash pattern for this box style. This is guaranteed to not return null. The default is [3],0.

Returns:PDLineDashPattern

The line dash pattern.

setGuideLineColorback to summary
public void setGuideLineColor(PDColor color)

Set the color space instance for this box style. This must be a PDDeviceRGB!

Parameters
color:PDColor

The new colorspace value.

setGuidelineStyleback to summary
public void setGuidelineStyle(String style)

Set the style for the box.

Parameters
style:String

The style for the box line.

See Also
PDBoxStyle#GUIDELINE_STYLE_DASHED, PDBoxStyle#GUIDELINE_STYLE_SOLID
setGuidelineWidthback to summary
public void setGuidelineWidth(float width)

Set the guideline width.

Parameters
width:float

The width in default user space units.

setLineDashPatternback to summary
public void setLineDashPattern(COSArray dashArray)

Set the line dash pattern associated with this box style.

Parameters
dashArray:COSArray

The patter for this box style.