org.apache.fop.area

Class Trait

Implemented Interfaces:
Serializable

public class Trait
extends java.lang.Object
implements Serializable

Area traits used for rendering. This class represents an area trait that specifies a value for rendering.

Nested Class Summary

static class
Trait.Background
Background trait structure.
static class
Trait.InternalLink
Class for internal link traits.

Field Summary

static Integer
BACKGROUND
Background trait for an area.
static Integer
BLINK
Blinking trait used when rendering inline parent.
static Integer
BORDER_AFTER
The border after.
static Integer
BORDER_BEFORE
The border before.
static Integer
BORDER_END
The border end.
static Integer
BORDER_START
The border start.
static Integer
COLOR
The current color.
static Integer
END_INDENT
The end-indent trait.
static Integer
EXTERNAL_LINK
External link.
static Integer
FONT
The font triplet for the current font.
static Integer
FONT_SIZE
Font size for the current font.
static Integer
INTERNAL_LINK
Internal link trait.
static Integer
IS_REFERENCE_AREA
The is-reference-area trait.
static Integer
IS_VIEWPORT_AREA
The is-viewport-area trait.
static Integer
LINETHROUGH
Linethrough trait used when rendering inline parent.
static Integer
LINETHROUGH_COLOR
Trait for color of linethrough decorations when rendering inline parent.
static int
MAX_TRAIT_KEY
Maximum value used by trait keys
static Integer
OVERLINE
Overline trait used when rendering inline parent.
static Integer
OVERLINE_COLOR
Trait for color of overline decorations when rendering inline parent.
static Integer
PADDING_AFTER
The padding after.
static Integer
PADDING_BEFORE
The padding before.
static Integer
PADDING_END
The padding end.
static Integer
PADDING_START
The padding start.
static Integer
PROD_ID
The ID of the FO that produced an area.
static Integer
SPACE_AFTER
The space-after trait.
static Integer
SPACE_BEFORE
The space-before trait.
static Integer
SPACE_END
The space end.
static Integer
SPACE_START
The space start.
static Integer
START_INDENT
The start-indent trait.
static Integer
UNDERLINE
Underline trait used when rendering inline parent.
static Integer
UNDERLINE_COLOR
Trait for color of underline decorations when rendering inline parent.

Constructor Summary

Trait()
Create a new empty trait.
Trait(Object propType, Object data)
Create a trait with the value and type.

Method Summary

Object
getData()
Returns the trait data value.
Object
getPropType()
Returns the property type.
static Class
getTraitClass(Object traitCode)
Get the data storage class for the trait.
static String
getTraitName(Object traitCode)
Get the trait name for a trait code.
String
toString()
Return the string for debugging.

Field Details

BACKGROUND

public static final Integer BACKGROUND
Background trait for an area.

BLINK

public static final Integer BLINK
Blinking trait used when rendering inline parent.

BORDER_AFTER

public static final Integer BORDER_AFTER
The border after.

BORDER_BEFORE

public static final Integer BORDER_BEFORE
The border before.

BORDER_END

public static final Integer BORDER_END
The border end.

BORDER_START

public static final Integer BORDER_START
The border start.

COLOR

public static final Integer COLOR
The current color.

END_INDENT

public static final Integer END_INDENT
The end-indent trait.

EXTERNAL_LINK

public static final Integer EXTERNAL_LINK
External link. A URL link to an external resource.

FONT

public static final Integer FONT
The font triplet for the current font.

FONT_SIZE

public static final Integer FONT_SIZE
Font size for the current font.

INTERNAL_LINK

public static final Integer INTERNAL_LINK
Internal link trait. Contains the PageViewport key and the PROD_ID of the target area

IS_REFERENCE_AREA

public static final Integer IS_REFERENCE_AREA
The is-reference-area trait.

IS_VIEWPORT_AREA

public static final Integer IS_VIEWPORT_AREA
The is-viewport-area trait.

LINETHROUGH

public static final Integer LINETHROUGH
Linethrough trait used when rendering inline parent.

LINETHROUGH_COLOR

public static final Integer LINETHROUGH_COLOR
Trait for color of linethrough decorations when rendering inline parent.

MAX_TRAIT_KEY

public static final int MAX_TRAIT_KEY
Maximum value used by trait keys
Field Value:
36

OVERLINE

public static final Integer OVERLINE
Overline trait used when rendering inline parent.

OVERLINE_COLOR

public static final Integer OVERLINE_COLOR
Trait for color of overline decorations when rendering inline parent.

PADDING_AFTER

public static final Integer PADDING_AFTER
The padding after.

PADDING_BEFORE

public static final Integer PADDING_BEFORE
The padding before.

PADDING_END

public static final Integer PADDING_END
The padding end.

PADDING_START

public static final Integer PADDING_START
The padding start.

PROD_ID

public static final Integer PROD_ID
The ID of the FO that produced an area.

SPACE_AFTER

public static final Integer SPACE_AFTER
The space-after trait.

SPACE_BEFORE

public static final Integer SPACE_BEFORE
The space-before trait.

SPACE_END

public static final Integer SPACE_END
The space end.

SPACE_START

public static final Integer SPACE_START
The space start.

START_INDENT

public static final Integer START_INDENT
The start-indent trait.

UNDERLINE

public static final Integer UNDERLINE
Underline trait used when rendering inline parent.

UNDERLINE_COLOR

public static final Integer UNDERLINE_COLOR
Trait for color of underline decorations when rendering inline parent.

Constructor Details

Trait

public Trait()
Create a new empty trait.

Trait

public Trait(Object propType,
             Object data)
Create a trait with the value and type.
Parameters:
propType - the type of trait
data - the data value

Method Details

getData

public Object getData()
Returns the trait data value.
Returns:
the trait data value

getPropType

public Object getPropType()
Returns the property type.
Returns:
the property type

getTraitClass

public static Class getTraitClass(Object traitCode)
Get the data storage class for the trait.
Parameters:
traitCode - the trait code to lookup
Returns:
the class type for the trait

getTraitName

public static String getTraitName(Object traitCode)
Get the trait name for a trait code.
Parameters:
traitCode - the trait code to get the name for
Returns:
the trait name

toString

public String toString()
Return the string for debugging.

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