org.apache.fop.traits

## Class BorderProps

- java.lang.Object
- - org.apache.fop.traits.BorderProps

All Implemented Interfaces:
  Serializable

    public class BorderProps
    extends Object
    implements Serializable

Border properties. Class to store border trait properties for the area tree.

See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`static class` `BorderProps.Mode`

### Field Summary

Fields
`Color` `color` Border color
`int` `style` Border style (one of EN_*)
`int` `width` Border width

### Constructor Summary

Constructors
Constructor and Description
`BorderProps(int style, int width, int radiusStart, int radiusEnd, Color color, BorderProps.Mode mode)` Constructs a new BorderProps instance.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`boolean` `equals(Object obj)`
`static int` `getClippedWidth(BorderProps bp)`
`BorderProps.Mode` `getMode()`
`int` `getRadiusEnd()`
`int` `getRadiusStart()`
`int` `hashCode()`
`boolean` `isCollapseOuter()`
`static BorderProps` `makeRectangular(int style, int width, Color color, BorderProps.Mode mode)` Factory method for a new BorderProps instance with rectangular corners.
`String` `toString()`
`static BorderProps` `valueOf(FOUserAgent foUserAgent, String s)` Returns a BorderProps represtation of a string of the format as written by BorderProps.toString().

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### style

    public final int style

Border style (one of EN_*)

#### color

    public final Color color

Border color

#### width

    public final int width

Border width

### Constructor Detail

#### BorderProps

    public BorderProps(int style,
                       int width,
                       int radiusStart,
                       int radiusEnd,
                       Color color,
                       BorderProps.Mode mode)

Constructs a new BorderProps instance.

Parameters:
  `style` - border style (one of EN_*)
  `width` - border width
  `radiusStart` - radius of start corner in the direction perpendicular to border segment
  `radiusEnd` - radius of end corner in the direction perpendicular to border segment
  `color` - border color
  `mode` - border mode ((one of SEPARATE, COLLAPSE_INNER and COLLAPSE_OUTER)

### Method Detail

#### makeRectangular

    public static BorderProps makeRectangular(int style,
                                              int width,
                                              Color color,
                                              BorderProps.Mode mode)

Factory method for a new BorderProps instance with rectangular corners.

Parameters:
  `style` - border style (one of EN_*)
  `width` - border width
  `color` - border color
  `mode` - border mode ((one of SEPARATE, COLLAPSE_INNER and COLLAPSE_OUTER)

#### getRadiusStart

    public int getRadiusStart()

Returns:
  the radius of the corner adjacent to the before or start border

#### getRadiusEnd

    public int getRadiusEnd()

Returns:
  the radius of the corner adjacent to the after or end border

#### getMode

    public BorderProps.Mode getMode()

Returns:
  the border mode ((one of SEPARATE, COLLAPSE_INNER and COLLAPSE_OUTER)

#### getClippedWidth

    public static int getClippedWidth(BorderProps bp)

Parameters:
  `bp` - the border properties or null
Returns:
  the effective width of the clipped part of the border

#### isCollapseOuter

    public boolean isCollapseOuter()

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### valueOf

    public static BorderProps valueOf(FOUserAgent foUserAgent,
                                      String s)

Returns a BorderProps represtation of a string of the format as written by BorderProps.toString().

Parameters:
  `foUserAgent` - FOP user agent caching ICC profiles
  `s` - the string
Returns:
  a BorderProps instance

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`