[FOray-commit] SF.net SVN: foray: [8539] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2007-01-28 21:18:09
|
Revision: 8539
http://svn.sourceforge.net/foray/?rev=8539&view=rev
Author: victormote
Date: 2007-01-28 13:18:07 -0800 (Sun, 28 Jan 2007)
Log Message:
-----------
Conform to new aXSL enumeration of XSL-FO Properties.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/NamespaceFO.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/PropertyMakerFO.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteDimension.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteOffset.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AudioDial.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Background.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundPosition.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Boolean.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Border.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderColor.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderPrecedence.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderSpacing.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderStyle.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderWidth.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Character.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ContentDimension.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Cue.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Enumerated.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Font.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/GlyphOrientation.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Indent.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/InitialPageNumber.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Keep.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Margin.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Name.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Padding.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PageDimension.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Pause.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/RelativeSpace.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/VerticalAlign.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnFromParent.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnInheritedProp.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnNearestSpecProp.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/xml/prop/Lang.java
trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/TestLineHeight.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java 2007-01-28 20:14:08 UTC (rev 8538)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java 2007-01-28 21:18:07 UTC (rev 8539)
@@ -37,6 +37,7 @@
import org.foray.fotree.value.PropertyValue;
import org.axsl.common.Constants;
+import org.axsl.common.FoProperty;
/**
* Class representing an XSL-FO property. A Property consists of two parts:
@@ -138,7 +139,7 @@
final StringBuffer buffer = new StringBuffer();
final FObj fobj = propertyList.getFObj();
buffer.append("Unexpected value for ");
- buffer.append(Constants.expandPropertyNameEnumeration(propertyType));
+ buffer.append(FoProperty.expandPropertyNameEnumeration(propertyType));
buffer.append(": \"" + value + "\"\n");
if (reason != null) {
buffer.append(" Reason: " + reason + "\n");
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-28 20:14:08 UTC (rev 8538)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-28 21:18:07 UTC (rev 8539)
@@ -144,6 +144,7 @@
import org.foray.fotree.xml.prop.Lang;
import org.axsl.common.Constants;
+import org.axsl.common.FoProperty;
import org.axsl.foR.FOContext;
import org.axsl.foR.ShadowEffect;
import org.axsl.foR.Shape;
@@ -271,8 +272,8 @@
}
public DtTextDeco getTextDecoration(final FOContext context) {
- final TextDecoration property = (TextDecoration) getProperty(Constants
- .FOPROP_TEXT_DECORATION);
+ final TextDecoration property = (TextDecoration) getProperty(
+ FoProperty.TEXT_DECORATION);
if (property == null) {
return TextDecoration.getValueNoInstance(context, fobj);
}
@@ -348,7 +349,7 @@
widthContainingBlock);
}
// Now try the shorthand property
- property = (Margin) getProperty(Constants.FOPROP_MARGIN);
+ property = (Margin) getProperty(FoProperty.MARGIN);
if (property != null) {
return property.getValue(context, absoluteDirection, fobj,
widthContainingBlock);
@@ -374,7 +375,7 @@
if (marginProperty != null) {
return true;
}
- marginProperty = (Margin) getProperty(Constants.FOPROP_MARGIN);
+ marginProperty = (Margin) getProperty(FoProperty.MARGIN);
if (marginProperty != null) {
return true;
}
@@ -406,7 +407,7 @@
}
public java.awt.Color getColor(final FOContext context) {
- final Color property = (Color) getProperty(Constants.FOPROP_COLOR);
+ final Color property = (Color) getProperty(FoProperty.COLOR);
if (property != null) {
return property.getValue(context, fobj);
}
@@ -415,12 +416,12 @@
public short getWrapOption(final FOContext context) {
Enumerated property = (Enumerated) getProperty(
- Constants.FOPROP_WRAP_OPTION);
+ FoProperty.WRAP_OPTION);
if (property != null) {
return property.getValue(context, fobj);
}
// Try the shorthand
- property = (Enumerated) getProperty(Constants.FOPROP_WHITE_SPACE);
+ property = (Enumerated) getProperty(FoProperty.WHITE_SPACE);
if (property != null) {
switch (property.getValue(context, fobj)) {
case Constants.FOVAL_NORMAL: {
@@ -435,18 +436,18 @@
}
}
return Enumerated.getValueNoInstance(context,
- Constants.FOPROP_WRAP_OPTION, fobj);
+ FoProperty.WRAP_OPTION, fobj);
}
public boolean getWhiteSpaceCollapse(final FOContext context) {
- final Boolean property = (Boolean) getProperty(Constants
- .FOPROP_WHITE_SPACE_COLLAPSE);
+ final Boolean property = (Boolean) getProperty(
+ FoProperty.WHITE_SPACE_COLLAPSE);
if (property != null) {
return property.getValue(context, fobj);
}
// Try the shorthand
- final Enumerated enumProperty = (Enumerated) getProperty(Constants
- .FOPROP_WHITE_SPACE);
+ final Enumerated enumProperty = (Enumerated) getProperty(
+ FoProperty.WHITE_SPACE);
if (enumProperty != null) {
switch (enumProperty.getValue(context, fobj)) {
case Constants.FOVAL_NORMAL: {
@@ -461,12 +462,12 @@
}
}
return Boolean.getValueNoInstance(context,
- fobj, Constants.FOPROP_WHITE_SPACE_COLLAPSE);
+ fobj, FoProperty.WHITE_SPACE_COLLAPSE);
}
public DtWritingMode getWritingMode(final FOContext context) {
- final WritingMode property = (WritingMode) getProperty(Constants
- .FOPROP_WRITING_MODE);
+ final WritingMode property = (WritingMode) getProperty(
+ FoProperty.WRITING_MODE);
if (property == null) {
return WritingMode.getValueNoInstance(context, fobj);
}
@@ -474,7 +475,7 @@
}
public String getId() {
- final Id property = (Id) getProperty(Constants.FOPROP_ID);
+ final Id property = (Id) getProperty(FoProperty.ID);
if (property != null) {
return property.getValue();
}
@@ -483,7 +484,7 @@
public String getInternalDestination() {
final InternalDestination property = (InternalDestination)
- getProperty(Constants.FOPROP_INTERNAL_DESTINATION);
+ getProperty(FoProperty.INTERNAL_DESTINATION);
if (property != null) {
return property.getValue();
}
@@ -491,9 +492,8 @@
}
public String getExternalDestination() {
- final ExternalDestination property =
- (ExternalDestination) getProperty(Constants
- .FOPROP_EXTERNAL_DESTINATION);
+ final ExternalDestination property = (ExternalDestination) getProperty(
+ FoProperty.EXTERNAL_DESTINATION);
if (property != null) {
return property.getValue();
}
@@ -521,16 +521,16 @@
public short getSpan(final FOContext context) {
final Enumerated property = (Enumerated) getProperty(
- Constants.FOPROP_SPAN);
+ FoProperty.SPAN);
if (property != null) {
return property.getValue(context, fobj);
}
return Enumerated.getValueNoInstance(context,
- Constants.FOPROP_SPAN, fobj);
+ FoProperty.SPAN, fobj);
}
public String getFlowName() {
- final Name property = (Name) getProperty(Constants.FOPROP_FLOW_NAME);
+ final Name property = (Name) getProperty(FoProperty.FLOW_NAME);
if (property != null) {
return property.getValue();
}
@@ -539,7 +539,7 @@
public String getMarkerClassName() {
final Name property = (Name) getProperty(
- Constants.FOPROP_MARKER_CLASS_NAME);
+ FoProperty.MARKER_CLASS_NAME);
if (property != null) {
return property.getValue();
}
@@ -547,8 +547,8 @@
}
public String getRetrieveClassName() {
- final Name property = (Name) getProperty(Constants
- .FOPROP_RETRIEVE_CLASS_NAME);
+ final Name property = (Name) getProperty(
+ FoProperty.RETRIEVE_CLASS_NAME);
if (property != null) {
return property.getValue();
}
@@ -556,28 +556,28 @@
}
public short getRetrievePosition() {
- final Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_RETRIEVE_POSITION);
+ final Enumerated property = (Enumerated) getProperty(
+ FoProperty.RETRIEVE_POSITION);
if (property != null) {
return property.getValue();
}
return Enumerated.getValueNoInstance(
- Constants.FOPROP_RETRIEVE_POSITION);
+ FoProperty.RETRIEVE_POSITION);
}
public short getRetrieveBoundary() {
- final Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_RETRIEVE_BOUNDARY);
+ final Enumerated property = (Enumerated) getProperty(
+ FoProperty.RETRIEVE_BOUNDARY);
if (property != null) {
return property.getValue();
}
return Enumerated.getValueNoInstance(
- Constants.FOPROP_RETRIEVE_BOUNDARY);
+ FoProperty.RETRIEVE_BOUNDARY);
}
public int getColumnNumber(final FOContext context) {
- final ColumnNumber property = (ColumnNumber) getProperty(Constants
- .FOPROP_COLUMN_NUMBER);
+ final ColumnNumber property = (ColumnNumber) getProperty(
+ FoProperty.COLUMN_NUMBER);
if (property == null) {
return ColumnNumber.getValueNoInstance(context, fobj);
}
@@ -586,7 +586,7 @@
public int getNumberColumnsSpanned() {
final NumberColumnsSpanned property = (NumberColumnsSpanned)
- getProperty(Constants.FOPROP_NUMBER_COLUMNS_SPANNED);
+ getProperty(FoProperty.NUMBER_COLUMNS_SPANNED);
if (property == null) {
return NumberColumnsSpanned.getValueNoInstance();
}
@@ -595,7 +595,7 @@
public int getNumberRowsSpanned() {
final NumberRowsSpanned property = (NumberRowsSpanned)
- getProperty(Constants.FOPROP_NUMBER_ROWS_SPANNED);
+ getProperty(FoProperty.NUMBER_ROWS_SPANNED);
if (property == null) {
return NumberRowsSpanned.getValueNoInstance();
}
@@ -603,18 +603,18 @@
}
public short getBorderCollapse(final FOContext context) {
- final Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_BORDER_COLLAPSE);
+ final Enumerated property = (Enumerated) getProperty(
+ FoProperty.BORDER_COLLAPSE);
if (property != null) {
return property.getValue(context, fobj);
}
return Enumerated.getValueNoInstance(context,
- Constants.FOPROP_BORDER_COLLAPSE, fobj);
+ FoProperty.BORDER_COLLAPSE, fobj);
}
public short getDisplayAlign(final FOContext context) {
- final DisplayAlign property = (DisplayAlign) getProperty(Constants
- .FOPROP_DISPLAY_ALIGN);
+ final DisplayAlign property = (DisplayAlign) getProperty(
+ FoProperty.DISPLAY_ALIGN);
if (property == null) {
return DisplayAlign.traitValueNoInstance();
}
@@ -622,21 +622,20 @@
}
public short getRelativeAlign(final FOContext context) {
- final Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_RELATIVE_ALIGN);
+ final Enumerated property = (Enumerated) getProperty(
+ FoProperty.RELATIVE_ALIGN);
if (property != null) {
return property.getValue(context, fobj);
}
return Enumerated.getValueNoInstance(context,
- Constants.FOPROP_RELATIVE_ALIGN, fobj);
+ FoProperty.RELATIVE_ALIGN, fobj);
}
public int getBorderSeparationIPD(final FOContext context) {
BorderSeparation property = (BorderSeparation)
- getProperty(Constants.FOPROP_BORDER_SEPARATION);
+ getProperty(FoProperty.BORDER_SEPARATION);
if (property == null) {
- property = (BorderSpacing) getProperty(Constants
- .FOPROP_BORDER_SPACING);
+ property = (BorderSpacing) getProperty(FoProperty.BORDER_SPACING);
}
if (property != null) {
return property.getValue(context, Constants.AXIS_IP, fobj);
@@ -647,10 +646,9 @@
public int getBorderSeparationBPD(final FOContext context) {
BorderSeparation property = (BorderSeparation)
- getProperty(Constants.FOPROP_BORDER_SEPARATION);
+ getProperty(FoProperty.BORDER_SEPARATION);
if (property == null) {
- property = (BorderSpacing) getProperty(Constants
- .FOPROP_BORDER_SPACING);
+ property = (BorderSpacing) getProperty(FoProperty.BORDER_SPACING);
}
if (property != null) {
return property.getValue(context, Constants.AXIS_BP, fobj);
@@ -661,7 +659,7 @@
public int getNumberColumnsRepeated() {
final NumberColumnsRepeated property = (NumberColumnsRepeated)
- getProperty(Constants.FOPROP_NUMBER_COLUMNS_REPEATED);
+ getProperty(FoProperty.NUMBER_COLUMNS_REPEATED);
if (property == null) {
return NumberColumnsRepeated.getValueNoInstance();
}
@@ -674,8 +672,8 @@
* @return The <em>nominal</em> width.
*/
public int getColumnWidth(final FOContext context, final int tableWidth) {
- final ColumnWidth property = (ColumnWidth) getProperty(Constants
- .FOPROP_COLUMN_WIDTH);
+ final ColumnWidth property = (ColumnWidth) getProperty(
+ FoProperty.COLUMN_WIDTH);
if (property == null) {
return ColumnWidth.getValueNoInstance();
}
@@ -683,8 +681,8 @@
}
public double getColumnWidthTableUnits() {
- final ColumnWidth property = (ColumnWidth) getProperty(Constants
- .FOPROP_COLUMN_WIDTH);
+ final ColumnWidth property = (ColumnWidth) getProperty(
+ FoProperty.COLUMN_WIDTH);
if (property == null) {
return ColumnWidth.getValueNoInstance();
}
@@ -692,12 +690,12 @@
}
public short getBreakAfter(final FOContext context) {
- Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_BREAK_AFTER);
+ Enumerated property = (Enumerated) getProperty(
+ FoProperty.BREAK_AFTER);
if (property != null) {
return property.getValue(context, fobj);
}
- property = (Enumerated) getProperty(Constants.FOPROP_PAGE_BREAK_AFTER);
+ property = (Enumerated) getProperty(FoProperty.PAGE_BREAK_AFTER);
if (property != null) {
switch(property.getValue(context, fobj)) {
case Constants.FOVAL_AUTO: {
@@ -718,20 +716,20 @@
}
}
return Enumerated.getValueNoInstance(context,
- Constants.FOPROP_BREAK_AFTER, fobj);
+ FoProperty.BREAK_AFTER, fobj);
}
public int getKeepTogether(final FOContext context,
final byte subProperty) {
final Keep property = (Keep) getProperty(
- Constants.FOPROP_KEEP_TOGETHER);
+ FoProperty.KEEP_TOGETHER);
if (property == null) {
return Keep.getValueNoInstance(context,
- Constants.FOPROP_KEEP_TOGETHER,
+ FoProperty.KEEP_TOGETHER,
subProperty, fobj);
}
- final Enumerated enumProperty = (Enumerated) getProperty(Constants
- .FOPROP_PAGE_BREAK_INSIDE);
+ final Enumerated enumProperty = (Enumerated) getProperty(
+ FoProperty.PAGE_BREAK_INSIDE);
if (enumProperty != null) {
switch(enumProperty.getValue(context, fobj)) {
case Constants.FOVAL_AUTO: {
@@ -760,14 +758,14 @@
public int getKeepWithNext(final FOContext context,
final byte subProperty) {
final Keep property = (Keep) getProperty(
- Constants.FOPROP_KEEP_WITH_NEXT);
+ FoProperty.KEEP_WITH_NEXT);
if (property == null) {
return Keep.getValueNoInstance(context,
- Constants.FOPROP_KEEP_WITH_NEXT,
+ FoProperty.KEEP_WITH_NEXT,
subProperty, fobj);
}
- final Enumerated enumProperty = (Enumerated) getProperty(Constants
- .FOPROP_PAGE_BREAK_AFTER);
+ final Enumerated enumProperty = (Enumerated) getProperty(
+ FoProperty.PAGE_BREAK_AFTER);
if (enumProperty != null) {
switch(enumProperty.getValue(context, fobj)) {
case Constants.FOVAL_AUTO: {
@@ -805,14 +803,14 @@
public int getKeepWithPrevious(final FOContext context,
final byte subProperty) {
final Keep property = (Keep) getProperty(
- Constants.FOPROP_KEEP_WITH_PREVIOUS);
+ FoProperty.KEEP_WITH_PREVIOUS);
if (property == null) {
return Keep.getValueNoInstance(context,
- Constants.FOPROP_KEEP_WITH_PREVIOUS,
+ FoProperty.KEEP_WITH_PREVIOUS,
subProperty, fobj);
}
- final Enumerated enumProperty = (Enumerated) getProperty(Constants
- .FOPROP_PAGE_BREAK_BEFORE);
+ final Enumerated enumProperty = (Enumerated) getProperty(
+ FoProperty.PAGE_BREAK_BEFORE);
if (enumProperty != null) {
switch(enumProperty.getValue(context, fobj)) {
case Constants.FOVAL_AUTO: {
@@ -849,7 +847,7 @@
public String getMasterReference() {
final Name property = (Name) getProperty(
- Constants.FOPROP_MASTER_REFERENCE);
+ FoProperty.MASTER_REFERENCE);
if (property != null) {
return property.getValue();
}
@@ -858,36 +856,35 @@
public short getPagePosition() {
final Enumerated property = (Enumerated) getProperty(
- Constants.FOPROP_PAGE_POSITION);
+ FoProperty.PAGE_POSITION);
if (property != null) {
return property.getValue();
}
- return Enumerated.getValueNoInstance(Constants.FOPROP_PAGE_POSITION);
+ return Enumerated.getValueNoInstance(FoProperty.PAGE_POSITION);
}
public short getOddOrEven() {
final Enumerated property = (Enumerated) getProperty(
- Constants.FOPROP_ODD_OR_EVEN);
+ FoProperty.ODD_OR_EVEN);
if (property != null) {
return property.getValue();
}
- return Enumerated.getValueNoInstance(Constants.FOPROP_ODD_OR_EVEN);
+ return Enumerated.getValueNoInstance(FoProperty.ODD_OR_EVEN);
}
public short getBlankOrNotBlank() {
final Enumerated property = (Enumerated) getProperty(
- Constants.FOPROP_BLANK_OR_NOT_BLANK);
+ FoProperty.BLANK_OR_NOT_BLANK);
if (property != null) {
return property.getValue(null, fobj);
}
return Enumerated.getValueNoInstance(
- Constants.FOPROP_BLANK_OR_NOT_BLANK);
+ FoProperty.BLANK_OR_NOT_BLANK);
}
public int getInitialPageNumber(final int lastPageNumberUsed) {
- final InitialPageNumber property =
- (InitialPageNumber) getProperty(Constants
- .FOPROP_INITIAL_PAGE_NUMBER);
+ final InitialPageNumber property = (InitialPageNumber) getProperty(
+ FoProperty.INITIAL_PAGE_NUMBER);
if (property != null) {
/* Null context is OK here as this trait is not dependent on
* context. */
@@ -899,8 +896,7 @@
public short getRawInitialPageNumber() {
final InitialPageNumber property =
- (InitialPageNumber) getProperty(Constants
- .FOPROP_INITIAL_PAGE_NUMBER);
+ (InitialPageNumber) getProperty(FoProperty.INITIAL_PAGE_NUMBER);
if (property != null) {
return property.getRawValue(fobj);
}
@@ -908,7 +904,7 @@
}
public String getFormat() {
- final Format property = (Format) getProperty(Constants.FOPROP_FORMAT);
+ final Format property = (Format) getProperty(FoProperty.FORMAT);
if (property != null) {
return property.getValue();
}
@@ -916,18 +912,18 @@
}
public char getGroupingSeparator() {
- final Character property = (Character) getProperty(Constants
- .FOPROP_GROUPING_SEPARATOR);
+ final Character property = (Character) getProperty(
+ FoProperty.GROUPING_SEPARATOR);
if (property != null) {
return property.getValue();
}
return Character.getValueNoInstance(
- Constants.FOPROP_GROUPING_SEPARATOR);
+ FoProperty.GROUPING_SEPARATOR);
}
public int getGroupingSize() {
- final GroupingSize property = (GroupingSize) getProperty(Constants
- .FOPROP_GROUPING_SIZE);
+ final GroupingSize property = (GroupingSize) getProperty(
+ FoProperty.GROUPING_SIZE);
if (property != null) {
return property.getValue();
}
@@ -935,17 +931,17 @@
}
public short getLetterValue() {
- final Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_LETTER_VALUE);
+ final Enumerated property = (Enumerated) getProperty(
+ FoProperty.LETTER_VALUE);
if (property != null) {
return property.getValue();
}
- return Enumerated.getValueNoInstance(Constants.FOPROP_LETTER_VALUE);
+ return Enumerated.getValueNoInstance(FoProperty.LETTER_VALUE);
}
public short getForcePageCount(final FOContext context) {
final ForcePageCount property = (ForcePageCount)
- getProperty(Constants.FOPROP_FORCE_PAGE_COUNT);
+ getProperty(FoProperty.FORCE_PAGE_COUNT);
if (property != null) {
return property.getValue(context, fobj);
}
@@ -953,7 +949,7 @@
}
public String getMasterName() {
- final Name property = (Name) getProperty(Constants.FOPROP_MASTER_NAME);
+ final Name property = (Name) getProperty(FoProperty.MASTER_NAME);
if (property != null) {
return property.getValue();
}
@@ -961,8 +957,8 @@
}
public String getRegionName() {
- final RegionName property = (RegionName) getProperty(Constants
- .FOPROP_REGION_NAME);
+ final RegionName property = (RegionName) getProperty(
+ FoProperty.REGION_NAME);
if (property != null) {
return property.getValue();
}
@@ -974,7 +970,7 @@
public boolean getPrecedence() {
final Boolean property = (Boolean) getProperty(
- Constants.FOPROP_PRECEDENCE);
+ FoProperty.PRECEDENCE);
/* Null context is OK, because the object this applies to cannot be
* insider a marker. */
final FOContext context = null;
@@ -982,11 +978,11 @@
return property.getValue(context, fobj);
}
return Boolean.getValueNoInstance(context, fobj,
- Constants.FOPROP_PRECEDENCE);
+ FoProperty.PRECEDENCE);
}
public int getExtent() {
- final Extent property = (Extent) getProperty(Constants.FOPROP_EXTENT);
+ final Extent property = (Extent) getProperty(FoProperty.EXTENT);
if (property != null) {
return property.getValue(fobj);
}
@@ -994,8 +990,8 @@
}
public int getColumnGap(final FOContext context) {
- final ColumnGap property = (ColumnGap) getProperty(Constants
- .FOPROP_COLUMN_GAP);
+ final ColumnGap property = (ColumnGap) getProperty(
+ FoProperty.COLUMN_GAP);
if (property != null) {
return property.getValue(context, fobj);
}
@@ -1003,18 +999,18 @@
}
public short getOverflow(final FOContext context) {
- final Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_OVERFLOW);
+ final Enumerated property = (Enumerated) getProperty(
+ FoProperty.OVERFLOW);
if (property != null) {
return property.getValue(context, fobj);
}
return Enumerated.getValueNoInstance(context,
- Constants.FOPROP_OVERFLOW, fobj);
+ FoProperty.OVERFLOW, fobj);
}
public int getColumnCount(final FOContext context) {
- final ColumnCount property = (ColumnCount) getProperty(Constants
- .FOPROP_COLUMN_COUNT);
+ final ColumnCount property = (ColumnCount) getProperty(
+ FoProperty.COLUMN_COUNT);
if (property != null) {
int columnCount = property.getValue(context, fobj);
if ((columnCount > 1)
@@ -1032,7 +1028,7 @@
public int getMaximumRepeats() {
final MaximumRepeats property = (MaximumRepeats)
- getProperty(Constants.FOPROP_MAXIMUM_REPEATS);
+ getProperty(FoProperty.MAXIMUM_REPEATS);
if (property != null) {
return property.getValue(fobj);
}
@@ -1049,7 +1045,7 @@
// Try the shorthand.
/* Null context is OK, because the object can't be inside a marker. */
final FOContext context = null;
- final Size sizeProperty = (Size) getProperty(Constants.FOPROP_SIZE);
+ final Size sizeProperty = (Size) getProperty(FoProperty.SIZE);
if (sizeProperty != null) {
return sizeProperty.getValue(context, fobj, axis);
}
@@ -1065,8 +1061,8 @@
}
public short getTextAlign(final FOContext context) {
- final TextAlign property = (TextAlign) getProperty(Constants
- .FOPROP_TEXT_ALIGN);
+ final TextAlign property = (TextAlign) getProperty(
+ FoProperty.TEXT_ALIGN);
if (property == null) {
return TextAlign.getValueNoInstance(context, fobj);
}
@@ -1074,8 +1070,8 @@
}
public String getTextAlignString() {
- final TextAlign property = (TextAlign) getProperty(Constants
- .FOPROP_TEXT_ALIGN);
+ final TextAlign property = (TextAlign) getProperty(
+ FoProperty.TEXT_ALIGN);
if (property == null) {
return null;
}
@@ -1083,8 +1079,8 @@
}
public short getTextAlignLast(final FOContext context) {
- final TextAlignLast property = (TextAlignLast) getProperty(Constants
- .FOPROP_TEXT_ALIGN_LAST);
+ final TextAlignLast property = (TextAlignLast) getProperty(
+ FoProperty.TEXT_ALIGN_LAST);
if (property == null) {
return TextAlignLast.getValueNoInstance(context, fobj);
}
@@ -1101,13 +1097,12 @@
* example, if the line-height should be computed
*/
public float getLineHeightMultiplier(final FOContext context) {
- LineHeight property = (LineHeight) getProperty(Constants
- .FOPROP_LINE_HEIGHT);
+ LineHeight property = (LineHeight) getProperty(FoProperty.LINE_HEIGHT);
if (property != null) {
return property.getValueMultiplier(context, fobj);
}
// Try the shorthand
- final Font fontProperty = (Font) getProperty(Constants.FOPROP_FONT);
+ final Font fontProperty = (Font) getProperty(FoProperty.FONT);
if (fontProperty != null) {
property = fontProperty.getLineHeight();
return property.getValueMultiplier(context, fobj);
@@ -1121,13 +1116,12 @@
* @return The line-height, in millipoints.
*/
public int getLineHeight(final FOContext context, final byte rangeID) {
- LineHeight property = (LineHeight) getProperty(Constants
- .FOPROP_LINE_HEIGHT);
+ LineHeight property = (LineHeight) getProperty(FoProperty.LINE_HEIGHT);
if (property != null) {
return property.getValue(context, rangeID, fobj);
}
// Try the shorthand
- final Font fontProperty = (Font) getProperty(Constants.FOPROP_FONT);
+ final Font fontProperty = (Font) getProperty(FoProperty.FONT);
if (fontProperty != null) {
property = fontProperty.getLineHeight();
return property.getValue(context, rangeID, fobj);
@@ -1136,13 +1130,12 @@
}
public short getLineHeightConditionality(final FOContext context) {
- LineHeight property = (LineHeight) getProperty(Constants
- .FOPROP_LINE_HEIGHT);
+ LineHeight property = (LineHeight) getProperty(FoProperty.LINE_HEIGHT);
if (property != null) {
return property.getConditionality(context, fobj);
}
// Try the shorthand
- final Font fontProperty = (Font) getProperty(Constants.FOPROP_FONT);
+ final Font fontProperty = (Font) getProperty(FoProperty.FONT);
if (fontProperty != null) {
property = fontProperty.getLineHeight();
return property.getConditionality(context, fobj);
@@ -1151,13 +1144,12 @@
}
public int getLineHeightPrecedence(final FOContext context) {
- LineHeight property = (LineHeight) getProperty(Constants
- .FOPROP_LINE_HEIGHT);
+ LineHeight property = (LineHeight) getProperty(FoProperty.LINE_HEIGHT);
if (property != null) {
return property.getPrecedence(context, fobj);
}
// Try the shorthand
- final Font fontProperty = (Font) getProperty(Constants.FOPROP_FONT);
+ final Font fontProperty = (Font) getProperty(FoProperty.FONT);
if (fontProperty != null) {
property = fontProperty.getLineHeight();
return property.getPrecedence(context, fobj);
@@ -1167,8 +1159,8 @@
public int traitSpaceBeforeLength(final FOContext context,
final int subProperty) {
- final RelativeSpace property = (RelativeSpace) getProperty(Constants
- .FOPROP_SPACE_BEFORE);
+ final RelativeSpace property = (RelativeSpace) getProperty(
+ FoProperty.SPACE_BEFORE);
if (property == null) {
return RelativeSpace.getValueNoInstance();
}
@@ -1177,8 +1169,8 @@
}
public short traitSpaceBeforeConditionality(final FOContext context) {
- final RelativeSpace property = (RelativeSpace) getProperty(Constants
- .FOPROP_SPACE_BEFORE);
+ final RelativeSpace property = (RelativeSpace) getProperty(
+ FoProperty.SPACE_BEFORE);
if (property != null) {
return property.getConditionality();
}
@@ -1193,8 +1185,8 @@
}
public int traitSpaceBeforePrecedence() {
- final RelativeSpace property = (RelativeSpace) getProperty(Constants
- .FOPROP_SPACE_BEFORE);
+ final RelativeSpace property = (RelativeSpace) getProperty(
+ FoProperty.SPACE_BEFORE);
if (property == null) {
return RelativeSpace.getPrecedenceNoInstance();
}
@@ -1203,8 +1195,8 @@
public int traitSpaceAfterLength(final FOContext context,
final int subProperty) {
- final RelativeSpace property = (RelativeSpace) getProperty(Constants
- .FOPROP_SPACE_AFTER);
+ final RelativeSpace property = (RelativeSpace) getProperty(
+ FoProperty.SPACE_AFTER);
if (property == null) {
return RelativeSpace.getValueNoInstance();
}
@@ -1213,8 +1205,8 @@
}
public short traitSpaceAfterConditionality(final FOContext context) {
- final RelativeSpace property = (RelativeSpace) getProperty(Constants
- .FOPROP_SPACE_AFTER);
+ final RelativeSpace property = (RelativeSpace) getProperty(
+ FoProperty.SPACE_AFTER);
if (property != null) {
return property.getConditionality();
}
@@ -1229,8 +1221,8 @@
}
public int traitSpaceAfterPrecedence() {
- final RelativeSpace property = (RelativeSpace) getProperty(Constants
- .FOPROP_SPACE_AFTER);
+ final RelativeSpace property = (RelativeSpace) getProperty(
+ FoProperty.SPACE_AFTER);
if (property == null) {
return RelativeSpace.getPrecedenceNoInstance();
}
@@ -1240,8 +1232,8 @@
public int traitSpaceStartLength(final FOContext context,
final int subProperty,
final int ipdAncestorBlockArea) {
- final RelativeSpace property = (RelativeSpace) getProperty(Constants
- .FOPROP_SPACE_START);
+ final RelativeSpace property = (RelativeSpace) getProperty(
+ FoProperty.SPACE_START);
if (property == null) {
return RelativeSpace.getValueNoInstance();
}
@@ -1250,8 +1242,8 @@
}
public short traitSpaceStartConditionality() {
- final RelativeSpace property = (RelativeSpace) getProperty(Constants
- .FOPROP_SPACE_START);
+ final RelativeSpace property = (RelativeSpace) getProperty(
+ FoProperty.SPACE_START);
if (property == null) {
return RelativeSpace.getConditionalityNoInstance();
}
@@ -1259,8 +1251,8 @@
}
public int traitSpaceStartPrecedence() {
- final RelativeSpace property = (RelativeSpace) getProperty(Constants
- .FOPROP_SPACE_START);
+ final RelativeSpace property = (RelativeSpace) getProperty(
+ FoProperty.SPACE_START);
if (property == null) {
return RelativeSpace.getPrecedenceNoInstance();
}
@@ -1269,8 +1261,8 @@
public int traitSpaceEndLength(final FOContext context,
final int subProperty, final int ipdAncestorBlockArea) {
- final RelativeSpace property = (RelativeSpace) getProperty(Constants
- .FOPROP_SPACE_END);
+ final RelativeSpace property = (RelativeSpace) getProperty(
+ FoProperty.SPACE_END);
if (property == null) {
return RelativeSpace.getValueNoInstance();
}
@@ -1279,8 +1271,8 @@
}
public short traitSpaceEndConditionality() {
- final RelativeSpace property = (RelativeSpace) getProperty(Constants
- .FOPROP_SPACE_END);
+ final RelativeSpace property = (RelativeSpace) getProperty(
+ FoProperty.SPACE_END);
if (property == null) {
return RelativeSpace.getConditionalityNoInstance();
}
@@ -1288,8 +1280,8 @@
}
public int traitSpaceEndPrecedence() {
- final RelativeSpace property = (RelativeSpace) getProperty(Constants
- .FOPROP_SPACE_END);
+ final RelativeSpace property = (RelativeSpace) getProperty(
+ FoProperty.SPACE_END);
if (property == null) {
return RelativeSpace.getPrecedenceNoInstance();
}
@@ -1298,8 +1290,8 @@
public int getTextIndent(final FOContext context,
final int widthContainingBlock) {
- final TextIndent property = (TextIndent) getProperty(Constants
- .FOPROP_TEXT_INDENT);
+ final TextIndent property = (TextIndent) getProperty(
+ FoProperty.TEXT_INDENT);
if (property != null) {
return property.getValue(context, fobj, widthContainingBlock);
}
@@ -1308,13 +1300,13 @@
}
public short getPosition(final FOContext context) {
- final Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_POSITION);
+ final Enumerated property = (Enumerated) getProperty(
+ FoProperty.POSITION);
if (property != null) {
return property.getValue(context, fobj);
}
return Enumerated.getValueNoInstance(context,
- Constants.FOPROP_POSITION, fobj);
+ FoProperty.POSITION, fobj);
}
public int getAbsoluteOffset(final FOContext context,
@@ -1356,16 +1348,16 @@
}
public char getCharacter() {
- final Character property = (Character) getProperty(Constants
- .FOPROP_CHARACTER);
+ final Character property = (Character) getProperty(
+ FoProperty.CHARACTER);
if (property != null) {
return property.getValue();
}
- return Character.getValueNoInstance(Constants.FOPROP_CHARACTER);
+ return Character.getValueNoInstance(FoProperty.CHARACTER);
}
public String getSrc(final FOContext context) {
- final Src property = (Src) getProperty(Constants.FOPROP_SRC);
+ final Src property = (Src) getProperty(FoProperty.SRC);
if (property == null) {
return Src.traitValueNoInstance(fobj);
}
@@ -1373,12 +1365,11 @@
}
public short getBreakBefore(final FOContext context) {
- Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_BREAK_BEFORE);
+ Enumerated property = (Enumerated) getProperty(FoProperty.BREAK_BEFORE);
if (property != null) {
return property.getValue(context, fobj);
}
- property = (Enumerated) getProperty(Constants.FOPROP_PAGE_BREAK_BEFORE);
+ property = (Enumerated) getProperty(FoProperty.PAGE_BREAK_BEFORE);
if (property != null) {
switch(property.getValue(context, fobj)) {
case Constants.FOVAL_AUTO: {
@@ -1399,17 +1390,17 @@
}
}
return Enumerated.getValueNoInstance(context,
- Constants.FOPROP_BREAK_BEFORE, fobj);
+ FoProperty.BREAK_BEFORE, fobj);
}
public short getScaling(final FOContext context) {
- final Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_SCALING);
+ final Enumerated property = (Enumerated) getProperty(
+ FoProperty.SCALING);
if (property != null) {
return property.getValue(context, fobj);
}
return Enumerated.getValueNoInstance(context,
- Constants.FOPROP_SCALING, fobj);
+ FoProperty.SCALING, fobj);
}
public ContentDimension getContentDimensionProperty(
@@ -1453,19 +1444,19 @@
}
public short getLeaderPattern(final FOContext context) {
- final Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_LEADER_PATTERN);
+ final Enumerated property = (Enumerated) getProperty(
+ FoProperty.LEADER_PATTERN);
if (property != null) {
return property.getValue(context, fobj);
}
return Enumerated.getValueNoInstance(context,
- Constants.FOPROP_LEADER_PATTERN, fobj);
+ FoProperty.LEADER_PATTERN, fobj);
}
private int getLeaderLength(final FOContext context, final byte subProperty,
final int parentAreaContentIPD) {
- final LeaderLength property = (LeaderLength) getProperty(Constants
- .FOPROP_LEADER_LENGTH);
+ final LeaderLength property = (LeaderLength) getProperty(
+ FoProperty.LEADER_LENGTH);
if (property != null) {
return property.getValue(context, subProperty, fobj,
parentAreaContentIPD);
@@ -1500,8 +1491,8 @@
}
public int getRuleThickness(final FOContext context) {
- final RuleThickness property = (RuleThickness) getProperty(Constants
- .FOPROP_RULE_THICKNESS);
+ final RuleThickness property = (RuleThickness) getProperty(
+ FoProperty.RULE_THICKNESS);
if (property != null) {
return property.getValue(context, fobj);
}
@@ -1509,13 +1500,13 @@
}
public short getRuleStyle(final FOContext context) {
- final Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_RULE_STYLE);
+ final Enumerated property = (Enumerated) getProperty(
+ FoProperty.RULE_STYLE);
if (property != null) {
return property.getValue(context, fobj);
}
return Enumerated.getValueNoInstance(context,
- Constants.FOPROP_RULE_STYLE, fobj);
+ FoProperty.RULE_STYLE, fobj);
}
/**
@@ -1526,7 +1517,7 @@
public int getLeaderPatternWidth(final FOContext context,
final int ipdCRParent) {
final LeaderPatternWidth property = (LeaderPatternWidth)
- getProperty(Constants.FOPROP_LEADER_PATTERN_WIDTH);
+ getProperty(FoProperty.LEADER_PATTERN_WIDTH);
if (property != null) {
return property.getValue(context, fobj, ipdCRParent);
}
@@ -1535,17 +1526,17 @@
}
public short getLeaderAlignment(final FOContext context) {
- final Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_LEADER_ALIGNMENT);
+ final Enumerated property = (Enumerated) getProperty(
+ FoProperty.LEADER_ALIGNMENT);
if (property != null) {
return property.getValue(context, fobj);
}
return Enumerated.getValueNoInstance(context,
- Constants.FOPROP_LEADER_ALIGNMENT, fobj);
+ FoProperty.LEADER_ALIGNMENT, fobj);
}
public String getRefId(final FOContext context) {
- final RefId property = (RefId) getProperty(Constants.FOPROP_REF_ID);
+ final RefId property = (RefId) getProperty(FoProperty.REF_ID);
if (property == null) {
return RefId.getValueNoInstance();
}
@@ -1553,8 +1544,8 @@
}
public short getTableLayout() {
- final TableLayout property = (TableLayout) getProperty(Constants
- .FOPROP_TABLE_LAYOUT);
+ final TableLayout property = (TableLayout) getProperty(
+ FoProperty.TABLE_LAYOUT);
if (property == null) {
return TableLayout.getValueNoInstance();
}
@@ -1562,23 +1553,23 @@
}
public boolean getTableOmitHeaderAtBreak(final FOContext context) {
- final Boolean property = (Boolean) getProperty(Constants
- .FOPROP_TABLE_OMIT_HEADER_AT_BREAK);
+ final Boolean property = (Boolean) getProperty(
+ FoProperty.TABLE_OMIT_HEADER_AT_BREAK);
if (property != null) {
return property.getValue(context, fobj);
}
return Boolean.getValueNoInstance(context,
- fobj, Constants.FOPROP_TABLE_OMIT_HEADER_AT_BREAK);
+ fobj, FoProperty.TABLE_OMIT_HEADER_AT_BREAK);
}
public boolean getTableOmitFooterAtBreak(final FOContext context) {
- final Boolean property = (Boolean) getProperty(Constants
- .FOPROP_TABLE_OMIT_FOOTER_AT_BREAK);
+ final Boolean property = (Boolean) getProperty(
+ FoProperty.TABLE_OMIT_FOOTER_AT_BREAK);
if (property != null) {
return property.getValue(context, fobj);
}
return Boolean.getValueNoInstance(context,
- fobj, Constants.FOPROP_TABLE_OMIT_FOOTER_AT_BREAK);
+ fobj, FoProperty.TABLE_OMIT_FOOTER_AT_BREAK);
}
/**
@@ -1597,10 +1588,10 @@
RelativeDimension property = null;
if (relativeAxis == Constants.AXIS_BP) {
property = (RelativeDimension)
- getProperty(Constants.FOPROP_BLOCK_PROGRESSION_DIMENSION);
+ getProperty(FoProperty.BLOCK_PROGRESSION_DIMENSION);
} else {
property = (RelativeDimension)
- getProperty(Constants.FOPROP_INLINE_PROGRESSION_DIMENSION);
+ getProperty(FoProperty.INLINE_PROGRESSION_DIMENSION);
}
if (property != null) {
return property.getValue(context, relativeAxis, subProperty, fobj,
@@ -1614,17 +1605,17 @@
switch (subProperty) {
case Property.MINIMUM: {
absDimProperty = (AbsoluteDimension) getProperty(
- Constants.FOPROP_MIN_WIDTH);
+ FoProperty.MIN_WIDTH);
break;
}
case Property.MAXIMUM: {
absDimProperty = (AbsoluteDimension) getProperty(
- Constants.FOPROP_MAX_WIDTH);
+ FoProperty.MAX_WIDTH);
break;
}
default: {
absDimProperty = (AbsoluteDimension) getProperty(
- Constants.FOPROP_WIDTH);
+ FoProperty.WIDTH);
break;
}
}
@@ -1632,17 +1623,17 @@
switch (subProperty) {
case Property.MINIMUM: {
absDimProperty = (AbsoluteDimension) getProperty(
- Constants.FOPROP_MIN_HEIGHT);
+ FoProperty.MIN_HEIGHT);
break;
}
case Property.MAXIMUM: {
absDimProperty = (AbsoluteDimension) getProperty(
- Constants.FOPROP_MAX_HEIGHT);
+ FoProperty.MAX_HEIGHT);
break;
}
default: {
absDimProperty = (AbsoluteDimension) getProperty(
- Constants.FOPROP_HEIGHT);
+ FoProperty.HEIGHT);
break;
}
}
@@ -1697,13 +1688,12 @@
}
public String[] getFontFamily(final FOContext context) {
- FontFamily property = (FontFamily) getProperty(Constants
- .FOPROP_FONT_FAMILY);
+ FontFamily property = (FontFamily) getProperty(FoProperty.FONT_FAMILY);
if (property != null) {
return property.getValue(context, fobj);
}
// Try the shorthand
- final Font fontProperty = (Font) getProperty(Constants.FOPROP_FONT);
+ final Font fontProperty = (Font) getProperty(FoProperty.FONT);
if (fontProperty != null) {
property = fontProperty.getFamily();
return property.getValue(context, fobj);
@@ -1712,13 +1702,12 @@
}
public short getFontStyle(final FOContext context) {
- FontStyle property = (FontStyle) getProperty(Constants
- .FOPROP_FONT_STYLE);
+ FontStyle property = (FontStyle) getProperty(FoProperty.FONT_STYLE);
if (property != null) {
return property.getValue(context, fobj);
}
// Try the shorthand
- final Font fontProperty = (Font) getProperty(Constants.FOPROP_FONT);
+ final Font fontProperty = (Font) getProperty(FoProperty.FONT);
if (fontProperty != null) {
property = fontProperty.getStyle();
return property.getValue(context, fobj);
@@ -1727,13 +1716,12 @@
}
public short getFontWeight(final FOContext context) {
- FontWeight property = (FontWeight) getProperty(Constants
- .FOPROP_FONT_WEIGHT);
+ FontWeight property = (FontWeight) getProperty(FoProperty.FONT_WEIGHT);
if (property != null) {
return property.getValue(context, fobj);
}
// Try the shorthand
- final Font fontProperty = (Font) getProperty(Constants.FOPROP_FONT);
+ final Font fontProperty = (Font) getProperty(FoProperty.FONT);
if (fontProperty != null) {
property = fontProperty.getWeight();
return property.getValue(context, fobj);
@@ -1742,12 +1730,12 @@
}
public int getFontSize(final FOContext context) {
- FontSize property = (FontSize) getProperty(Constants.FOPROP_FONT_SIZE);
+ FontSize property = (FontSize) getProperty(FoProperty.FONT_SIZE);
if (property != null) {
return property.getValue(context, fobj);
}
// Try the shorthand
- final Font fontProperty = (Font) getProperty(Constants.FOPROP_FONT);
+ final Font fontProperty = (Font) getProperty(FoProperty.FONT);
if (fontProperty != null) {
property = fontProperty.getSize();
return property.getValue(context, fobj);
@@ -1756,13 +1744,13 @@
}
public short getFontVariant(final FOContext context) {
- FontVariant property = (FontVariant) getProperty(Constants
- .FOPROP_FONT_VARIANT);
+ FontVariant property = (FontVariant) getProperty(
+ FoProperty.FONT_VARIANT);
if (property != null) {
return property.getValue(context, fobj);
}
// Try the shorthand
- final Font fontProperty = (Font) getProperty(Constants.FOPROP_FONT);
+ final Font fontProperty = (Font) getProperty(FoProperty.FONT);
if (fontProperty != null) {
property = fontProperty.getVariant();
return property.getValue(context, fobj);
@@ -1771,13 +1759,13 @@
}
public short getFontStretch(final FOContext context) {
- final FontStretch property = (FontStretch) getProperty(Constants
- .FOPROP_FONT_STRETCH);
+ final FontStretch property = (FontStretch) getProperty(
+ FoProperty.FONT_STRETCH);
if (property != null) {
return property.getValue(fobj);
}
// Check the shorthand.
- final Font fontProperty = (Font) getProperty(Constants.FOPROP_FONT);
+ final Font fontProperty = (Font) getProperty(FoProperty.FONT);
if (fontProperty != null) {
/*
* If the shorthand exists, the effect of it is to set font-stretch
@@ -1790,10 +1778,8 @@
public int getProvisionalDistanceBetweenStarts(final FOContext context,
final int ipdNearestBlockAreaNotLineArea) {
- final ProvDistanceBetween property
- = (ProvDistanceBetween)
- getProperty(Constants
- .FOPROP_PROVISIONAL_DISTANCE_BETWEEN_STARTS);
+ final ProvDistanceBetween property = (ProvDistanceBetween)
+ getProperty(FoProperty.PROVISIONAL_DISTANCE_BETWEEN_STARTS);
if (property == null) {
return ProvDistanceBetween.traitValueNoInstance(context, fobj,
ipdNearestBlockAreaNotLineArea);
@@ -1806,7 +1792,7 @@
final int ipdNearestBlockAreaNotLineArea) {
final ProvLabelSeparation property
= (ProvLabelSeparation)
- getProperty(Constants.FOPROP_PROVISIONAL_LABEL_SEPARATION);
+ getProperty(FoProperty.PROVISIONAL_LABEL_SEPARATION);
if (property == null) {
return ProvLabelSeparation.traitValueNoInstance(context, fobj,
ipdNearestBlockAreaNotLineArea);
@@ -1823,12 +1809,11 @@
borderColor = (BorderColor) getProperty(rawPropertyType);
if (borderColor == null) {
// Now try the low-level shorthand
- borderColor = (BorderColor) getProperty(Constants
- .FOPROP_BORDER_COLOR);
+ borderColor = (BorderColor) getProperty(FoProperty.BORDER_COLOR);
}
if (borderColor == null) {
// Now try the high-level shorthand
- final Border border = (Border) getProperty(Constants.FOPROP_BORDER);
+ final Border border = (Border) getProperty(FoProperty.BORDER);
if (border != null) {
borderColor = border.getBorderColor();
}
@@ -1852,12 +1837,11 @@
borderStyle = (BorderStyle) getProperty(rawPropertyType);
if (borderStyle == null) {
// Now try the low-level shorthand
- borderStyle = (BorderStyle) getProperty(Constants
- .FOPROP_BORDER_STYLE);
+ borderStyle = (BorderStyle) getProperty(FoProperty.BORDER_STYLE);
}
if (borderStyle == null) {
// Now try the high-level shorthand
- final Border border = (Border) getProperty(Constants.FOPROP_BORDER);
+ final Border border = (Border) getProperty(FoProperty.BORDER);
if (border != null) {
//TODO: This needs to adjust the direction
borderStyle = border.getBorderStyle(direction);
@@ -1896,12 +1880,11 @@
borderWidth = (BorderWidth) getProperty(rawPropertyType);
if (borderWidth == null) {
// Now try the low-level shorthand
- borderWidth = (BorderWidth) getProperty(Constants
- .FOPROP_BORDER_WIDTH);
+ borderWidth = (BorderWidth) getProperty(FoProperty.BORDER_WIDTH);
}
if (borderWidth == null) {
// Now try the high-level shorthand
- final Border border = (Border) getProperty(Constants.FOPROP_BORDER);
+ final Border border = (Border) getProperty(FoProperty.BORDER);
if (border != null) {
borderWidth = border.getBorderWidth();
}
@@ -1935,7 +1918,7 @@
padding = (Padding) getProperty(rawPropertyType);
if (padding == null) {
// Now try the shorthand
- padding = (Padding) getProperty(Constants.FOPROP_PADDING);
+ padding = (Padding) getProperty(FoProperty.PADDING);
}
if (padding == null) {
// Now try the corresponding direction
@@ -1952,13 +1935,13 @@
public java.awt.Color getBackgroundColor(final FOContext context) {
BackgroundColor property = (BackgroundColor)
- getProperty(Constants.FOPROP_BACKGROUND_COLOR);
+ getProperty(FoProperty.BACKGROUND_COLOR);
if (property != null) {
return property.getValue(context, fobj);
}
// Try the shorthand
- final Background background = (Background) getProperty(Constants
- .FOPROP_BACKGROUND);
+ final Background background = (Background) getProperty(
+ FoProperty.BACKGROUND);
if (background != null) {
property = background.getColor();
if (property != null) {
@@ -1970,27 +1953,27 @@
public boolean getHyphenate(final FOContext context) {
final Boolean property = (Boolean) getProperty(
- Constants.FOPROP_HYPHENATE);
+ FoProperty.HYPHENATE);
if (property != null) {
return property.getValue(context, fobj);
}
return Boolean.getValueNoInstance(context, fobj,
- Constants.FOPROP_HYPHENATE);
+ FoProperty.HYPHENATE);
}
public int getHyphenationCharacter(final FOContext context) {
- final Character property = (Character) getProperty(Constants
- .FOPROP_HYPHENATION_CHARACTER);
+ final Character property = (Character) getProperty(
+ FoProperty.HYPHENATION_CHARACTER);
if (property != null) {
return property.getValue(context, fobj);
}
return Character.getValueNoInstance(
- context, Constants.FOPROP_HYPHENATION_CHARACTER, fobj);
+ context, FoProperty.HYPHENATION_CHARACTER, fobj);
}
public int getHyphenationPushCharacterCount(final FOContext context) {
final HyphPushCharCount property = (HyphPushCharCount)
- getProperty(Constants.FOPROP_HYPHENATION_PUSH_CHARACTER_COUNT);
+ getProperty(FoProperty.HYPHENATION_PUSH_CHARACTER_COUNT);
if (property == null) {
return HyphPushCharCount.traitValueNoInstance(context, fobj);
}
@@ -1999,7 +1982,7 @@
public int getHyphenationRemainCharacterCount(final FOContext context) {
final HyphRemainCharCount property = (HyphRemainCharCount) getProperty(
- Constants.FOPROP_HYPHENATION_REMAIN_CHARACTER_COUNT);
+ FoProperty.HYPHENATION_REMAIN_CHARACTER_COUNT);
if (property == null) {
return HyphRemainCharCount.traitValueNoInstance(context, fobj);
}
@@ -2007,7 +1990,7 @@
}
public String getLanguage(final FOContext context) {
- Language property = (Language) getProperty(Constants.FOPROP_LANGUAGE);
+ Language property = (Language) getProperty(FoProperty.LANGUAGE);
if (property != null) {
return property.getValue(context, fobj);
}
@@ -2022,7 +2005,7 @@
}
public String getCountry(final FOContext context) {
- Country property = (Country) getProperty(Constants.FOPROP_COUNTRY);
+ Country property = (Country) getProperty(FoProperty.COUNTRY);
if (property != null) {
return property.getValue(context, fobj);
}
@@ -2038,13 +2021,13 @@
public Graphic getBackgroundImage(final FOContext context) {
BackgroundImage property = (BackgroundImage) getProperty(
- Constants.FOPROP_BACKGROU...
[truncated message content] |