You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by vh...@apache.org on 2008/07/24 11:37:16 UTC
svn commit: r679326 [10/33] - in /xmlgraphics/fop/trunk:
examples/embedding/java/embedding/ examples/embedding/java/embedding/events/
examples/embedding/java/embedding/intermediate/
examples/embedding/java/embedding/model/ examples/embedding/java/embed...
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonFont.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonFont.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonFont.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -38,10 +38,10 @@
/** cache holding canonical CommonFont instances (only those with
* absolute font-size and font-size-adjust) */
private static final PropertyCache cache = new PropertyCache(CommonFont.class);
-
+
/** hashcode of this instance */
private int hash = 0;
-
+
/** The "font-family" property. */
private final FontFamilyProperty fontFamily;
@@ -59,17 +59,17 @@
/** The "font-weight" property. */
private final EnumProperty fontWeight;
-
+
/** The "font-size" property. */
public final Length fontSize;
/** The "font-size-adjust" property. */
public final Numeric fontSizeAdjust;
-
+
/**
* Construct a CommonFont instance
- *
+ *
* @param fontFamily the font-family property
* @param fontSelectionStrategy the font-selection-strategy property
* @param fontStretch the font-stretch property
@@ -84,8 +84,8 @@
EnumProperty fontStretch,
EnumProperty fontStyle,
EnumProperty fontVariant,
- EnumProperty fontWeight,
- Length fontSize,
+ EnumProperty fontWeight,
+ Length fontSize,
Numeric fontSizeAdjust) {
this.fontFamily = fontFamily;
this.fontSelectionStrategy = fontSelectionStrategy;
@@ -103,7 +103,7 @@
* the entire instance will be cached.
* If not, then a distinct instance will be returned, with
* as much cached information as possible.
- *
+ *
* @param pList the PropertyList to get the properties from
* @return a CommonFont instance corresponding to the properties
* @throws PropertyException if there was a problem getting the properties
@@ -117,19 +117,19 @@
EnumProperty fontWeight = (EnumProperty) pList.get(Constants.PR_FONT_WEIGHT);
Numeric fontSizeAdjust = pList.get(Constants.PR_FONT_SIZE_ADJUST).getNumeric();
Length fontSize = pList.get(Constants.PR_FONT_SIZE).getLength();
-
- CommonFont commonFont = new CommonFont(fontFamily,
- fontSelectionStrategy,
- fontStretch,
- fontStyle,
- fontVariant,
+
+ CommonFont commonFont = new CommonFont(fontFamily,
+ fontSelectionStrategy,
+ fontStretch,
+ fontStyle,
+ fontVariant,
fontWeight,
fontSize,
fontSizeAdjust);
-
+
return cache.fetch(commonFont);
}
-
+
/** @return an array with the font-family names */
private String[] getFontFamily() {
List lst = fontFamily.getList();
@@ -139,12 +139,12 @@
}
return fontFamily;
}
-
+
/** @return the first font-family name in the list */
public String getFirstFontFamily() {
return ((Property) fontFamily.list.get(0)).getString();
}
-
+
/** @return the "font-selection-strategy" property */
public int getFontSelectionStrategy() {
return fontSelectionStrategy.getEnum();
@@ -154,12 +154,12 @@
public int getFontStretch() {
return fontStretch.getEnum();
}
-
+
/** @return the "font-style" property */
public int getFontStyle() {
return fontStyle.getEnum();
}
-
+
/** @return the "font-variant" property */
public int getFontVariant() {
return fontVariant.getEnum();
@@ -169,11 +169,11 @@
public int getFontWeight() {
return fontWeight.getEnum();
}
-
+
/**
- * Create and return an array of <code>FontTriplets</code> based on
+ * Create and return an array of <code>FontTriplets</code> based on
* the properties stored in the instance variables.
- *
+ *
* @param fontInfo
* @return a Font object.
*/
@@ -194,13 +194,13 @@
String style;
switch (fontStyle.getEnum()) {
- case Constants.EN_ITALIC:
+ case Constants.EN_ITALIC:
style = "italic";
break;
- case Constants.EN_OBLIQUE:
+ case Constants.EN_OBLIQUE:
style = "oblique";
break;
- case Constants.EN_BACKSLANT:
+ case Constants.EN_BACKSLANT:
style = "backslant";
break;
default:
@@ -210,22 +210,22 @@
// various kinds of keywords too
//int fontVariant = propertyList.get("font-variant").getEnum();
FontTriplet[] triplets = fontInfo.fontLookup(
- getFontFamily(),
+ getFontFamily(),
style, font_weight);
return triplets;
}
/** {@inheritDoc} */
public boolean equals(Object o) {
-
+
if (o == null) {
return false;
}
-
+
if (this == o) {
return true;
}
-
+
if (o instanceof CommonFont) {
CommonFont cf = (CommonFont) o;
return (cf.fontFamily == this.fontFamily)
@@ -238,12 +238,12 @@
&& (cf.fontSizeAdjust == this.fontSizeAdjust);
}
return false;
-
+
}
-
+
/** {@inheritDoc} */
public int hashCode() {
-
+
if (this.hash == -1) {
int hash = 17;
hash = 37 * hash + (fontSize == null ? 0 : fontSize.hashCode());
@@ -257,6 +257,6 @@
this.hash = hash;
}
return hash;
-
+
}
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonHyphenation.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonHyphenation.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonHyphenation.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonHyphenation.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,11 +37,11 @@
/** Logger */
protected static Log log = LogFactory.getLog(CommonHyphenation.class);
-
+
private static final PropertyCache cache = new PropertyCache(CommonHyphenation.class);
-
+
private int hash = 0;
-
+
/** The "language" property */
public final StringProperty language;
@@ -65,7 +65,7 @@
/**
* Construct a CommonHyphenation object holding the given properties
- *
+ *
*/
private CommonHyphenation(StringProperty language,
StringProperty country,
@@ -82,46 +82,46 @@
this.hyphenationPushCharacterCount = hyphenationPushCharacterCount;
this.hyphenationRemainCharacterCount = hyphenationRemainCharacterCount;
}
-
+
/**
* Gets the canonical <code>CommonHyphenation</code> instance corresponding
- * to the values of the related properties present on the given
+ * to the values of the related properties present on the given
* <code>PropertyList</code>
- *
+ *
* @param propertyList the <code>PropertyList</code>
*/
public static CommonHyphenation getInstance(PropertyList propertyList) throws PropertyException {
- StringProperty language =
+ StringProperty language =
(StringProperty) propertyList.get(Constants.PR_LANGUAGE);
- StringProperty country =
+ StringProperty country =
(StringProperty) propertyList.get(Constants.PR_COUNTRY);
- StringProperty script =
+ StringProperty script =
(StringProperty) propertyList.get(Constants.PR_SCRIPT);
- EnumProperty hyphenate =
+ EnumProperty hyphenate =
(EnumProperty) propertyList.get(Constants.PR_HYPHENATE);
- CharacterProperty hyphenationCharacter =
+ CharacterProperty hyphenationCharacter =
(CharacterProperty) propertyList.get(Constants.PR_HYPHENATION_CHARACTER);
- NumberProperty hyphenationPushCharacterCount =
+ NumberProperty hyphenationPushCharacterCount =
(NumberProperty) propertyList.get(Constants.PR_HYPHENATION_PUSH_CHARACTER_COUNT);
- NumberProperty hyphenationRemainCharacterCount =
+ NumberProperty hyphenationRemainCharacterCount =
(NumberProperty) propertyList.get(Constants.PR_HYPHENATION_REMAIN_CHARACTER_COUNT);
-
+
CommonHyphenation instance = new CommonHyphenation(
- language,
- country,
- script,
- hyphenate,
- hyphenationCharacter,
- hyphenationPushCharacterCount,
+ language,
+ country,
+ script,
+ hyphenate,
+ hyphenationCharacter,
+ hyphenationPushCharacterCount,
hyphenationRemainCharacterCount);
-
+
return cache.fetch(instance);
-
+
}
-
+
private static final char HYPHEN_MINUS = '-';
private static final char MINUS_SIGN = '\u2212';
-
+
/**
* Returns the effective hyphenation character for a font. The hyphenation character specified
* in XSL-FO may be substituted if it's not available in the font.
@@ -166,13 +166,13 @@
if (warn) {
log.warn("Substituted specified hyphenation character (0x"
+ Integer.toHexString(hyphChar)
- + ") with 0x" + Integer.toHexString(effHyphChar)
- + " because the font doesn't have the specified hyphenation character: "
+ + ") with 0x" + Integer.toHexString(effHyphChar)
+ + " because the font doesn't have the specified hyphenation character: "
+ font.getFontTriplet());
}
return effHyphChar;
}
-
+
/**
* Returns the IPD for the hyphenation character for a font.
* @param font the font
@@ -182,7 +182,7 @@
char hyphChar = getHyphChar(font);
return font.getCharWidth(hyphChar);
}
-
+
/** {@inheritDoc} */
public boolean equals(Object obj) {
if (obj == this) {
@@ -200,7 +200,7 @@
}
return false;
}
-
+
/** {@inheritDoc} */
public int hashCode() {
if (this.hash == 0) {
@@ -209,15 +209,15 @@
hash = 37 * hash + (script == null ? 0 : script.hashCode());
hash = 37 * hash + (country == null ? 0 : country.hashCode());
hash = 37 * hash + (hyphenate == null ? 0 : hyphenate.hashCode());
- hash = 37 * hash +
+ hash = 37 * hash +
(hyphenationCharacter == null ? 0 : hyphenationCharacter.hashCode());
- hash = 37 * hash +
+ hash = 37 * hash +
(hyphenationPushCharacterCount == null ? 0 : hyphenationPushCharacterCount.hashCode());
- hash = 37 * hash +
+ hash = 37 * hash +
(hyphenationRemainCharacterCount == null ? 0 : hyphenationRemainCharacterCount.hashCode());
this.hash = hash;
}
return this.hash;
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonMarginBlock.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonMarginBlock.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonMarginBlock.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonMarginBlock.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -86,17 +86,17 @@
startIndent = pList.get(Constants.PR_START_INDENT).getLength();
endIndent = pList.get(Constants.PR_END_INDENT).getLength();
}
-
+
/** {@inheritDoc} */
public String toString() {
- return "CommonMarginBlock:\n"
- + "Margins (top, bottom, left, right): ("
- + marginTop + ", " + marginBottom + ", "
+ return "CommonMarginBlock:\n"
+ + "Margins (top, bottom, left, right): ("
+ + marginTop + ", " + marginBottom + ", "
+ marginLeft + ", " + marginRight + ")\n"
- + "Space (before, after): ("
- + spaceBefore + ", " + spaceAfter + ")\n"
+ + "Space (before, after): ("
+ + spaceBefore + ", " + spaceAfter + ")\n"
+ "Indents (start, end): ("
+ startIndent + ", " + endIndent + ")\n";
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonMarginInline.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonMarginInline.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonMarginInline.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonMarginInline.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonRelativePosition.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonRelativePosition.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonRelativePosition.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonRelativePosition.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,7 +34,7 @@
* The "relative-position" property.
*/
public int relativePosition;
-
+
/**
* The "top" property.
*/
@@ -44,12 +44,12 @@
* The "right" property.
*/
public Length right;
-
+
/**
* The "bottom" property.
*/
public Length bottom;
-
+
/**
* The "left" property.
*/
@@ -64,7 +64,7 @@
top = pList.get(Constants.PR_TOP).getLength();
bottom = pList.get(Constants.PR_BOTTOM).getLength();
left = pList.get(Constants.PR_LEFT).getLength();
- right = pList.get(Constants.PR_RIGHT).getLength();
+ right = pList.get(Constants.PR_RIGHT).getLength();
}
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonTextDecoration.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonTextDecoration.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonTextDecoration.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CommonTextDecoration.java Thu Jul 24 02:35:34 2008
@@ -39,30 +39,30 @@
private static final int OVERLINE = 2;
private static final int LINE_THROUGH = 4;
private static final int BLINK = 8;
-
+
private int decoration;
private Color underColor;
private Color overColor;
private Color throughColor;
-
+
/**
* Creates a new CommonTextDecoration object with default values.
*/
public CommonTextDecoration() {
}
-
+
/**
* Creates a CommonTextDecoration object from a property list.
* @param pList the property list to build the object for
* @return a CommonTextDecoration object or null if the obj would only have default values
* @throws PropertyException if there's a problem while processing the property
*/
- public static CommonTextDecoration createFromPropertyList(PropertyList pList)
+ public static CommonTextDecoration createFromPropertyList(PropertyList pList)
throws PropertyException {
return calcTextDecoration(pList);
}
-
- private static CommonTextDecoration calcTextDecoration(PropertyList pList)
+
+ private static CommonTextDecoration calcTextDecoration(PropertyList pList)
throws PropertyException {
CommonTextDecoration deco = null;
PropertyList parentList = pList.getParentPropertyList();
@@ -76,7 +76,7 @@
List list = textDecoProp.getList();
Iterator i = list.iterator();
while (i.hasNext()) {
- Property prop = (Property)i.next();
+ Property prop = (Property)i.next();
int propEnum = prop.getEnum();
FOUserAgent ua = (pList == null)
? null
@@ -135,7 +135,7 @@
}
return deco;
}
-
+
/** @return true if underline is active */
public boolean hasUnderline() {
return (this.decoration & UNDERLINE) != 0;
@@ -155,12 +155,12 @@
public boolean isBlinking() {
return (this.decoration & BLINK) != 0;
}
-
+
/** @return the color of the underline mark */
public Color getUnderlineColor() {
return this.underColor;
}
-
+
/** @return the color of the overline mark */
public Color getOverlineColor() {
return this.overColor;
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,13 +26,13 @@
import org.apache.fop.fo.expr.PropertyException;
/**
- * This class extends Property.Maker with support for sub-properties.
+ * This class extends Property.Maker with support for sub-properties.
*/
public class CompoundPropertyMaker extends PropertyMaker {
/**
* The list of subproperty makers supported by this compound maker.
- */
- private PropertyMaker[] subproperties =
+ */
+ private PropertyMaker[] subproperties =
new PropertyMaker[Constants.COMPOUND_COUNT];
/**
@@ -63,7 +63,7 @@
}
}
}
-
+
/**
* Add a subproperty to this maker.
* @param subproperty
@@ -72,7 +72,7 @@
// Place the base propId in the propId of the subproperty.
subproperty.propId &= Constants.COMPOUND_MASK;
subproperty.propId |= propId;
-
+
subproperties[getSubpropIndex(subproperty.getPropId())] = subproperty;
// Store the first subproperty with a setByShorthand. That subproperty
@@ -81,8 +81,8 @@
shorthandMaker = subproperty;
}
}
-
-
+
+
/**
* Return a Maker object which is used to set the values on components
* of compound property types, such as "space".
@@ -96,11 +96,11 @@
public PropertyMaker getSubpropMaker(int subpropertyId) {
return subproperties[getSubpropIndex(subpropertyId)];
}
-
+
/**
* Calculate the real value of a subproperty by unmasking and shifting
* the value into the range [0 - (COMPOUND_COUNT-1)].
- * The value is used as index into the subproperties array.
+ * The value is used as index into the subproperties array.
* @param propId the property id of the sub property.
* @return the array index.
*/
@@ -111,7 +111,7 @@
/**
* For compound properties which can take enumerate values.
- * Delegate the enumeration check to one of the subpropeties.
+ * Delegate the enumeration check to one of the subpropeties.
* @param value the string containing the property value
* @return the Property encapsulating the enumerated equivalent of the
* input value
@@ -136,7 +136,7 @@
* Is 0 when retriving a base property.
* @param propertyList The PropertyList object being built for this FO.
* @param tryInherit true if inherited properties should be examined.
- * @param tryDefault true if the default value should be returned.
+ * @param tryDefault true if the default value should be returned.
*/
public Property get(int subpropertyId, PropertyList propertyList,
boolean tryInherit, boolean tryDefault)
@@ -148,7 +148,7 @@
}
return p;
}
-
+
/**
* Return a Property object based on the passed Property object.
* This method is called if the Property object built by the parser
@@ -165,7 +165,7 @@
FObj fo) throws PropertyException {
// Delegate to the subproperty maker to do conversions.
p = shorthandMaker.convertProperty(p, propertyList, fo);
-
+
if (p != null) {
Property prop = makeCompound(propertyList, fo);
CompoundDatatype pval = (CompoundDatatype) prop.getObject();
@@ -181,7 +181,7 @@
}
/**
- * Make a compound property with default values.
+ * Make a compound property with default values.
* @param propertyList The PropertyList object being built for this FO.
* @return the Property object corresponding to the parameters
* @throws PropertyException for invalid or inconsisten FO input
@@ -193,7 +193,7 @@
return makeCompound(propertyList, propertyList.getParentFObj());
}
}
-
+
/**
* Create a Property object from an attribute specification.
* @param propertyList The PropertyList object being built for this FO.
@@ -201,14 +201,14 @@
* @param fo The parent FO for the FO whose property is being made.
* @return The initialized Property object.
* @throws PropertyException for invalid or inconsistent FO input
- */
+ */
public Property make(PropertyList propertyList, String value,
FObj fo) throws PropertyException {
Property p = super.make(propertyList, value, fo);
p = convertProperty(p, propertyList, fo);
- return p;
+ return p;
}
-
+
/**
* Return a property value for a compound property. If the property
* value is already partially initialized, this method will modify it.
@@ -243,7 +243,7 @@
}
return baseProperty;
}
-
+
/**
* Create a empty compound property and fill it with default values for
* the subproperties.
@@ -265,5 +265,5 @@
}
}
return p;
- }
+ }
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CondLengthProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CondLengthProperty.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CondLengthProperty.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CondLengthProperty.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,14 +31,14 @@
* Superclass for properties that have conditional lengths
*/
public class CondLengthProperty extends Property implements CompoundDatatype {
-
+
/** cache holding canonical instances (for absolute conditional lengths) */
private static final PropertyCache cache = new PropertyCache(CondLengthProperty.class);
-
+
/** components */
private Property length;
private EnumProperty conditionality;
-
+
private boolean isCached = false;
private int hash = -1;
@@ -56,7 +56,7 @@
/**
* Create a new empty instance of CondLengthProperty.
- * @return the new instance.
+ * @return the new instance.
*/
public Property makeNewProperty() {
return new CondLengthProperty();
@@ -64,7 +64,7 @@
/**
* {@inheritDoc}
- */
+ */
public Property convertProperty(Property p, PropertyList propertyList, FObj fo)
throws PropertyException {
if (p instanceof KeepProperty) {
@@ -75,7 +75,7 @@
}
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public void setComponent(int cmpId, Property cmpnValue,
boolean bIsDefault) {
@@ -83,7 +83,7 @@
throw new IllegalStateException(
"CondLengthProperty.setComponent() called on a cached value!");
}
-
+
if (cmpId == CP_LENGTH) {
length = cmpnValue;
} else if (cmpId == CP_CONDITIONALITY) {
@@ -147,11 +147,11 @@
/** {@inheritDoc} */
public String toString() {
- return "CondLength[" + length.getObject().toString()
- + ", " + (isDiscard()
- ? conditionality.toString().toLowerCase()
+ return "CondLength[" + length.getObject().toString()
+ + ", " + (isDiscard()
+ ? conditionality.toString().toLowerCase()
: conditionality.toString()) + "]";
- }
+ }
/**
* @return this.condLength
@@ -188,7 +188,7 @@
if (this == obj) {
return true;
}
-
+
if (obj instanceof CondLengthProperty) {
CondLengthProperty clp = (CondLengthProperty)obj;
return (this.length == clp.length
@@ -196,7 +196,7 @@
}
return false;
}
-
+
/** {@inheritDoc} */
public int hashCode() {
if (this.hash == -1) {
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CorrespondingPropertyMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CorrespondingPropertyMaker.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CorrespondingPropertyMaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/CorrespondingPropertyMaker.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -33,19 +33,19 @@
protected int tb_rl;
protected boolean useParent;
private boolean relative;
-
+
public CorrespondingPropertyMaker(PropertyMaker baseMaker) {
this.baseMaker = baseMaker;
baseMaker.setCorresponding(this);
}
-
-
+
+
public void setCorresponding(int lr_tb, int rl_tb, int tb_rl) {
this.lr_tb = lr_tb;
this.rl_tb = rl_tb;
this.tb_rl = tb_rl;
}
-
+
/**
* Controls whether the PropertyMaker accesses the parent property list or the current
* property list for determining the writing mode.
@@ -58,7 +58,7 @@
public void setRelative(boolean relative) {
this.relative = relative;
}
-
+
/**
* For properties that operate on a relative direction (before, after,
* start, end) instead of an absolute direction (top, bottom, left,
@@ -80,18 +80,18 @@
if (!relative) {
return false;
}
-
+
PropertyList pList = getWMPropertyList(propertyList);
if (pList != null) {
int correspondingId = pList.getWritingMode(lr_tb, rl_tb, tb_rl);
-
+
if (pList.getExplicit(correspondingId) != null) {
return true;
}
- }
+ }
return false;
}
-
+
/**
* Return a Property object representing the value of this property,
* based on other property values for this FO.
@@ -108,7 +108,7 @@
return null;
}
int correspondingId = pList.getWritingMode(lr_tb, rl_tb, tb_rl);
-
+
Property p = propertyList.getExplicitOrShorthand(correspondingId);
if (p != null) {
FObj parentFO = propertyList.getParentFObj();
@@ -116,7 +116,7 @@
}
return p;
}
-
+
/**
* Return the property list to use for fetching writing mode depending property
* ids.
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -35,7 +35,7 @@
public DimensionPropertyMaker(PropertyMaker baseMaker) {
super(baseMaker);
}
-
+
public void setExtraCorresponding(int[][] extraCorresponding) {
this.extraCorresponding = extraCorresponding;
}
@@ -47,7 +47,7 @@
int wmcorr = extraCorresponding[i][0]; //propertyList.getWritingMode()];
if (propertyList.getExplicit(wmcorr) != null)
return true;
- }
+ }
return false;
}
@@ -59,8 +59,8 @@
}
// Based on min-[width|height]
- int wmcorr = propertyList.getWritingMode(extraCorresponding[0][0],
- extraCorresponding[0][1],
+ int wmcorr = propertyList.getWritingMode(extraCorresponding[0][0],
+ extraCorresponding[0][1],
extraCorresponding[0][2]);
Property subprop = propertyList.getExplicitOrShorthand(wmcorr);
if (subprop != null) {
@@ -68,8 +68,8 @@
}
// Based on max-[width|height]
- wmcorr = propertyList.getWritingMode(extraCorresponding[1][0],
- extraCorresponding[1][1],
+ wmcorr = propertyList.getWritingMode(extraCorresponding[1][0],
+ extraCorresponding[1][1],
extraCorresponding[1][2]);
subprop = propertyList.getExplicitOrShorthand(wmcorr);
// TODO: Don't set when NONE.
@@ -78,5 +78,5 @@
}
return p;
- }
+ }
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/EnumLength.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/EnumLength.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/EnumLength.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/EnumLength.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fo.properties;
import org.apache.fop.datatypes.PercentBaseContext;
@@ -26,7 +26,7 @@
*/
public class EnumLength extends LengthProperty {
private Property enumProperty;
-
+
public EnumLength(Property enumProperty) {
this.enumProperty = enumProperty;
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/EnumNumber.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/EnumNumber.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/EnumNumber.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/EnumNumber.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fo.properties;
import org.apache.fop.datatypes.Numeric;
@@ -32,7 +32,7 @@
private static final PropertyCache cache = new PropertyCache(EnumNumber.class);
private final EnumProperty enumProperty;
-
+
/**
* Constructor
* @param enumProperty the base EnumProperty
@@ -44,7 +44,7 @@
/**
* Returns the canonical EnumNumber instance corresponding
* to the given Property
- *
+ *
* @param enumProperty the base EnumProperty
* @return the canonical instance
*/
@@ -87,16 +87,16 @@
return 0;
}
- /**
+ /**
* {@inheritDoc}
* Always <code>true</code> for instances of this type
*/
public boolean isAbsolute() {
return true;
}
-
- /**
- * {@inheritDoc}
+
+ /**
+ * {@inheritDoc}
* logs an error, because it's not supposed to be called
*/
public double getNumericValue(PercentBaseContext context) throws PropertyException {
@@ -104,8 +104,8 @@
return 0;
}
- /**
- * {@inheritDoc}
+ /**
+ * {@inheritDoc}
* logs an error, because it's not supposed to be called
*/
public int getValue(PercentBaseContext context) {
@@ -113,8 +113,8 @@
return 0;
}
- /**
- * {@inheritDoc}
+ /**
+ * {@inheritDoc}
* logs an error, because it's not supposed to be called
*/
public int getValue() {
@@ -122,8 +122,8 @@
return 0;
}
- /**
- * {@inheritDoc}
+ /**
+ * {@inheritDoc}
* logs an error, because it's not supposed to be called
*/
public double getNumericValue() {
@@ -131,7 +131,7 @@
return 0;
}
- /**
+ /**
* {@inheritDoc}
*/
public Numeric getNumeric() {
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/EnumProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/EnumProperty.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/EnumProperty.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/EnumProperty.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,7 +27,7 @@
* Superclass for properties that wrap an enumeration value
*/
public final class EnumProperty extends Property {
-
+
/** cache holding all canonical EnumProperty instances */
private static final PropertyCache cache = new PropertyCache(EnumProperty.class);
@@ -102,7 +102,7 @@
public boolean equals(Object obj) {
if (obj instanceof EnumProperty) {
EnumProperty ep = (EnumProperty)obj;
- return (ep.value == this.value)
+ return (ep.value == this.value)
&& ((ep.text == this.text)
|| (ep.text != null
&& ep.text.equals(this.text)));
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FixedLength.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FixedLength.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FixedLength.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FixedLength.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -25,7 +25,7 @@
* An absolute length quantity in XSL
*/
public final class FixedLength extends LengthProperty {
-
+
/** Describes the unit pica. */
public static final String PICA = "pc";
@@ -46,16 +46,16 @@
/** cache holding all canonical FixedLength instances */
private static final PropertyCache cache = new PropertyCache(FixedLength.class);
-
+
/** canonical zero-length instance */
public static final FixedLength ZERO_FIXED_LENGTH = new FixedLength(0, FixedLength.MPT, 1.0f);
-
+
private int millipoints;
/**
* Set the length given a number of units, a unit name and
* an assumed resolution (used in case the units are pixels)
- *
+ *
* @param numUnits quantity of input units
* @param units input unit specifier
* @param res input/source resolution
@@ -63,11 +63,11 @@
private FixedLength(double numUnits, String units, float res) {
this.millipoints = convert(numUnits, units, res);
}
-
+
/**
* Return the cached {@link FixedLength} instance corresponding
* to the computed value in base-units (millipoints).
- *
+ *
* @param numUnits quantity of input units
* @param units input unit specifier
* @param sourceResolution input/source resolution (= ratio of pixels per pt)
@@ -75,7 +75,7 @@
* to the given number of units and unit specifier
* in the given resolution
*/
- public static FixedLength getInstance(double numUnits,
+ public static FixedLength getInstance(double numUnits,
String units,
float sourceResolution) {
if (numUnits == 0.0) {
@@ -84,44 +84,44 @@
return (FixedLength)cache.fetch(
new FixedLength(numUnits, units, sourceResolution));
}
-
+
}
-
+
/**
* Return the cached {@link FixedLength} instance corresponding
* to the computed value
* This method assumes a source-resolution of 1 (1px = 1pt)
- *
+ *
* @param numUnits input units
* @param units unit specifier
* @return the canonical FixedLength instance corresponding
* to the given number of units and unit specifier
*/
- public static FixedLength getInstance(double numUnits,
+ public static FixedLength getInstance(double numUnits,
String units) {
return getInstance(numUnits, units, 1.0f);
-
+
}
-
+
/**
* Return the cached {@link FixedLength} instance corresponding
* to the computed value.
- * This method assumes 'millipoints' (non-standard) as units,
+ * This method assumes 'millipoints' (non-standard) as units,
* and an implied source-resolution of 1 (1px = 1pt).
- *
+ *
* @param numUnits input units
* @return the canonical FixedLength instance corresponding
* to the given number of units and unit specifier
*/
public static FixedLength getInstance(double numUnits) {
return getInstance(numUnits, FixedLength.MPT, 1.0f);
-
+
}
-
+
/**
* Convert the given length to a dimensionless integer representing
* a whole number of base units (milli-points).
- *
+ *
* @param dvalue quantity of input units
* @param unit input unit specifier (in, cm, etc.)
* @param res the input/source resolution (in case the unit spec is "px")
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontFamilyProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontFamilyProperty.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontFamilyProperty.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontFamilyProperty.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -32,9 +32,9 @@
/** cache holding all canonical FontFamilyProperty instances */
private static final PropertyCache cache = new PropertyCache(FontFamilyProperty.class);
-
+
private int hash = 0;
-
+
/**
* Inner class for creating instances of ListProperty
*/
@@ -126,7 +126,7 @@
private FontFamilyProperty() {
super();
}
-
+
/**
* Add a new property to the list
* @param prop Property to be added to the list
@@ -154,7 +154,7 @@
if (this == o) {
return true;
}
-
+
if (o instanceof FontFamilyProperty) {
FontFamilyProperty ffp = (FontFamilyProperty) o;
return (this.list != null
@@ -162,7 +162,7 @@
}
return false;
}
-
+
/** {@inheritDoc} */
public int hashCode() {
if (this.hash == 0) {
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontShorthandParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontShorthandParser.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontShorthandParser.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontShorthandParser.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -29,14 +29,14 @@
public class FontShorthandParser extends GenericShorthandParser {
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public Property getValueForProperty(int propId,
Property property,
PropertyMaker maker,
PropertyList propertyList)
throws PropertyException {
-
+
int index = -1;
Property newProp;
switch (propId) {
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontShorthandProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontShorthandProperty.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontShorthandProperty.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontShorthandProperty.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -39,24 +39,24 @@
Constants.PR_LINE_HEIGHT, Constants.PR_FONT_STYLE,
Constants.PR_FONT_VARIANT, Constants.PR_FONT_WEIGHT
};
-
+
/**
* @param propId ID of the property for which Maker should be created
*/
public Maker(int propId) {
super(propId);
}
-
+
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
- public Property make(PropertyList propertyList,
+ public Property make(PropertyList propertyList,
String value, FObj fo) throws PropertyException {
-
+
try {
FontShorthandProperty newProp = new FontShorthandProperty();
newProp.setSpecifiedValue(value);
-
+
String specVal = value;
Property prop = null;
if ("inherit".equals(specVal)) {
@@ -80,14 +80,14 @@
int spaceIndex = value.indexOf(' ');
int quoteIndex = (value.indexOf('\'') == -1)
? value.indexOf('\"') : value.indexOf('\'');
- if (spaceIndex == -1
+ if (spaceIndex == -1
|| (quoteIndex != -1 && spaceIndex > quoteIndex)) {
/* no spaces or first space appears after the first
* single/double quote, so malformed value string
*/
throw new PropertyException("Invalid property value: "
- + "font=\"" + value + "\"");
- }
+ + "font=\"" + value + "\"");
+ }
PropertyMaker m = null;
int fromIndex = spaceIndex + 1;
int toIndex = specVal.length();
@@ -97,11 +97,11 @@
boolean fontFamilyParsed = false;
int commaIndex = value.indexOf(',');
while (!fontFamilyParsed) {
- /* value contains a (list of) possibly quoted
- * font-family name(s)
+ /* value contains a (list of) possibly quoted
+ * font-family name(s)
*/
if (commaIndex == -1) {
- /* no list, just a single name
+ /* no list, just a single name
* (or first name in the list)
*/
if (quoteIndex != -1) {
@@ -112,7 +112,7 @@
m = FObj.getPropertyMakerFor(PROP_IDS[1]);
prop = m.make(propertyList, specVal.substring(fromIndex), fo);
newProp.addProperty(prop, 1);
- fontFamilyParsed = true;
+ fontFamilyParsed = true;
} else {
if (quoteIndex != -1 && quoteIndex < commaIndex) {
/* a quoted font-family name as first name
@@ -131,7 +131,7 @@
fromIndex = value.lastIndexOf(' ', toIndex - 1) + 1;
value = specVal.substring(fromIndex, toIndex);
int slashIndex = value.indexOf('/');
- String fontSize = value.substring(0,
+ String fontSize = value.substring(0,
(slashIndex == -1) ? value.length() : slashIndex);
m = FObj.getPropertyMakerFor(PROP_IDS[0]);
prop = m.make(propertyList, fontSize, fo);
@@ -190,7 +190,7 @@
}
}
}
-
+
private void addProperty(Property prop, int pos) {
while (list.size() < (pos + 1)) {
list.add(null);
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontSizePropertyMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontSizePropertyMaker.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontSizePropertyMaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontSizePropertyMaker.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -24,30 +24,30 @@
import org.apache.fop.fo.expr.PropertyException;
/**
- * This subclass of LengthProperty.Maker handles the special treatment of
+ * This subclass of LengthProperty.Maker handles the special treatment of
* relative font sizes described in 7.8.4.
*/
-public class FontSizePropertyMaker
+public class FontSizePropertyMaker
extends LengthProperty.Maker implements Constants {
/** The default normal font size in mpt */
private static final int FONT_SIZE_NORMAL = 12000;
/** The factor to be applied when stepping font sizes upwards */
private static final double FONT_SIZE_GROWTH_FACTOR = 1.2;
-
+
/**
- * Create a length property which can handle relative font sizes
+ * Create a length property which can handle relative font sizes
* @param propId the font size property id.
*/
public FontSizePropertyMaker(int propId) {
super(propId);
}
-
-
+
+
/**
* {@inheritDoc}
* Contrary to basic lengths, percentages for font-size can be resolved
- * here already: if the property evaluates to a {@link PercentLength},
+ * here already: if the property evaluates to a {@link PercentLength},
* it is immediately replaced by the resolved {@link FixedLength}.
*/
public Property make(PropertyList propertyList, String value, FObj fo) throws PropertyException {
@@ -82,7 +82,7 @@
}
return super.convertProperty(p, propertyList, fo);
}
-
+
/**
* Calculates the nearest absolute font size to the given
* font size.
@@ -107,7 +107,7 @@
}
// baseFontSize is between last and next step font size
// Return the step value closer to the baseFontSize
- if (Math.abs(lastStepFontSize - baseFontSize)
+ if (Math.abs(lastStepFontSize - baseFontSize)
<= Math.abs(baseFontSize - nextStepFontSize)) {
return lastStepFontSize;
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontStretchPropertyMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontStretchPropertyMaker.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontStretchPropertyMaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontStretchPropertyMaker.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -24,24 +24,24 @@
import org.apache.fop.fo.expr.PropertyException;
/**
- * This subclass of EnumProperty.Maker handles the special treatment of
+ * This subclass of EnumProperty.Maker handles the special treatment of
* relative font stretch values described in 7.8.5.
*/
-public class FontStretchPropertyMaker
+public class FontStretchPropertyMaker
extends EnumProperty.Maker implements Constants {
-
+
/* Ordered list of absolute font stretch properties so we can easily find the next /
* previous one */
private Property[] orderedFontStretchValues = null;
-
+
/**
- * Create an enum property which can handle relative font stretches
+ * Create an enum property which can handle relative font stretches
* @param propId the font size property id.
*/
public FontStretchPropertyMaker(int propId) {
super(propId);
}
-
+
/**
* {@inheritDoc}
* Implements the parts of 7.8.5 relevant to relative font stretches
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontWeightPropertyMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontWeightPropertyMaker.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontWeightPropertyMaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/FontWeightPropertyMaker.java Thu Jul 24 02:35:34 2008
@@ -26,7 +26,7 @@
import org.apache.fop.fo.expr.PropertyParser;
public class FontWeightPropertyMaker extends EnumProperty.Maker {
-
+
/**
* Main constructor
* @param propId the property id
@@ -34,11 +34,11 @@
public FontWeightPropertyMaker(int propId) {
super(propId);
}
-
+
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
- public Property make(PropertyList pList, String value, FObj fo)
+ public Property make(PropertyList pList, String value, FObj fo)
throws PropertyException {
if ("inherit".equals(value)) {
return super.make(pList, value, fo);
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/GenericShorthandParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/GenericShorthandParser.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/GenericShorthandParser.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/GenericShorthandParser.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -30,7 +30,7 @@
public class GenericShorthandParser implements ShorthandParser {
/**
- * Constructor.
+ * Constructor.
*/
public GenericShorthandParser() {
}
@@ -47,9 +47,9 @@
return null;
}
}
-
+
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public Property getValueForProperty(int propId,
Property property,
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -33,15 +33,15 @@
*/
public class IndentPropertyMaker extends CorrespondingPropertyMaker {
/**
- * The corresponding padding-* propIds
+ * The corresponding padding-* propIds
*/
- private int[] paddingCorresponding = null;
+ private int[] paddingCorresponding = null;
/**
- * The corresponding border-*-width propIds
+ * The corresponding border-*-width propIds
*/
private int[] borderWidthCorresponding = null;
-
+
/**
* Create a start-indent or end-indent property maker.
* @param baseMaker the property maker to use
@@ -57,7 +57,7 @@
public void setPaddingCorresponding(int[] paddingCorresponding) {
this.paddingCorresponding = paddingCorresponding;
}
-
+
/**
* Set the corresponding values for the border-*-width properties.
* @param borderWidthCorresponding the corresping propids.
@@ -65,9 +65,9 @@
public void setBorderWidthCorresponding(int[] borderWidthCorresponding) {
this.borderWidthCorresponding = borderWidthCorresponding;
}
-
+
/**
- * Calculate the corresponding value for start-indent and end-indent.
+ * Calculate the corresponding value for start-indent and end-indent.
* @see CorrespondingPropertyMaker#compute(PropertyList)
*/
public Property compute(PropertyList propertyList) throws PropertyException {
@@ -78,9 +78,9 @@
return computeConforming(propertyList);
}
}
-
+
/**
- * Calculate the corresponding value for start-indent and end-indent.
+ * Calculate the corresponding value for start-indent and end-indent.
* @see CorrespondingPropertyMaker#compute(PropertyList)
*/
public Property computeConforming(PropertyList propertyList) throws PropertyException {
@@ -92,7 +92,7 @@
Numeric padding = getCorresponding(paddingCorresponding, propertyList).getNumeric();
Numeric border = getCorresponding(borderWidthCorresponding, propertyList).getNumeric();
-
+
int marginProp = pList.getWritingMode(lr_tb, rl_tb, tb_rl);
// Calculate the absolute margin.
if (propertyList.getExplicitOrShorthand(marginProp) == null) {
@@ -107,7 +107,7 @@
} else {
//Margin is used
Numeric margin = propertyList.get(marginProp).getNumeric();
-
+
Numeric v = FixedLength.ZERO_FIXED_LENGTH;
if (!propertyList.getFObj().generatesReferenceAreas()) {
// The inherited_value_of([start|end]-indent)
@@ -119,23 +119,23 @@
v = NumericOp.addition(v, border);
return (Property) v;
}
-
+
}
-
+
private boolean isInherited(PropertyList pList) {
if (pList.getFObj().getUserAgent().isBreakIndentInheritanceOnReferenceAreaBoundary()) {
- FONode nd = pList.getFObj().getParent();
+ FONode nd = pList.getFObj().getParent();
return !((nd instanceof FObj) && ((FObj)nd).generatesReferenceAreas());
} else {
return true;
}
}
-
+
/**
* Calculate the corresponding value for start-indent and end-indent.
* This method calculates indent following an alternative rule set that
* tries to mimic many commercial solutions that chose to violate the
- * XSL specification.
+ * XSL specification.
* @see CorrespondingPropertyMaker#compute(PropertyList)
*/
public Property computeAlternativeRuleset(PropertyList propertyList) throws PropertyException {
@@ -148,10 +148,10 @@
Numeric padding = getCorresponding(paddingCorresponding, propertyList).getNumeric();
Numeric border = getCorresponding(borderWidthCorresponding, propertyList).getNumeric();
-
+
int marginProp = pList.getWritingMode(lr_tb, rl_tb, tb_rl);
- //Determine whether the nearest anscestor indent was specified through
+ //Determine whether the nearest anscestor indent was specified through
//start-indent|end-indent or through a margin property.
boolean marginNearest = false;
PropertyList pl = propertyList.getParentPropertyList();
@@ -164,7 +164,7 @@
}
pl = pl.getParentPropertyList();
}
-
+
// Calculate the absolute margin.
if (propertyList.getExplicitOrShorthand(marginProp) == null) {
Property indent = propertyList.getExplicit(baseMaker.propId);
@@ -181,7 +181,7 @@
} else {
//Margin is used
Numeric margin = propertyList.get(marginProp).getNumeric();
-
+
Numeric v = FixedLength.ZERO_FIXED_LENGTH;
if (isInherited(propertyList)) {
// The inherited_value_of([start|end]-indent)
@@ -194,7 +194,7 @@
return (Property) v;
}
}
-
+
private Property getCorresponding(int[] corresponding, PropertyList propertyList)
throws PropertyException {
PropertyList pList = getWMPropertyList(propertyList);
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/KeepProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/KeepProperty.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/KeepProperty.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/KeepProperty.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,10 +28,10 @@
* Class for properties that wrap Keep values
*/
public final class KeepProperty extends Property implements CompoundDatatype {
-
+
/** class holding all canonical KeepProperty instances*/
private static final PropertyCache cache = new PropertyCache(KeepProperty.class);
-
+
private boolean isCachedValue = false;
private Property withinLine;
private Property withinColumn;
@@ -51,7 +51,7 @@
/**
* Create a new empty instance of KeepProperty.
- * @return the new instance.
+ * @return the new instance.
*/
public Property makeNewProperty() {
return new KeepProperty();
@@ -59,7 +59,7 @@
/**
* {@inheritDoc}
- */
+ */
public Property convertProperty(Property p, PropertyList propertyList, FObj fo)
throws PropertyException
{
@@ -71,7 +71,7 @@
}
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public void setComponent(int cmpId, Property cmpnValue,
boolean bIsDefault) {
@@ -154,9 +154,9 @@
* @return String representation
*/
public String toString() {
- return "Keep[" +
- "withinLine:" + getWithinLine().getObject() +
- ", withinColumn:" + getWithinColumn().getObject() +
+ return "Keep[" +
+ "withinLine:" + getWithinLine().getObject() +
+ ", withinColumn:" + getWithinColumn().getObject() +
", withinPage:" + getWithinPage().getObject() + "]";
}
@@ -183,7 +183,7 @@
if (this == o) {
return true;
}
-
+
if (o instanceof KeepProperty) {
KeepProperty keep = (KeepProperty) o;
return (keep.withinColumn == this.withinColumn)
@@ -192,7 +192,7 @@
}
return false;
}
-
+
/** {@inheritDoc} */
public int hashCode() {
int hash = 17;
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LengthPairProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LengthPairProperty.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LengthPairProperty.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LengthPairProperty.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -45,7 +45,7 @@
/**
* Create a new empty instance of LengthPairProperty.
- * @return the new instance.
+ * @return the new instance.
*/
public Property makeNewProperty() {
return new LengthPairProperty();
@@ -53,7 +53,7 @@
/**
* {@inheritDoc}
- */
+ */
public Property convertProperty(Property p, PropertyList propertyList, FObj fo)
throws PropertyException {
if (p instanceof LengthPairProperty) {
@@ -69,7 +69,7 @@
public LengthPairProperty() {
super();
}
-
+
/**
* Creates a new LengthPairProperty.
* @param ipd inline-progression-dimension
@@ -80,7 +80,7 @@
this.ipd = ipd;
this.bpd = bpd;
}
-
+
/**
* Creates a new LengthPairProperty which sets both bpd and ipd to the
* same value.
@@ -89,9 +89,9 @@
public LengthPairProperty(Property len) {
this(len, len);
}
-
+
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public void setComponent(int cmpId, Property cmpnValue,
boolean bIsDefault) {
@@ -131,8 +131,8 @@
/** {@inheritDoc} */
public String toString() {
- return "LengthPair["
- + "ipd:" + getIPD().getObject()
+ return "LengthPair["
+ + "ipd:" + getIPD().getObject()
+ ", bpd:" + getBPD().getObject() + "]";
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LengthProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LengthProperty.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LengthProperty.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LengthProperty.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,9 +28,9 @@
/**
* Superclass for properties wrapping a Length value.
*/
-public abstract class LengthProperty extends Property
+public abstract class LengthProperty extends Property
implements Length, Numeric {
-
+
/**
* Inner class for making instances of LengthProperty
*/
@@ -38,7 +38,7 @@
/**
* Constructor
- *
+ *
* @param propId the id of the property for which a Maker should be created
*/
public Maker(int propId) {
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LengthRangeProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LengthRangeProperty.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LengthRangeProperty.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LengthRangeProperty.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -53,7 +53,7 @@
/**
* Create a new empty instance of LengthRangeProperty.
- * @return the new instance.
+ * @return the new instance.
*/
public Property makeNewProperty() {
return new LengthRangeProperty();
@@ -64,16 +64,16 @@
&& ((PercentLength) len).getPercentage() < 0)
|| (len.isAbsolute() && len.getValue() < 0));
}
-
- /** {@inheritDoc} */
- public Property convertProperty(Property p,
+
+ /** {@inheritDoc} */
+ public Property convertProperty(Property p,
PropertyList propertyList, FObj fo)
throws PropertyException {
-
+
if (p instanceof LengthRangeProperty) {
return p;
}
-
+
if (this.propId == PR_BLOCK_PROGRESSION_DIMENSION
|| this.propId == PR_INLINE_PROGRESSION_DIMENSION) {
Length len = p.getLength();
@@ -86,13 +86,13 @@
}
}
}
-
+
return super.convertProperty(p, propertyList, fo);
}
-
-
+
+
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
protected Property setSubprop(Property baseProperty, int subpropertyId,
Property subproperty) {
@@ -119,7 +119,7 @@
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public void setComponent(int cmpId, Property cmpnValue,
boolean bIsDefault) {
@@ -191,7 +191,7 @@
}
consistent = false;
}
-
+
// Minimum is prioritaire, if explicit
private void checkConsistency(PercentBaseContext context) {
if (consistent) {
@@ -203,7 +203,7 @@
// Make sure max >= min
// Must also control if have any allowed enum values!
- if (!minimum.isAuto() && !maximum.isAuto()
+ if (!minimum.isAuto() && !maximum.isAuto()
&& minimum.getLength().getValue(context) > maximum.getLength().getValue(context)) {
if ((bfSet & MINSET) != 0) {
// if minimum is explicit, force max to min
@@ -217,7 +217,7 @@
}
}
// Now make sure opt <= max and opt >= min
- if (!optimum.isAuto() && !maximum.isAuto()
+ if (!optimum.isAuto() && !maximum.isAuto()
&& optimum.getLength().getValue(context) > maximum.getLength().getValue(context)) {
if ((bfSet & OPTSET) != 0) {
if ((bfSet & MAXSET) != 0) {
@@ -231,8 +231,8 @@
// opt is default and max is explicit or default
optimum = maximum;
}
- } else if (!optimum.isAuto() && !minimum.isAuto()
- && optimum.getLength().getValue(context)
+ } else if (!optimum.isAuto() && !minimum.isAuto()
+ && optimum.getLength().getValue(context)
< minimum.getLength().getValue(context)) {
if ((bfSet & MINSET) != 0) {
// if minimum is explicit, force opt to min
@@ -244,7 +244,7 @@
minimum = optimum; // minimum was default value
}
}
-
+
consistent = true;
}
@@ -278,8 +278,8 @@
/** {@inheritDoc} */
public String toString() {
return "LengthRange["
- + "min:" + getMinimum(null).getObject()
- + ", max:" + getMaximum(null).getObject()
+ + "min:" + getMinimum(null).getObject()
+ + ", max:" + getMaximum(null).getObject()
+ ", opt:" + getOptimum(null).getObject() + "]";
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -33,7 +33,7 @@
* value, instead of the computed value.
* So when a line-height is create based on an attribute, the specified value
* is stored in the property and in compute() the stored specified value of
- * the nearest specified is used to recalculate the line-height.
+ * the nearest specified is used to recalculate the line-height.
*/
public class LineHeightPropertyMaker extends SpaceProperty.Maker {
@@ -48,9 +48,9 @@
/**
* {@inheritDoc}
*/
- public Property make(PropertyList propertyList, String value, FObj fo)
+ public Property make(PropertyList propertyList, String value, FObj fo)
throws PropertyException {
- /* if value was specified as a number/length/percentage then
+ /* if value was specified as a number/length/percentage then
* conditionality and precedence components are overridden
*/
Property p = super.make(propertyList, value, fo);
@@ -60,7 +60,7 @@
EnumProperty.getInstance(Constants.EN_FORCE, "FORCE"), true);
return p;
}
-
+
/**
* Recalculate the line-height value based on the nearest specified
* value.
@@ -80,7 +80,7 @@
}
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public Property convertProperty(Property p,
PropertyList propertyList,
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/ListProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/ListProperty.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/ListProperty.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/ListProperty.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -64,7 +64,7 @@
protected ListProperty() {
//nop
}
-
+
/**
* @param prop the first Property to be added to the list
*/
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/NumberProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/NumberProperty.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/NumberProperty.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/NumberProperty.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -51,7 +51,7 @@
* {@inheritDoc}
*/
public Property convertProperty(Property p,
- PropertyList propertyList, FObj fo)
+ PropertyList propertyList, FObj fo)
throws PropertyException {
if (p instanceof NumberProperty) {
return p;
@@ -79,12 +79,12 @@
}
/**
- * If the value is not positive, return a property with value 1
- *
+ * If the value is not positive, return a property with value 1
+ *
* {@inheritDoc}
*/
- public Property convertProperty(Property p,
- PropertyList propertyList, FObj fo)
+ public Property convertProperty(Property p,
+ PropertyList propertyList, FObj fo)
throws PropertyException {
if (p instanceof EnumProperty) {
return EnumNumber.getInstance(p);
@@ -101,10 +101,10 @@
}
}
-
+
/** cache holding all canonical NumberProperty instances */
private static final PropertyCache cache = new PropertyCache(NumberProperty.class);
-
+
private final Number number;
/**
@@ -132,7 +132,7 @@
private NumberProperty(int num) {
this.number = new Integer(num);
}
-
+
/**
* Returns the canonical NumberProperty instance
* corresponding to the given Number
@@ -143,7 +143,7 @@
return (NumberProperty)cache.fetch(
new NumberProperty(num.doubleValue()));
}
-
+
/**
* Returns the canonical NumberProperty instance
* corresponding to the given Integer
@@ -176,7 +176,7 @@
return (NumberProperty)cache.fetch(
new NumberProperty(num));
}
-
+
/**
* Plain number always has a dimension of 0.
* @return a dimension of 0.
@@ -254,7 +254,7 @@
/**
* Convert NumberProperty to a Color. Not sure why this is needed.
- * @param foUserAgent FOUserAgent
+ * @param foUserAgent FOUserAgent
* @return Color that corresponds to black
*/
public Color getColor(FOUserAgent foUserAgent) {
@@ -268,7 +268,7 @@
public int hashCode() {
return number.hashCode();
}
-
+
/** {@inheritDoc} */
public boolean equals(Object o) {
if (o == this) {
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org