enums = new Property[ENUM_COUNT + 1];
}
if (enums[enumValue] == null) {
- enums[enumValue] = new EnumProperty(enumValue, text);
+ enums[enumValue] = EnumProperty.getInstance(enumValue, text);
}
return enums[enumValue];
}
* @throws PropertyException when an exception occur during evaluation.
*/
private Numeric getResolved(PercentBaseContext context) throws PropertyException {
- Numeric n;
switch (operation) {
case ADDITION:
return NumericOp.addition2(op1, op2, context);
// The value of properties relevant for fo:instream-foreign-object
// and external-graphics.
- private CommonAccessibility commonAccessibility;
- private CommonAural commonAural;
private CommonBorderPaddingBackground commonBorderPaddingBackground;
- private CommonMarginInline commonMarginInline;
- private CommonRelativePosition commonRelativePosition;
private Length alignmentAdjust;
private int alignmentBaseline;
private Length baselineShift;
private LengthRangeProperty blockProgressionDimension;
// private ToBeImplementedProperty clip;
private Length contentHeight;
- private String contentType;
private Length contentWidth;
private int displayAlign;
private int dominantBaseline;
private Length height;
private String id;
private LengthRangeProperty inlineProgressionDimension;
- private KeepProperty keepWithNext;
- private KeepProperty keepWithPrevious;
private SpaceProperty lineHeight;
private int overflow;
private int scaling;
- private int scalingMethod;
private int textAlign;
private Length width;
+ // Unused but valid items, commented out for performance:
+ // private CommonAccessibility commonAccessibility;
+ // private CommonAural commonAural;
+ // private CommonMarginInline commonMarginInline;
+ // private CommonRelativePosition commonRelativePosition;
+ // private String contentType;
+ // private KeepProperty keepWithNext;
+ // private KeepProperty keepWithPrevious;
+ // private int scalingMethod;
// End of property values
+
+
/**
* constructs an instream-foreign-object object (called by Maker).
*
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAccessibility = pList.getAccessibilityProps();
- commonAural = pList.getAuralProps();
commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
- commonMarginInline = pList.getMarginInlineProps();
- commonRelativePosition = pList.getRelativePositionProps();
alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
blockProgressionDimension = pList.get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange();
// clip = pList.get(PR_CLIP);
contentHeight = pList.get(PR_CONTENT_HEIGHT).getLength();
- contentType = pList.get(PR_CONTENT_TYPE).getString();
contentWidth = pList.get(PR_CONTENT_WIDTH).getLength();
displayAlign = pList.get(PR_DISPLAY_ALIGN).getEnum();
dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
height = pList.get(PR_HEIGHT).getLength();
id = pList.get(PR_ID).getString();
inlineProgressionDimension = pList.get(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
- keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
- keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
overflow = pList.get(PR_OVERFLOW).getEnum();
scaling = pList.get(PR_SCALING).getEnum();
- scalingMethod = pList.get(PR_SCALING_METHOD).getEnum();
textAlign = pList.get(PR_TEXT_ALIGN).getEnum();
width = pList.get(PR_WIDTH).getLength();
}
*/
public abstract class AbstractListItemPart extends FObj {
// The value of properties relevant for fo:list-item-label and fo:list-item-body.
- private CommonAccessibility commonAccessibility;
private String id;
private KeepProperty keepTogether;
+ // Valid properties, commented out for performance:
+ // private CommonAccessibility commonAccessibility;
// End of property values
/** used for FO validation */
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAccessibility = pList.getAccessibilityProps();
id = pList.get(PR_ID).getString();
keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
}
public class BasicLink extends Inline {
// The value of properties relevant for fo:basic-link.
// private ToBeImplementedProperty destinationPlacementOffset;
- private int dominantBaseline;
private String externalDestination;
// private ToBeImplementedProperty indicateDestination;
private String internalDestination;
// private ToBeImplementedProperty targetProcessingContext;
// private ToBeImplementedProperty targetPresentationContext;
// private ToBeImplementedProperty targetStylesheet;
+ // Unused but valid items, commented out for performance:
+ // private int dominantBaseline;
// End of property values
// used only for FO validation
public void bind(PropertyList pList) throws FOPException {
super.bind(pList);
// destinationPlacementOffset = pList.get(PR_DESTINATION_PLACEMENT_OFFSET);
- dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
externalDestination = pList.get(PR_EXTERNAL_DESTINATION).getString();
// indicateDestination = pList.get(PR_INDICATE_DESTINATION);
internalDestination = pList.get(PR_INTERNAL_DESTINATION).getString();
// used for FO validation
private boolean blockOrInlineItemFound = false;
private boolean canHaveBlockLevelChildren = true;
-
// The value of properties relevant for fo:bidi-override.
- private CommonAural commonAural;
- private CommonFont commonFont;
- private CommonRelativePosition commonRelativePosition;
- private Color prColor;
// private ToBeImplementedProperty prDirection;
// private ToBeImplementedProperty prLetterSpacing;
private SpaceProperty lineHeight;
// private ToBeImplementedProperty prScoreSpaces;
// private ToBeImplementedProperty prUnicodeBidi;
- private SpaceProperty prWordSpacing;
+
+ // Unused but valid items, commented out for performance:
+ // private CommonAural commonAural;
+ // private CommonFont commonFont;
+ // private CommonRelativePosition commonRelativePosition;
+ // private Color prColor;
+ // private SpaceProperty prWordSpacing;
// End of property values
/**
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAural = pList.getAuralProps();
- commonFont = pList.getFontProps();
- commonRelativePosition = pList.getRelativePositionProps();
- prColor = pList.get(PR_COLOR).getColor(getUserAgent());
// prDirection = pList.get(PR_DIRECTION);
// prLetterSpacing = pList.get(PR_LETTER_SPACING);
lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
// prScoreSpaces = pList.get(PR_SCORE_SPACES);
// prUnicodeBidi = pList.get(PR_UNICODE_BIDI);
- prWordSpacing = pList.get(PR_WORD_SPACING).getSpace();
}
/**
private int breakAfter;
private int breakBefore;
private Color color;
- private Length textDepth;
- private Length textAltitude;
private int hyphenationKeep;
private Numeric hyphenationLadderCount;
private String id;
private int textAlign;
private int textAlignLast;
private Length textIndent;
- private int visibility;
private int whiteSpaceCollapse;
private Numeric widows;
private int wrapOption;
+ // Unused but valid items, commented out for performance:
+ // private Length textDepth;
+ // private Length textAltitude;
+ // private int visibility;
// End of property values
/**
breakAfter = pList.get(PR_BREAK_AFTER).getEnum();
breakBefore = pList.get(PR_BREAK_BEFORE).getEnum();
color = pList.get(PR_COLOR).getColor(getUserAgent());
- textDepth = pList.get(PR_TEXT_DEPTH).getLength();
- textAltitude = pList.get(PR_TEXT_ALTITUDE).getLength();
hyphenationKeep = pList.get(PR_HYPHENATION_KEEP).getEnum();
hyphenationLadderCount = pList.get(PR_HYPHENATION_LADDER_COUNT).getNumeric();
id = pList.get(PR_ID).getString();
textAlign = pList.get(PR_TEXT_ALIGN).getEnum();
textAlignLast = pList.get(PR_TEXT_ALIGN_LAST).getEnum();
textIndent = pList.get(PR_TEXT_INDENT).getLength();
- visibility = pList.get(PR_VISIBILITY).getEnum();
whiteSpaceCollapse = pList.get(PR_WHITE_SPACE_COLLAPSE).getEnum();
widows = pList.get(PR_WIDOWS).getNumeric();
wrapOption = pList.get(PR_WRAP_OPTION).getEnum();
private Length height;
private String id;
private LengthRangeProperty inlineProgressionDimension;
- private int intrusionDisplace;
private KeepProperty keepTogether;
private KeepProperty keepWithNext;
private KeepProperty keepWithPrevious;
private int span;
private Length width;
private int writingMode;
- private Numeric zIndex;
+ // Unused but valid items, commented out for performance:
+ // private int intrusionDisplace;
+ // private Numeric zIndex;
// End of property values
/** used for FO validation */
height = pList.get(PR_HEIGHT).getLength();
id = pList.get(PR_ID).getString();
inlineProgressionDimension = pList.get(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
- intrusionDisplace = pList.get(PR_INTRUSION_DISPLACE).getEnum();
keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
span = pList.get(PR_SPAN).getEnum();
width = pList.get(PR_WIDTH).getLength();
writingMode = pList.get(PR_WRITING_MODE).getEnum();
- zIndex = pList.get(PR_Z_INDEX).getNumeric();
}
/**
*/
public class Character extends FObj {
// The value of properties relevant for fo:character.
- private CommonAural commonAural;
private CommonBorderPaddingBackground commonBorderPaddingBackground;
private CommonFont commonFont;
private CommonHyphenation commonHyphenation;
- private CommonMarginInline commonMarginInline;
- private CommonRelativePosition commonRelativePosition;
private Length alignmentAdjust;
- private int treatAsWordSpace;
private int alignmentBaseline;
private Length baselineShift;
private char character;
private Color color;
private int dominantBaseline;
- private Length textDepth;
- private Length textAltitude;
// private ToBeImplementedProperty glyphOrientationHorizontal;
// private ToBeImplementedProperty glyphOrientationVertical;
private String id;
- private KeepProperty keepWithNext;
- private KeepProperty keepWithPrevious;
private Property letterSpacing;
private SpaceProperty lineHeight;
- private int scoreSpaces;
- private int suppressAtLineBreak;
/** Holds the text decoration values. May be null */
private CommonTextDecoration textDecoration;
// private ToBeImplementedProperty textShadow;
- private int textTransform;
- private int visibility;
private Property wordSpacing;
+ // Unused but valid items, commented out for performance:
+ // private CommonAural commonAural;
+ // private CommonMarginInline commonMarginInline;
+ // private CommonRelativePosition commonRelativePosition;
+ // private int treatAsWordSpace;
+ // private Length textDepth;
+ // private Length textAltitude;
+ // private KeepProperty keepWithNext;
+ // private KeepProperty keepWithPrevious;
+ // private int scoreSpaces;
+ // private int suppressAtLineBreak;
+ // private int textTransform;
+ // private int visibility;
// End of property values
/** constant indicating that the character is OK */
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAural = pList.getAuralProps();
commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
commonFont = pList.getFontProps();
commonHyphenation = pList.getHyphenationProps();
- commonMarginInline = pList.getMarginInlineProps();
- commonRelativePosition = pList.getRelativePositionProps();
alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
- treatAsWordSpace = pList.get(PR_TREAT_AS_WORD_SPACE).getEnum();
alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
character = pList.get(PR_CHARACTER).getCharacter();
color = pList.get(PR_COLOR).getColor(getUserAgent());
dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
- textDepth = pList.get(PR_TEXT_DEPTH).getLength();
- textAltitude = pList.get(PR_TEXT_ALTITUDE).getLength();
// glyphOrientationHorizontal = pList.get(PR_GLYPH_ORIENTATION_HORIZONTAL);
// glyphOrientationVertical = pList.get(PR_GLYPH_ORIENTATION_VERTICAL);
id = pList.get(PR_ID).getString();
- keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
- keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
letterSpacing = pList.get(PR_LETTER_SPACING);
lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
- scoreSpaces = pList.get(PR_SCORE_SPACES).getEnum();
- suppressAtLineBreak = pList.get(PR_SUPPRESS_AT_LINE_BREAK).getEnum();
textDecoration = pList.getTextDecorationProps();
// textShadow = pList.get(PR_TEXT_SHADOW);
- textTransform = pList.get(PR_TEXT_TRANSFORM).getEnum();
- visibility = pList.get(PR_VISIBILITY).getEnum();
wordSpacing = pList.get(PR_WORD_SPACING);
}
* fo:float element.
*/
public class Float extends FObj {
- // The value of properties relevant for fo:float.
- private int float_;
- private int clear;
+ // The value of properties relevant for fo:float (commented out for performance.
+ // private int float_;
+ // private int clear;
// End of property values
static boolean notImplementedWarningGiven = false;
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- float_ = pList.get(PR_FLOAT).getEnum();
- clear = pList.get(PR_CLEAR).getEnum();
+ // No active properties -> Nothing to do.
}
/**
* Class modelling the fo:footnote object.
*/
public class Footnote extends FObj {
- // The value of properties relevant for fo:footnote.
- private CommonAccessibility commonAccessibility;
+ // The value of properties relevant for fo:footnote (commented out for performance).
+ // private CommonAccessibility commonAccessibility;
// End of property values
private Inline footnoteCitation = null;
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAccessibility = pList.getAccessibilityProps();
+ // No active properties -> do nothing.
}
/**
* Class modelling the fo:footnote-body object.
*/
public class FootnoteBody extends FObj {
- // The value of properties relevant for fo:footnote-body.
- private CommonAccessibility commonAccessibility;
+ // The value of properties relevant for fo:footnote-body (commented out for perforance).
+ // private CommonAccessibility commonAccessibility;
// End of property values
/**
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAccessibility = pList.getAccessibilityProps();
}
/**
*/
public class InitialPropertySet extends FObj {
// The value of properties relevant for fo:initial-property-set.
- private CommonAccessibility commonAccessibility;
- private CommonAural commonAural;
- private CommonBorderPaddingBackground commonBorderPaddingBackground;
- private CommonFont commonFont;
- private CommonRelativePosition commonRelativePosition;
- private Color color;
private String id;
// private ToBeImplementedProperty letterSpacing;
private SpaceProperty lineHeight;
- private int scoreSpaces;
- private int textDecoration;
// private ToBeImplementedProperty textShadow;
- private int textTransform;
- private SpaceProperty wordSpacing;
+ // Unused but valid items, commented out for performance:
+ // private CommonAccessibility commonAccessibility;
+ // private CommonAural commonAural;
+ // private CommonBorderPaddingBackground commonBorderPaddingBackground;
+ // private CommonFont commonFont;
+ // private CommonRelativePosition commonRelativePosition;
+ // private Color color;
+ // private int scoreSpaces;
+ // private int textDecoration;
+ // private int textTransform;
+ // private SpaceProperty wordSpacing;
// End of property values
/**
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAccessibility = pList.getAccessibilityProps();
- commonAural = pList.getAuralProps();
- commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
- commonFont = pList.getFontProps();
- commonRelativePosition = pList.getRelativePositionProps();
- color = pList.get(PR_COLOR).getColor(getUserAgent());
id = pList.get(PR_ID).getString();
// letterSpacing = pList.get(PR_LETTER_SPACING);
lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
- scoreSpaces = pList.get(PR_SCORE_SPACES).getEnum();
- textDecoration = pList.get(PR_TEXT_DECORATION).getEnum();
// textShadow = pList.get(PR_TEXT_SHADOW);
- textTransform = pList.get(PR_TEXT_TRANSFORM).getEnum();
- wordSpacing = pList.get(PR_WORD_SPACING).getSpace();
}
/**
public class Inline extends InlineLevel {
// The value of properties relevant for fo:inline.
// See also superclass InlineLevel
- private CommonRelativePosition commonRelativePosition;
private Length alignmentAdjust;
private int alignmentBaseline;
private Length baselineShift;
- private LengthRangeProperty blockProgressionDimension;
private int dominantBaseline;
- private Length height;
private String id;
- private LengthRangeProperty inlineProgressionDimension;
- private KeepProperty keepTogether;
- private KeepProperty keepWithNext;
- private KeepProperty keepWithPrevious;
- private Length width;
- private int wrapOption;
+ // Unused but valid items, commented out for performance:
+ // private CommonRelativePosition commonRelativePosition;
+ // private LengthRangeProperty blockProgressionDimension;
+ // private Length height;
+ // private LengthRangeProperty inlineProgressionDimension;
+ // private KeepProperty keepTogether;
+ // private KeepProperty keepWithNext;
+ // private KeepProperty keepWithPrevious;
+ // private Length width;
+ // private int wrapOption;
// End of property values
-
// used for FO validation
private boolean blockOrInlineItemFound = false;
private boolean canHaveBlockLevelChildren = true;
*/
public void bind(PropertyList pList) throws FOPException {
super.bind(pList);
- commonRelativePosition = pList.getRelativePositionProps();
alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
- blockProgressionDimension = pList.get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange();
dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
- height = pList.get(PR_HEIGHT).getLength();
id = pList.get(PR_ID).getString();
- inlineProgressionDimension = pList.get(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
- keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
- keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
- keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
- width = pList.get(PR_WIDTH).getLength();
- wrapOption = pList.get(PR_WRAP_OPTION).getEnum();
}
/**
public class InlineContainer extends FObj {
// The value of properties relevant for fo:inline-container.
- private CommonBorderPaddingBackground commonBorderPaddingBackground;
- private CommonMarginInline commonMarginInline;
- private CommonRelativePosition commonRelativePosition;
private Length alignmentAdjust;
private int alignmentBaseline;
private Length baselineShift;
- private LengthRangeProperty blockProgressionDimension;
// private ToBeImplementedProperty clip;
- private int displayAlign;
private int dominantBaseline;
- private Length height;
private String id;
- private LengthRangeProperty inlineProgressionDimension;
- private KeepProperty keepTogether;
- private KeepProperty keepWithNext;
- private KeepProperty keepWithPrevious;
private SpaceProperty lineHeight;
- private int overflow;
- private Numeric referenceOrientation;
- private Length width;
- private int writingMode;
+ // Unused but valid items, commented out for performance:
+ // private CommonBorderPaddingBackground commonBorderPaddingBackground;
+ // private CommonMarginInline commonMarginInline;
+ // private CommonRelativePosition commonRelativePosition;
+ // private LengthRangeProperty blockProgressionDimension;
+ // private int displayAlign;
+ // private Length height;
+ // private LengthRangeProperty inlineProgressionDimension;
+ // private KeepProperty keepTogether;
+ // private KeepProperty keepWithNext;
+ // private KeepProperty keepWithPrevious;
+ // private int overflow;
+ // private Numeric referenceOrientation;
+ // private Length width;
+ // private int writingMode;
// End of property values
/** used for FO validation */
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
- commonMarginInline = pList.getMarginInlineProps();
- commonRelativePosition = pList.getRelativePositionProps();
alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
- blockProgressionDimension = pList.get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange();
// clip = pList.get(PR_CLIP);
- displayAlign = pList.get(PR_DISPLAY_ALIGN).getEnum();
dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
- height = pList.get(PR_HEIGHT).getLength();
id = pList.get(PR_ID).getString();
- inlineProgressionDimension = pList.get(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
- keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
- keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
- keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
- overflow = pList.get(PR_OVERFLOW).getEnum();
- referenceOrientation = pList.get(PR_REFERENCE_ORIENTATION).getNumeric();
- width = pList.get(PR_WIDTH).getLength();
- writingMode = pList.get(PR_WRITING_MODE).getEnum();
}
/**
public class Leader extends InlineLevel {
// The value of properties relevant for fo:leader.
// See also superclass InlineLevel
- private CommonRelativePosition commonRelativePosition;
private Length alignmentAdjust;
private int alignmentBaseline;
private Length baselineShift;
private int dominantBaseline;
- private Length textDepth;
- private Length textAltitude;
private String id;
- private KeepProperty keepWithNext;
- private KeepProperty keepWithPrevious;
private int leaderAlignment;
private LengthRangeProperty leaderLength;
private int leaderPattern;
private Length ruleThickness;
// private ToBeImplementedProperty letterSpacing;
// private ToBeImplementedProperty textShadow;
- private SpaceProperty wordSpacing;
+ // Unused but valid items, commented out for performance:
+ // private CommonRelativePosition commonRelativePosition;
+ // private Length textDepth;
+ // private Length textAltitude;
+ // private KeepProperty keepWithNext;
+ // private KeepProperty keepWithPrevious;
+ // private SpaceProperty wordSpacing;
// End of property values
/**
*/
public void bind(PropertyList pList) throws FOPException {
super.bind(pList);
- commonRelativePosition = pList.getRelativePositionProps();
alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
- textDepth = pList.get(PR_TEXT_DEPTH).getLength();
- textAltitude = pList.get(PR_TEXT_ALTITUDE).getLength();
id = pList.get(PR_ID).getString();
- keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
- keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
leaderAlignment = pList.get(PR_LEADER_ALIGNMENT).getEnum();
leaderLength = pList.get(PR_LEADER_LENGTH).getLengthRange();
leaderPattern = pList.get(PR_LEADER_PATTERN).getEnum();
}
// letterSpacing = pList.get(PR_LETTER_SPACING);
// textShadow = pList.get(PR_TEXT_SHADOW);
- wordSpacing = pList.get(PR_WORD_SPACING).getSpace();
}
/**
*/
public class ListBlock extends FObj {
// The value of properties relevant for fo:list-block.
- private CommonAccessibility commonAccessibility;
- private CommonAural commonAural;
private CommonBorderPaddingBackground commonBorderPaddingBackground;
private CommonMarginBlock commonMarginBlock;
- private CommonRelativePosition commonRelativePosition;
private int breakAfter;
private int breakBefore;
private String id;
- private int intrusionDisplace;
private KeepProperty keepTogether;
private KeepProperty keepWithNext;
private KeepProperty keepWithPrevious;
- private Length provisionalDistanceBetweenStarts;
- private Length provisionalLabelSeparation;
+ // Unused but valid items, commented out for performance:
+ // private CommonAccessibility commonAccessibility;
+ // private CommonAural commonAural;
+ // private CommonRelativePosition commonRelativePosition;
+ // private int intrusionDisplace;
+ // private Length provisionalDistanceBetweenStarts;
+ // private Length provisionalLabelSeparation;
// End of property values
/** extension properties */
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAccessibility = pList.getAccessibilityProps();
- commonAural = pList.getAuralProps();
commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
commonMarginBlock = pList.getMarginBlockProps();
- commonRelativePosition = pList.getRelativePositionProps();
breakAfter = pList.get(PR_BREAK_AFTER).getEnum();
breakBefore = pList.get(PR_BREAK_BEFORE).getEnum();
id = pList.get(PR_ID).getString();
- intrusionDisplace = pList.get(PR_INTRUSION_DISPLACE).getEnum();
keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
- provisionalDistanceBetweenStarts = pList.get(
- PR_PROVISIONAL_DISTANCE_BETWEEN_STARTS).getLength();
- provisionalLabelSeparation = pList.get(
- PR_PROVISIONAL_LABEL_SEPARATION).getLength();
-
//Bind extension properties
widowContentLimit = pList.get(PR_X_WIDOW_CONTENT_LIMIT).getLength();
orphanContentLimit = pList.get(PR_X_ORPHAN_CONTENT_LIMIT).getLength();
*/
public class ListItem extends FObj {
// The value of properties relevant for fo:list-item.
- private CommonAccessibility commonAccessibility;
- private CommonAural commonAural;
private CommonBorderPaddingBackground commonBorderPaddingBackground;
private CommonMarginBlock commonMarginBlock;
- private CommonRelativePosition commonRelativePosition;
private int breakAfter;
private int breakBefore;
private String id;
- private int intrusionDisplace;
private KeepProperty keepTogether;
private KeepProperty keepWithNext;
private KeepProperty keepWithPrevious;
- private int relativeAlign;
+ // Unused but valid items, commented out for performance:
+ // private CommonAccessibility commonAccessibility;
+ // private CommonAural commonAural;
+ // private CommonRelativePosition commonRelativePosition;
+ // private int intrusionDisplace;
+ // private int relativeAlign;
// End of property values
private ListItemLabel label = null;
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAccessibility = pList.getAccessibilityProps();
- commonAural = pList.getAuralProps();
commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
commonMarginBlock = pList.getMarginBlockProps();
- commonRelativePosition = pList.getRelativePositionProps();
breakAfter = pList.get(PR_BREAK_AFTER).getEnum();
breakBefore = pList.get(PR_BREAK_BEFORE).getEnum();
id = pList.get(PR_ID).getString();
- intrusionDisplace = pList.get(PR_INTRUSION_DISPLACE).getEnum();
keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
- relativeAlign = pList.get(PR_RELATIVE_ALIGN).getEnum();
}
/**
*/
public class MultiCase extends FObj {
// The value of properties relevant for fo:multi-case.
- private CommonAccessibility commonAccessibility;
private String id;
private int startingState;
// private ToBeImplementedProperty caseName;
// private ToBeImplementedProperty caseTitle;
+ // Unused but valid items, commented out for performance:
+ // private CommonAccessibility commonAccessibility;
// End of property values
static boolean notImplementedWarningGiven = false;
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAccessibility = pList.getAccessibilityProps();
id = pList.get(PR_ID).getString();
startingState = pList.get(PR_STARTING_STATE).getEnum();
// caseName = pList.get(PR_CASE_NAME);
*/
public class MultiProperties extends FObj {
// The value of properties relevant for fo:multi-properties.
- private CommonAccessibility commonAccessibility;
private String id;
+ // Unused but valid items, commented out for performance:
+ // private CommonAccessibility commonAccessibility;
// End of property values
static boolean notImplementedWarningGiven = false;
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAccessibility = pList.getAccessibilityProps();
id = pList.get(PR_ID).getString();
}
*/
public class MultiSwitch extends FObj {
// The value of properties relevant for fo:multi-switch.
- private CommonAccessibility commonAccessibility;
// private ToBeImplementedProperty autoRestore;
private String id;
+ // Unused but valid items, commented out for performance:
+ // private CommonAccessibility commonAccessibility;
// End of property values
static boolean notImplementedWarningGiven = false;
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAccessibility = pList.getAccessibilityProps();
// autoRestore = pList.get(PR_AUTO_RESTORE);
id = pList.get(PR_ID).getString();
}
* Class modelling the fo:multi-toggle property.
*/
public class MultiToggle extends FObj {
- // The value of properties relevant for fo:multi-toggle.
- private CommonAccessibility commonAccessibility;
+ // The value of properties relevant for fo:multi-toggle (commented out for performance).
+ // private CommonAccessibility commonAccessibility;
// public ToBeImplementedProperty prSwitchTo;
// End of property values
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAccessibility = pList.getAccessibilityProps();
// prSwitchTo = pList.get(PR_SWITCH_TO);
}
*/
public class PageNumber extends FObj {
// The value of properties relevant for fo:page-number.
- private CommonAccessibility commonAccessibility;
- private CommonAural commonAural;
private CommonBorderPaddingBackground commonBorderPaddingBackground;
private CommonFont commonFont;
- private CommonMarginInline commonMarginInline;
- private CommonRelativePosition commonRelativePosition;
private Length alignmentAdjust;
private int alignmentBaseline;
private Length baselineShift;
private int dominantBaseline;
private String id;
- private KeepProperty keepWithNext;
- private KeepProperty keepWithPrevious;
// private ToBeImplementedProperty letterSpacing;
private SpaceProperty lineHeight;
- private int scoreSpaces;
- private Length textAltitude;
/** Holds the text decoration values. May be null */
private CommonTextDecoration textDecoration;
- private Length textDepth;
// private ToBeImplementedProperty textShadow;
- private int textTransform;
- private int visibility;
- private SpaceProperty wordSpacing;
- private int wrapOption;
+ // Unused but valid items, commented out for performance:
+ // private CommonAccessibility commonAccessibility;
+ // private CommonAural commonAural;
+ // private CommonMarginInline commonMarginInline;
+ // private CommonRelativePosition commonRelativePosition;
+ // private KeepProperty keepWithNext;
+ // private KeepProperty keepWithPrevious;
+ // private int scoreSpaces;
+ // private Length textAltitude;
+ // private Length textDepth;
+ // private int textTransform;
+ // private int visibility;
+ // private SpaceProperty wordSpacing;
+ // private int wrapOption;
// End of property values
// Properties which are not explicitely listed but are still applicable
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAccessibility = pList.getAccessibilityProps();
- commonAural = pList.getAuralProps();
commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
commonFont = pList.getFontProps();
- commonMarginInline = pList.getMarginInlineProps();
- commonRelativePosition = pList.getRelativePositionProps();
alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
id = pList.get(PR_ID).getString();
- keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
- keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
// letterSpacing = pList.get(PR_LETTER_SPACING);
lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
- scoreSpaces = pList.get(PR_SCORE_SPACES).getEnum();
- textAltitude = pList.get(PR_TEXT_ALTITUDE).getLength();
textDecoration = pList.getTextDecorationProps();
- textDepth = pList.get(PR_TEXT_DEPTH).getLength();
// textShadow = pList.get(PR_TEXT_SHADOW);
- textTransform = pList.get(PR_TEXT_TRANSFORM).getEnum();
- visibility = pList.get(PR_VISIBILITY).getEnum();
- wordSpacing = pList.get(PR_WORD_SPACING).getSpace();
- wrapOption = pList.get(PR_WRAP_OPTION).getEnum();
// implicit properties
color = pList.get(Constants.PR_COLOR).getColor(getUserAgent());
*/
public class PageNumberCitation extends FObj {
// The value of properties relevant for fo:page-number-citation.
- private CommonAccessibility commonAccessibility;
- private CommonAural commonAural;
private CommonBorderPaddingBackground commonBorderPaddingBackground;
private CommonFont commonFont;
- private CommonMarginInline commonMarginInline;
- private CommonRelativePosition commonRelativePosition;
private Length alignmentAdjust;
private int alignmentBaseline;
private Length baselineShift;
private int dominantBaseline;
private String id;
- private KeepProperty keepWithNext;
- private KeepProperty keepWithPrevious;
// private ToBeImplementedProperty letterSpacing;
private SpaceProperty lineHeight;
private String refId;
- private int scoreSpaces;
- private Length textAltitude;
/** Holds the text decoration values. May be null */
private CommonTextDecoration textDecoration;
- private Length textDepth;
// private ToBeImplementedProperty textShadow;
- private int textTransform;
- private int visibility;
- private SpaceProperty wordSpacing;
- private int wrapOption;
+ // Unused but valid items, commented out for performance:
+ // private CommonAccessibility commonAccessibility;
+ // private CommonAural commonAural;
+ // private CommonMarginInline commonMarginInline;
+ // private CommonRelativePosition commonRelativePosition;
+ // private KeepProperty keepWithNext;
+ // private KeepProperty keepWithPrevious;
+ // private int scoreSpaces;
+ // private Length textAltitude;
+ // private Length textDepth;
+ // private int textTransform;
+ // private int visibility;
+ // private SpaceProperty wordSpacing;
+ // private int wrapOption;
// End of property values
// Properties which are not explicitely listed but are still applicable
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAccessibility = pList.getAccessibilityProps();
- commonAural = pList.getAuralProps();
commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
commonFont = pList.getFontProps();
- commonMarginInline = pList.getMarginInlineProps();
- commonRelativePosition = pList.getRelativePositionProps();
alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
id = pList.get(PR_ID).getString();
- keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
- keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
// letterSpacing = pList.get(PR_LETTER_SPACING);
lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
refId = pList.get(PR_REF_ID).getString();
- scoreSpaces = pList.get(PR_SCORE_SPACES).getEnum();
- textAltitude = pList.get(PR_TEXT_ALTITUDE).getLength();
textDecoration = pList.getTextDecorationProps();
- textDepth = pList.get(PR_TEXT_DEPTH).getLength();
// textShadow = pList.get(PR_TEXT_SHADOW);
- textTransform = pList.get(PR_TEXT_TRANSFORM).getEnum();
- visibility = pList.get(PR_VISIBILITY).getEnum();
- wordSpacing = pList.get(PR_WORD_SPACING).getSpace();
- wrapOption = pList.get(PR_WRAP_OPTION).getEnum();
// implicit properties
color = pList.get(Constants.PR_COLOR).getColor(getUserAgent());
public class Table extends TableFObj {
/** properties */
- private CommonAccessibility commonAccessibility;
- private CommonAural commonAural;
private CommonBorderPaddingBackground commonBorderPaddingBackground;
private CommonMarginBlock commonMarginBlock;
- private CommonRelativePosition commonRelativePosition;
private LengthRangeProperty blockProgressionDimension;
private int borderCollapse;
private LengthPairProperty borderSeparation;
private int breakBefore;
private String id;
private LengthRangeProperty inlineProgressionDimension;
- private int intrusionDisplace;
private KeepProperty keepTogether;
private KeepProperty keepWithNext;
private KeepProperty keepWithPrevious;
private int tableLayout;
private int tableOmitFooterAtBreak;
private int tableOmitHeaderAtBreak;
- private int writingMode;
+ // Unused but valid items, commented out for performance:
+ // private CommonAccessibility commonAccessibility;
+ // private CommonAural commonAural;
+ // private CommonRelativePosition commonRelativePosition;
+ // private int intrusionDisplace;
+ // private int writingMode;
/** extension properties */
private Length widowContentLimit;
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAccessibility = pList.getAccessibilityProps();
- commonAural = pList.getAuralProps();
commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
commonMarginBlock = pList.getMarginBlockProps();
- commonRelativePosition = pList.getRelativePositionProps();
blockProgressionDimension = pList.get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange();
borderCollapse = pList.get(PR_BORDER_COLLAPSE).getEnum();
borderSeparation = pList.get(PR_BORDER_SEPARATION).getLengthPair();
breakBefore = pList.get(PR_BREAK_BEFORE).getEnum();
id = pList.get(PR_ID).getString();
inlineProgressionDimension = pList.get(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
- intrusionDisplace = pList.get(PR_INTRUSION_DISPLACE).getEnum();
keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
tableLayout = pList.get(PR_TABLE_LAYOUT).getEnum();
tableOmitFooterAtBreak = pList.get(PR_TABLE_OMIT_FOOTER_AT_BREAK).getEnum();
tableOmitHeaderAtBreak = pList.get(PR_TABLE_OMIT_HEADER_AT_BREAK).getEnum();
- writingMode = pList.get(PR_WRITING_MODE).getEnum();
super.bind(pList);
//Bind extension properties
*/
public class TableAndCaption extends FObj {
// The value of properties relevant for fo:table-and-caption.
- private CommonAccessibility commonAccessibility;
- private CommonAural commonAural;
- private CommonBorderPaddingBackground commonBorderPaddingBackground;
- private CommonMarginBlock commonMarginBlock;
- private CommonRelativePosition commonRelativePosition;
- private int breakAfter;
- private int breakBefore;
- private int captionSide;
private String id;
- private int intrusionDisplace;
- private KeepProperty keepTogether;
- private KeepProperty keepWithNext;
- private KeepProperty keepWithPrevious;
- private int textAlign;
+ // Unused but valid items, commented out for performance:
+ // private CommonAccessibility commonAccessibility;
+ // private CommonAural commonAural;
+ // private CommonBorderPaddingBackground commonBorderPaddingBackground;
+ // private CommonMarginBlock commonMarginBlock;
+ // private CommonRelativePosition commonRelativePosition;
+ // private int breakAfter;
+ // private int breakBefore;
+ // private int captionSide;
+ // private int intrusionDisplace;
+ // private KeepProperty keepTogether;
+ // private KeepProperty keepWithNext;
+ // private KeepProperty keepWithPrevious;
+ // private int textAlign;
// End of property values
static boolean notImplementedWarningGiven = false;
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAccessibility = pList.getAccessibilityProps();
- commonAural = pList.getAuralProps();
- commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
- commonMarginBlock = pList.getMarginBlockProps();
- commonRelativePosition = pList.getRelativePositionProps();
- breakAfter = pList.get(PR_BREAK_AFTER).getEnum();
- breakBefore = pList.get(PR_BREAK_BEFORE).getEnum();
- captionSide = pList.get(PR_CAPTION_SIDE).getEnum();
id = pList.get(PR_ID).getString();
- intrusionDisplace = pList.get(PR_INTRUSION_DISPLACE).getEnum();
- keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
- keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
- keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
- textAlign = pList.get(PR_TEXT_ALIGN).getEnum();
}
/**
*/
public class TableBody extends TableFObj {
// The value of properties relevant for fo:table-body.
- private CommonAccessibility commonAccessibility;
- private CommonAural commonAural;
private CommonBorderPaddingBackground commonBorderPaddingBackground;
- private CommonRelativePosition commonRelativePosition;
- private int visibility;
+ // Unused but valid items, commented out for performance:
+ // private CommonAccessibility commonAccessibility;
+ // private CommonAural commonAural;
+ // private CommonRelativePosition commonRelativePosition;
+ // private int visibility;
// End of property values
private PropertyList savedPropertyList;
* @see FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAccessibility = pList.getAccessibilityProps();
- commonAural = pList.getAuralProps();
commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
- commonRelativePosition = pList.getRelativePositionProps();
- visibility = pList.get(PR_VISIBILITY).getEnum();
super.bind(pList);
//Used by convertCellsToRows()
savedPropertyList = pList;
* @throws FOPException if there's a problem binding the TableRow's
* properties.
*/
+ // TODO: This is currently unused. Why is it here?
private void convertCellsToRows() throws FOPException {
//getLogger().debug("Converting cells to rows...");
List cells = new java.util.ArrayList(childNodes);
public class TableCaption extends FObj {
// The value of properties relevant for fo:table-caption.
private CommonAccessibility commonAccessibility;
- private CommonAural commonAural;
private CommonBorderPaddingBackground commonBorderPaddingBackground;
- private CommonRelativePosition commonRelativePosition;
- private LengthRangeProperty blockProgressionDimension;
- private Length height;
private String id;
- private LengthRangeProperty inlineProgressionDimension;
- private int intrusionDisplace;
- private KeepProperty keepTogether;
- private Length width;
+ // Unused but valid items, commented out for performance:
+ // private CommonAural commonAural;
+ // private CommonRelativePosition commonRelativePosition;
+ // private LengthRangeProperty blockProgressionDimension;
+ // private Length height;
+ // private LengthRangeProperty inlineProgressionDimension;
+ // private int intrusionDisplace;
+ // private KeepProperty keepTogether;
+ // private Length width;
// End of property values
/** used for FO validation */
*/
public void bind(PropertyList pList) throws FOPException {
commonAccessibility = pList.getAccessibilityProps();
- commonAural = pList.getAuralProps();
commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
- commonRelativePosition = pList.getRelativePositionProps();
- blockProgressionDimension = pList.get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange();
- height = pList.get(PR_HEIGHT).getLength();
id = pList.get(PR_ID).getString();
- inlineProgressionDimension = pList.get(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
- intrusionDisplace = pList.get(PR_INTRUSION_DISPLACE).getEnum();
- keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
- width = pList.get(PR_WIDTH).getLength();
}
/**
*/
public class TableCell extends TableFObj {
// The value of properties relevant for fo:table-cell.
- private CommonAccessibility commonAccessibility;
- private CommonAural commonAural;
private CommonBorderPaddingBackground commonBorderPaddingBackground;
- private CommonRelativePosition commonRelativePosition;
private LengthRangeProperty blockProgressionDimension;
private int columnNumber;
private int displayAlign;
- private int relativeAlign;
private int emptyCells;
private int endsRow;
- private Length height;
private String id;
- private LengthRangeProperty inlineProgressionDimension;
private int numberColumnsSpanned;
private int numberRowsSpanned;
private int startsRow;
private Length width;
- private KeepProperty keepTogether;
- private KeepProperty keepWithNext;
- private KeepProperty keepWithPrevious;
+ // Unused but valid items, commented out for performance:
+ // private CommonAccessibility commonAccessibility;
+ // private CommonAural commonAural;
+ // private CommonRelativePosition commonRelativePosition;
+ // private int relativeAlign;
+ // private Length height;
+ // private LengthRangeProperty inlineProgressionDimension;
+ // private KeepProperty keepTogether;
+ // private KeepProperty keepWithNext;
+ // private KeepProperty keepWithPrevious;
// End of property values
-
+
/** used for FO validation */
private boolean blockItemFound = false;
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAccessibility = pList.getAccessibilityProps();
- commonAural = pList.getAuralProps();
commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
- commonRelativePosition = pList.getRelativePositionProps();
blockProgressionDimension = pList.get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange();
displayAlign = pList.get(PR_DISPLAY_ALIGN).getEnum();
- relativeAlign = pList.get(PR_RELATIVE_ALIGN).getEnum();
emptyCells = pList.get(PR_EMPTY_CELLS).getEnum();
endsRow = pList.get(PR_ENDS_ROW).getEnum();
- height = pList.get(PR_HEIGHT).getLength();
id = pList.get(PR_ID).getString();
- inlineProgressionDimension = pList.get(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
columnNumber = pList.get(PR_COLUMN_NUMBER).getNumeric().getValue();
numberColumnsSpanned = pList.get(PR_NUMBER_COLUMNS_SPANNED).getNumeric().getValue();
numberRowsSpanned = pList.get(PR_NUMBER_ROWS_SPANNED).getNumeric().getValue();
startsRow = pList.get(PR_STARTS_ROW).getEnum();
width = pList.get(PR_WIDTH).getLength();
- keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
- keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
- keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
super.bind(pList);
}
private Length columnWidth;
private int numberColumnsRepeated;
private int numberColumnsSpanned;
- private int visibility;
+ // Unused but valid items, commented out for performance:
+ // private int visibility;
// End of property values
private boolean defaultColumn;
.getNumeric().getValue();
numberColumnsSpanned = pList.get(PR_NUMBER_COLUMNS_SPANNED)
.getNumeric().getValue();
- visibility = pList.get(PR_VISIBILITY).getEnum();
super.bind(pList);
if (numberColumnsRepeated <= 0) {
protected void releasePropertyList() {
this.pList = null;
}
-}
\ No newline at end of file
+}
if (getNameId() == FO_TABLE_ROW) {
TableRow row = (TableRow) this;
- TableBody body = (TableBody) parent;
for (i = colSpan; --i >= 0;) {
row.pendingSpans.add(null);
*/
public class TableRow extends TableFObj {
// The value of properties relevant for fo:table-row.
- private CommonAccessibility commonAccessibility;
private LengthRangeProperty blockProgressionDimension;
- private CommonAural commonAural;
private CommonBorderPaddingBackground commonBorderPaddingBackground;
- private CommonRelativePosition commonRelativePosition;
private int breakAfter;
private int breakBefore;
private Length height;
private KeepProperty keepTogether;
private KeepProperty keepWithNext;
private KeepProperty keepWithPrevious;
- private int visibility;
+ // Unused but valid items, commented out for performance:
+ // private CommonAccessibility commonAccessibility;
+ // private CommonAural commonAural;
+ // private CommonRelativePosition commonRelativePosition;
+ // private int visibility;
// End of property values
private boolean setup = false;
* @see org.apache.fop.fo.FObj#bind(PropertyList)
*/
public void bind(PropertyList pList) throws FOPException {
- commonAccessibility = pList.getAccessibilityProps();
blockProgressionDimension
= pList.get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange();
- commonAural = pList.getAuralProps();
commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
- commonRelativePosition = pList.getRelativePositionProps();
breakAfter = pList.get(PR_BREAK_AFTER).getEnum();
breakBefore = pList.get(PR_BREAK_BEFORE).getEnum();
id = pList.get(PR_ID).getString();
keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
- visibility = pList.get(PR_VISIBILITY).getEnum();
super.bind(pList);
}
package org.apache.fop.fo.properties;
+import java.util.Map;
+import java.util.WeakHashMap;
+
/**
* A number quantity in XSL which is specified as an enum, such as "no-limit".
*/
public class EnumNumber extends NumberProperty {
- private Property enumProperty;
+
+ private static final Map cache = new WeakHashMap();
+
+ private final EnumProperty enumProperty;
- public EnumNumber(Property enumProperty) {
+ private EnumNumber(EnumProperty enumProperty) {
super(null);
this.enumProperty = enumProperty;
}
+ public static EnumNumber getInstance(Property enumProperty) {
+ EnumNumber en = (EnumNumber)cache.get(enumProperty);
+ if (en == null) {
+ en = new EnumNumber((EnumProperty)enumProperty);
+ cache.put(enumProperty, en);
+ }
+ return en;
+ }
+
public int getEnum() {
return enumProperty.getEnum();
}
import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.expr.PropertyException;
+import java.util.Map;
+import java.util.WeakHashMap;
+
/**
* Superclass for properties that wrap an enumeration value
*/
}
}
- private int value;
- private String text;
+ private static final Map propertyCache = new WeakHashMap();
+
+ private final int value;
+ private final String text;
/**
* @param explicitValue enumerated value to be set for this property
* @param text the string value of the enum.
*/
- public EnumProperty(int explicitValue, String text) {
+ private EnumProperty(int explicitValue, String text) {
this.value = explicitValue;
this.text = text;
}
+ public static EnumProperty getInstance(int explicitValue, String text) {
+ EnumProperty ep = new EnumProperty(explicitValue, text);
+ EnumProperty cacheEntry = (EnumProperty)propertyCache.get(ep);
+ if (cacheEntry == null) {
+ propertyCache.put(ep, ep);
+ return ep;
+ } else {
+ return cacheEntry;
+ }
+ }
+
/**
* @return this.value
*/
return text;
}
+ public boolean equals(Object obj) {
+ if (obj instanceof EnumProperty) {
+ EnumProperty ep = (EnumProperty)obj;
+ return ep.value == this.value &&
+ ((ep.text == null && this.text == null)
+ || ep.text.equals(this.text));
+ } else {
+ return false;
+ }
+ }
+
+ public int hashCode() {
+ return value + text.hashCode();
+ }
}
*/
Property p = super.make(propertyList, value, fo);
p.getSpace().setConditionality(
- new EnumProperty(Constants.EN_RETAIN, "RETAIN"), true);
+ EnumProperty.getInstance(Constants.EN_RETAIN, "RETAIN"), true);
p.getSpace().setPrecedence(
- new EnumProperty(Constants.EN_FORCE, "FORCE"), true);
+ EnumProperty.getInstance(Constants.EN_FORCE, "FORCE"), true);
return p;
}
return p;
}
if (p instanceof EnumProperty) {
- return new EnumNumber(p);
+ return EnumNumber.getInstance(p);
}
Number val = p.getNumber();
if (val != null) {
|| propId == Constants.PR_BREAK_AFTER) {
switch (property.getEnum()) {
case Constants.EN_ALWAYS:
- return new EnumProperty(Constants.EN_PAGE, "PAGE");
+ return EnumProperty.getInstance(Constants.EN_PAGE, "PAGE");
case Constants.EN_LEFT:
- return new EnumProperty(Constants.EN_EVEN_PAGE, "EVEN_PAGE");
+ return EnumProperty.getInstance(Constants.EN_EVEN_PAGE, "EVEN_PAGE");
case Constants.EN_RIGHT:
- return new EnumProperty(Constants.EN_ODD_PAGE, "ODD_PAGE");
+ return EnumProperty.getInstance(Constants.EN_ODD_PAGE, "ODD_PAGE");
case Constants.EN_AVOID:
default:
//nop;
switch (propVal) {
case Constants.EN_STATIC:
case Constants.EN_RELATIVE:
- return new EnumProperty(Constants.EN_AUTO, "AUTO");
+ return EnumProperty.getInstance(Constants.EN_AUTO, "AUTO");
case Constants.EN_ABSOLUTE:
- return new EnumProperty(Constants.EN_ABSOLUTE, "ABSOLUTE");
+ return EnumProperty.getInstance(Constants.EN_ABSOLUTE, "ABSOLUTE");
case Constants.EN_FIXED:
- return new EnumProperty(Constants.EN_FIXED, "FIXED");
+ return EnumProperty.getInstance(Constants.EN_FIXED, "FIXED");
default:
//nop
}
if (propId == Constants.PR_RELATIVE_POSITION) {
switch (propVal) {
case Constants.EN_STATIC:
- return new EnumProperty(Constants.EN_STATIC, "STATIC");
+ return EnumProperty.getInstance(Constants.EN_STATIC, "STATIC");
case Constants.EN_RELATIVE:
- return new EnumProperty(Constants.EN_RELATIVE, "RELATIVE");
+ return EnumProperty.getInstance(Constants.EN_RELATIVE, "RELATIVE");
case Constants.EN_ABSOLUTE:
- return new EnumProperty(Constants.EN_STATIC, "STATIC");
+ return EnumProperty.getInstance(Constants.EN_STATIC, "STATIC");
case Constants.EN_FIXED:
- return new EnumProperty(Constants.EN_STATIC, "STATIC");
+ return EnumProperty.getInstance(Constants.EN_STATIC, "STATIC");
default:
//nop
}
Property prop = super.compute(propertyList);
if (prop != null && prop instanceof SpaceProperty) {
((SpaceProperty)prop).setConditionality(
- new EnumProperty(Constants.EN_RETAIN, "RETAIN"), false);
+ EnumProperty.getInstance(Constants.EN_RETAIN, "RETAIN"), false);
}
return prop;
}
case EN_BASELINE:
switch (propId) {
case PR_ALIGNMENT_BASELINE:
- return new EnumProperty(EN_BASELINE, "BASELINE");
+ return EnumProperty.getInstance(EN_BASELINE, "BASELINE");
case PR_ALIGNMENT_ADJUST:
- return new EnumLength(new EnumProperty(EN_AUTO, "AUTO"));
+ return new EnumLength(EnumProperty.getInstance(EN_AUTO, "AUTO"));
case PR_BASELINE_SHIFT:
- return new EnumLength(new EnumProperty(EN_BASELINE, "BASELINE"));
+ return new EnumLength(EnumProperty.getInstance(EN_BASELINE, "BASELINE"));
case PR_DOMINANT_BASELINE:
- return new EnumProperty(EN_AUTO, "AUTO");
+ return EnumProperty.getInstance(EN_AUTO, "AUTO");
}
case EN_TOP:
switch (propId) {
case PR_ALIGNMENT_BASELINE:
- return new EnumProperty(EN_BEFORE_EDGE, "BEFORE_EDGE");
+ return EnumProperty.getInstance(EN_BEFORE_EDGE, "BEFORE_EDGE");
case PR_ALIGNMENT_ADJUST:
- return new EnumLength(new EnumProperty(EN_AUTO, "AUTO"));
+ return new EnumLength(EnumProperty.getInstance(EN_AUTO, "AUTO"));
case PR_BASELINE_SHIFT:
- return new EnumLength(new EnumProperty(EN_BASELINE, "BASELINE"));
+ return new EnumLength(EnumProperty.getInstance(EN_BASELINE, "BASELINE"));
case PR_DOMINANT_BASELINE:
- return new EnumProperty(EN_AUTO, "AUTO");
+ return EnumProperty.getInstance(EN_AUTO, "AUTO");
}
case EN_TEXT_TOP:
switch (propId) {
case PR_ALIGNMENT_BASELINE:
- return new EnumProperty(EN_TEXT_BEFORE_EDGE, "TEXT_BEFORE_EDGE");
+ return EnumProperty.getInstance(EN_TEXT_BEFORE_EDGE, "TEXT_BEFORE_EDGE");
case PR_ALIGNMENT_ADJUST:
- return new EnumLength(new EnumProperty(EN_AUTO, "AUTO"));
+ return new EnumLength(EnumProperty.getInstance(EN_AUTO, "AUTO"));
case PR_BASELINE_SHIFT:
- return new EnumLength(new EnumProperty(EN_BASELINE, "BASELINE"));
+ return new EnumLength(EnumProperty.getInstance(EN_BASELINE, "BASELINE"));
case PR_DOMINANT_BASELINE:
- return new EnumProperty(EN_AUTO, "AUTO");
+ return EnumProperty.getInstance(EN_AUTO, "AUTO");
}
case EN_MIDDLE:
switch (propId) {
case PR_ALIGNMENT_BASELINE:
- return new EnumProperty(EN_MIDDLE, "MIDDLE");
+ return EnumProperty.getInstance(EN_MIDDLE, "MIDDLE");
case PR_ALIGNMENT_ADJUST:
- return new EnumLength(new EnumProperty(EN_AUTO, "AUTO"));
+ return new EnumLength(EnumProperty.getInstance(EN_AUTO, "AUTO"));
case PR_BASELINE_SHIFT:
- return new EnumLength(new EnumProperty(EN_BASELINE, "BASELINE"));
+ return new EnumLength(EnumProperty.getInstance(EN_BASELINE, "BASELINE"));
case PR_DOMINANT_BASELINE:
- return new EnumProperty(EN_AUTO, "AUTO");
+ return EnumProperty.getInstance(EN_AUTO, "AUTO");
}
case EN_BOTTOM:
switch (propId) {
case PR_ALIGNMENT_BASELINE:
- return new EnumProperty(EN_AFTER_EDGE, "AFTER_EDGE");
+ return EnumProperty.getInstance(EN_AFTER_EDGE, "AFTER_EDGE");
case PR_ALIGNMENT_ADJUST:
- return new EnumLength(new EnumProperty(EN_AUTO, "AUTO"));
+ return new EnumLength(EnumProperty.getInstance(EN_AUTO, "AUTO"));
case PR_BASELINE_SHIFT:
- return new EnumLength(new EnumProperty(EN_BASELINE, "BASELINE"));
+ return new EnumLength(EnumProperty.getInstance(EN_BASELINE, "BASELINE"));
case PR_DOMINANT_BASELINE:
- return new EnumProperty(EN_AUTO, "AUTO");
+ return EnumProperty.getInstance(EN_AUTO, "AUTO");
}
case EN_TEXT_BOTTOM:
switch (propId) {
case PR_ALIGNMENT_BASELINE:
- return new EnumProperty(EN_TEXT_AFTER_EDGE, "TEXT_AFTER_EDGE");
+ return EnumProperty.getInstance(EN_TEXT_AFTER_EDGE, "TEXT_AFTER_EDGE");
case PR_ALIGNMENT_ADJUST:
- return new EnumLength(new EnumProperty(EN_AUTO, "AUTO"));
+ return new EnumLength(EnumProperty.getInstance(EN_AUTO, "AUTO"));
case PR_BASELINE_SHIFT:
- return new EnumLength(new EnumProperty(EN_BASELINE, "BASELINE"));
+ return new EnumLength(EnumProperty.getInstance(EN_BASELINE, "BASELINE"));
case PR_DOMINANT_BASELINE:
- return new EnumProperty(EN_AUTO, "AUTO");
+ return EnumProperty.getInstance(EN_AUTO, "AUTO");
}
case EN_SUB:
switch (propId) {
case PR_ALIGNMENT_BASELINE:
- return new EnumProperty(EN_BASELINE, "BASELINE");
+ return EnumProperty.getInstance(EN_BASELINE, "BASELINE");
case PR_ALIGNMENT_ADJUST:
- return new EnumLength(new EnumProperty(EN_AUTO, "AUTO"));
+ return new EnumLength(EnumProperty.getInstance(EN_AUTO, "AUTO"));
case PR_BASELINE_SHIFT:
- return new EnumLength(new EnumProperty(EN_SUB, "SUB"));
+ return new EnumLength(EnumProperty.getInstance(EN_SUB, "SUB"));
case PR_DOMINANT_BASELINE:
- return new EnumProperty(EN_AUTO, "AUTO");
+ return EnumProperty.getInstance(EN_AUTO, "AUTO");
}
case EN_SUPER:
switch (propId) {
case PR_ALIGNMENT_BASELINE:
- return new EnumProperty(EN_BASELINE, "BASELINE");
+ return EnumProperty.getInstance(EN_BASELINE, "BASELINE");
case PR_ALIGNMENT_ADJUST:
- return new EnumLength(new EnumProperty(EN_AUTO, "AUTO"));
+ return new EnumLength(EnumProperty.getInstance(EN_AUTO, "AUTO"));
case PR_BASELINE_SHIFT:
- return new EnumLength(new EnumProperty(EN_SUPER, "SUPER"));
+ return new EnumLength(EnumProperty.getInstance(EN_SUPER, "SUPER"));
case PR_DOMINANT_BASELINE:
- return new EnumProperty(EN_AUTO, "AUTO");
+ return EnumProperty.getInstance(EN_AUTO, "AUTO");
}
default:
switch (propId) {
case PR_ALIGNMENT_BASELINE:
- return new EnumProperty(EN_BASELINE, "BASELINE");
+ return EnumProperty.getInstance(EN_BASELINE, "BASELINE");
case PR_ALIGNMENT_ADJUST:
return property;
case PR_BASELINE_SHIFT:
- return new EnumLength(new EnumProperty(EN_BASELINE, "BASELINE"));
+ return new EnumLength(EnumProperty.getInstance(EN_BASELINE, "BASELINE"));
case PR_DOMINANT_BASELINE:
- return new EnumProperty(EN_AUTO, "AUTO");
+ return EnumProperty.getInstance(EN_AUTO, "AUTO");
}
}
return null;
switch (propId) {
case Constants.PR_LINEFEED_TREATMENT:
case Constants.PR_WHITE_SPACE_TREATMENT:
- return new EnumProperty(Constants.EN_PRESERVE, "PRESERVE");
+ return EnumProperty.getInstance(Constants.EN_PRESERVE, "PRESERVE");
case Constants.PR_WHITE_SPACE_COLLAPSE:
- return new EnumProperty(Constants.EN_FALSE, "FALSE");
+ return EnumProperty.getInstance(Constants.EN_FALSE, "FALSE");
case Constants.PR_WRAP_OPTION:
- return new EnumProperty(Constants.EN_NO_WRAP, "NO_WRAP");
+ return EnumProperty.getInstance(Constants.EN_NO_WRAP, "NO_WRAP");
default:
//nop
}
case Constants.EN_NO_WRAP:
if (propId == Constants.PR_WRAP_OPTION) {
- return new EnumProperty(Constants.EN_NO_WRAP, "NO_WRAP");
+ return EnumProperty.getInstance(Constants.EN_NO_WRAP, "NO_WRAP");
}
case Constants.EN_NORMAL:
default: