org.icepdf.core.pobjects.annotations
Class BorderStyle

java.lang.Object
  extended by org.icepdf.core.pobjects.Dictionary
      extended by org.icepdf.core.pobjects.annotations.BorderStyle

public class BorderStyle
extends Dictionary

BorderStyle state of a PDF annotation. Some values of this class are mutable and do not change the value of the underlying PDF in any way. They are only keep in memory for the duration that the PDF document is open.

Refer to: 8.4.3 Border Styles

Key Type Value
Type name (Optional) The type of PDF object that this dictionary describes; if present, must be Border for a border style dictionary.
W number (Optional) The border width in points. If this value is 0, no border is drawn. Default value: 1.
S name (Optional) The border style:
S (Solid) A solid rectangle surrounding the annotation.
D (Dashed) A dashed rectangle surrounding the annotation. The dash pattern is specified by the D entry (see below).
B (Beveled) A simulated embossed rectangle that appears to be raised above the surface of the page.
I (Inset) A simulated engraved rectangle that appears to be recessed below the surface of the page.
U (Underline) A single line along the bottom of the annotation rectangle.
Default value: S.
D array (Optional) A dash array defining a pattern of dashes and gaps to be used in drawing a dashed border (border style D above). The dash array is specified in the same format as in the line dash pattern parameter of the graphics state (see "Line Dash Pattern" on page 187). The dash phase is not specified and is assumed to be 0. For example, a D entry of [3 2] specifies a border drawn with 3-point dashes alternating with 2-point gaps. Default value: [3].

Since:
2.5
Author:
Mark Collette

Field Summary
static Name BORDER_DASH_KEY
           
static Name BORDER_STYLE_BEVELED
          Beveled rectangle border style surrounding the annotation
static Name BORDER_STYLE_DASHED
          Dashed rectangle border style surrounding the annotation
static Name BORDER_STYLE_INSET
          Inset rectangle border style surrounding the annotation
static Name BORDER_STYLE_KEY
           
static Name BORDER_STYLE_SOLID
          Solid rectangle border style surrounding the annotation
static Name BORDER_STYLE_UNDERLINE
          Underline rectangle border style surrounding the annotation
static Name BORDER_WIDTH_KEY
           
static java.awt.Color DARK
           
static java.awt.Color DARKEST
           
static java.awt.Color LIGHT
           
static java.awt.Color LIGHTEST
           
 
Fields inherited from class org.icepdf.core.pobjects.Dictionary
entries, FORM_TYPE_KEY, inited, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY
 
Constructor Summary
BorderStyle()
           
BorderStyle(Library l, java.util.HashMap h)
          Creates a new instance of a BorderStyle.
 
Method Summary
 Name getBorderStyle()
           
 float[] getDashArray()
           
 float getStrokeWidth()
           
 boolean isStyleBeveled()
           
 boolean isStyleDashed()
           
 boolean isStyleInset()
           
 boolean isStyleSolid()
           
 boolean isStyleUnderline()
           
 void setBorderStyle(Name lineStyle)
          Sets the borderStyle type for this instance.
 void setDashArray(float[] dashArray)
           
 void setStrokeWidth(float strokeWidth)
          Sets the stroke width of the border style.
 
Methods inherited from class org.icepdf.core.pobjects.Dictionary
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, init, isDeleted, isNew, setDeleted, setNew, setPObjectReference, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BORDER_STYLE_KEY

public static final Name BORDER_STYLE_KEY

BORDER_WIDTH_KEY

public static final Name BORDER_WIDTH_KEY

BORDER_DASH_KEY

public static final Name BORDER_DASH_KEY

DARKEST

public static final java.awt.Color DARKEST

DARK

public static final java.awt.Color DARK

LIGHT

public static final java.awt.Color LIGHT

LIGHTEST

public static final java.awt.Color LIGHTEST

BORDER_STYLE_SOLID

public static final Name BORDER_STYLE_SOLID
Solid rectangle border style surrounding the annotation


BORDER_STYLE_DASHED

public static final Name BORDER_STYLE_DASHED
Dashed rectangle border style surrounding the annotation


BORDER_STYLE_BEVELED

public static final Name BORDER_STYLE_BEVELED
Beveled rectangle border style surrounding the annotation


BORDER_STYLE_INSET

public static final Name BORDER_STYLE_INSET
Inset rectangle border style surrounding the annotation


BORDER_STYLE_UNDERLINE

public static final Name BORDER_STYLE_UNDERLINE
Underline rectangle border style surrounding the annotation

Constructor Detail

BorderStyle

public BorderStyle(Library l,
                   java.util.HashMap h)
Creates a new instance of a BorderStyle.

Parameters:
l - document library.
h - dictionary entries.

BorderStyle

public BorderStyle()
Method Detail

getStrokeWidth

public float getStrokeWidth()

getBorderStyle

public Name getBorderStyle()

setStrokeWidth

public void setStrokeWidth(float strokeWidth)
Sets the stroke width of the border style. Default value 1.0.

Parameters:
strokeWidth - float value representing width.

setBorderStyle

public void setBorderStyle(Name lineStyle)
Sets the borderStyle type for this instance.

Parameters:
lineStyle - border style type as defined by, BORDER_STYLE_SOLID, BORDER_STYLE_DASHED, BORDER_STYLE_BEVELED, BORDER_STYLE_INSET, BORDER_STYLE_UNDERLINE

isStyleSolid

public boolean isStyleSolid()

isStyleDashed

public boolean isStyleDashed()

isStyleBeveled

public boolean isStyleBeveled()

isStyleInset

public boolean isStyleInset()

isStyleUnderline

public boolean isStyleUnderline()

setDashArray

public void setDashArray(float[] dashArray)

getDashArray

public float[] getDashArray()