org.apache.fop.traits

Class BorderProps

Implemented Interfaces:
Serializable

public class BorderProps
extends java.lang.Object
implements Serializable

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

Field Summary

static int
COLLAPSE_INNER
Collapsing border model, for borders inside a table
static int
COLLAPSE_OUTER
Collapsing border model, for borders at the table's outer border
static int
SEPARATE
Separate border model
Color
color
Border color
int
mode
Border mode (one of SEPARATE, COLLAPSE_INNER and COLLAPSE_OUTER)
int
style
Border style (one of EN_*)
int
width
Border width

Constructor Summary

BorderProps(String style, int width, Color color, int mode)
Constructs a new BorderProps instance.
BorderProps(int style, int width, Color color, int mode)
Constructs a new BorderProps instance.

Method Summary

boolean
equals(Object obj)
static int
getClippedWidth(BorderProps bp)
int
hashCode()
String
toString()
static BorderProps
valueOf(FOUserAgent foUserAgent, String s)
Returns a BorderProps represtation of a string of the format as written by BorderProps.toString().

Field Details

COLLAPSE_INNER

public static final int COLLAPSE_INNER
Collapsing border model, for borders inside a table
Field Value:
1

COLLAPSE_OUTER

public static final int COLLAPSE_OUTER
Collapsing border model, for borders at the table's outer border
Field Value:
2

SEPARATE

public static final int SEPARATE
Separate border model
Field Value:
0

color

public Color color
Border color

mode

public int mode
Border mode (one of SEPARATE, COLLAPSE_INNER and COLLAPSE_OUTER)

style

public int style
Border style (one of EN_*)

width

public int width
Border width

Constructor Details

BorderProps

public BorderProps(String style,
                   int width,
                   Color color,
                   int mode)
Constructs a new BorderProps instance.
Parameters:
style - border style (one of the XSL enum values for border style)
width - border width
color - border color
mode - border mode ((one of SEPARATE, COLLAPSE_INNER and COLLAPSE_OUTER)

BorderProps

public BorderProps(int style,
                   int width,
                   Color color,
                   int mode)
Constructs a new BorderProps instance.
Parameters:
style - border style (one of EN_*)
width - border width
color - border color
mode - border mode ((one of SEPARATE, COLLAPSE_INNER and COLLAPSE_OUTER)

Method Details

equals

public boolean equals(Object obj)
See Also:
java.lang.Object.equals(java.lang.Object)

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

hashCode

public int hashCode()
See Also:
java.lang.Object.hashCode()

toString

public String toString()
See Also:
java.lang.Object.toString()

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

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.