Package org.apache.fop.traits
Class BorderProps
java.lang.Object
org.apache.fop.traits.BorderProps
- All Implemented Interfaces:
Serializable
Border properties.
Class to store border trait properties for the area tree.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Color
Border colorprivate final BorderProps.Mode
Border modeprivate final int
private final int
private static final long
final int
Border style (one of EN_*)final int
Border width -
Constructor Summary
ConstructorsModifierConstructorDescriptionBorderProps
(int style, int width, int radiusStart, int radiusEnd, Color color, BorderProps.Mode mode) Constructs a new BorderProps instance.private
BorderProps
(String style, int width, int radiusStart, int radiusEnd, Color color, BorderProps.Mode mode) -
Method Summary
Modifier and TypeMethodDescriptionboolean
static int
private static int
getConstantForStyle
(String style) getMode()
int
int
private String
int
hashCode()
boolean
static BorderProps
makeRectangular
(int style, int width, Color color, BorderProps.Mode mode) Factory method for a new BorderProps instance with rectangular corners.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
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
style
public final int styleBorder style (one of EN_*) -
color
Border color -
width
public final int widthBorder width -
radiusStart
private final int radiusStart -
radiusEnd
private final int radiusEnd -
mode
Border mode
-
-
Constructor Details
-
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 widthradiusStart
- radius of start corner in the direction perpendicular to border segmentradiusEnd
- radius of end corner in the direction perpendicular to border segmentcolor
- border colormode
- border mode ((one of SEPARATE, COLLAPSE_INNER and COLLAPSE_OUTER)
-
BorderProps
private BorderProps(String style, int width, int radiusStart, int radiusEnd, Color color, BorderProps.Mode mode)
-
-
Method Details
-
makeRectangular
Factory method for a new BorderProps instance with rectangular corners.- Parameters:
style
- border style (one of EN_*)width
- border widthcolor
- border colormode
- 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
- Returns:
- the border mode ((one of SEPARATE, COLLAPSE_INNER and COLLAPSE_OUTER)
-
getClippedWidth
- Parameters:
bp
- the border properties or null- Returns:
- the effective width of the clipped part of the border
-
getStyleString
-
getConstantForStyle
-
isCollapseOuter
public boolean isCollapseOuter() -
hashCode
public int hashCode() -
equals
-
valueOf
Returns a BorderProps represtation of a string of the format as written by BorderProps.toString().- Parameters:
foUserAgent
- FOP user agent caching ICC profiless
- the string- Returns:
- a BorderProps instance
-
toString
-