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 2010/08/25 18:49:40 UTC
svn commit: r989216 [8/19] - in
/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript: ./
examples/plan/src/org/apache/fop/plan/ lib/
src/codegen/java/org/apache/fop/tools/ src/codegen/unicode/data/
src/codegen/unicode/java/org/apache/fop/hyphenation/ sr...
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/extensions/ExternalDocument.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/extensions/ExternalDocument.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/extensions/ExternalDocument.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/extensions/ExternalDocument.java Wed Aug 25 16:49:26 2010
@@ -82,13 +82,18 @@ public class ExternalDocument extends Ab
}
}
+ /**
+ * @throws FOPException in case of processing exception
+ * @see org.apache.fop.fo.FONode#startOfNode()
+ */
protected void startOfNode() throws FOPException {
super.startOfNode();
getFOEventHandler().startExternalDocument(this);
}
/**
- * @see org.apache.fop.fo.FONode#endOfNode
+ * @throws FOPException in case of processing exception
+ * @see org.apache.fop.fo.FONode#endOfNode()
*/
protected void endOfNode() throws FOPException {
getFOEventHandler().endExternalDocument(this);
@@ -96,8 +101,11 @@ public class ExternalDocument extends Ab
}
/**
+ * @param loc a locator
+ * @param nsURI a namespace uri or null
+ * @param localName a local name
+ * @throws ValidationException if invalid child
* @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String)
- XSL/FOP: empty
*/
protected void validateChildNode(Locator loc, String nsURI, String localName)
throws ValidationException {
@@ -162,17 +170,26 @@ public class ExternalDocument extends Ab
return textAlign;
}
- /** @see org.apache.fop.fo.FONode#getNamespaceURI() */
+ /**
+ * @return namespace uri
+ * @see org.apache.fop.fo.FONode#getNamespaceURI()
+ */
public String getNamespaceURI() {
return ExtensionElementMapping.URI;
}
- /** @see org.apache.fop.fo.FONode#getNormalNamespacePrefix() */
+ /**
+ * @return namespace prefix
+ * @see org.apache.fop.fo.FONode#getNormalNamespacePrefix()
+ */
public String getNormalNamespacePrefix() {
return "fox";
}
- /** @see org.apache.fop.fo.FONode#getLocalName() */
+ /**
+ * @return local name
+ * @see org.apache.fop.fo.FONode#getLocalName()
+ */
public String getLocalName() {
return "external-document";
}
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/extensions/svg/BatikExtensionElementMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/extensions/svg/BatikExtensionElementMapping.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/extensions/svg/BatikExtensionElementMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/extensions/svg/BatikExtensionElementMapping.java Wed Aug 25 16:49:26 2010
@@ -53,7 +53,7 @@ public class BatikExtensionElementMappin
* Batik classes that apparently need it (error messages, perhaps)
* @return an XML parser classname
*/
- private final String getAParserClassName() {
+ private String getAParserClassName() {
try {
//TODO Remove when Batik uses JAXP instead of SAX directly.
SAXParserFactory factory = SAXParserFactory.newInstance();
@@ -63,6 +63,7 @@ public class BatikExtensionElementMappin
}
}
+ /** initialize mapping */
protected void initialize() {
if (foObjs == null && batikAvail) {
// this sets the parser that will be used
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/extensions/svg/SVGDOMContentHandlerFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/extensions/svg/SVGDOMContentHandlerFactory.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/extensions/svg/SVGDOMContentHandlerFactory.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/extensions/svg/SVGDOMContentHandlerFactory.java Wed Aug 25 16:49:26 2010
@@ -105,7 +105,7 @@ public class SVGDOMContentHandlerFactory
Class clazz = Class.forName(
"org.apache.batik.dom.svg12.SVG12DOMImplementation");
return (DOMImplementation)clazz.getMethod(
- "getDOMImplementation", null).invoke(null, null);
+ "getDOMImplementation", (Class[])null).invoke(null, (Object[])null);
} catch (Exception e) {
return SVGDOMImplementation.getDOMImplementation();
}
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java Wed Aug 25 16:49:26 2010
@@ -109,7 +109,9 @@ public abstract class AbstractPageNumber
}
/** {@inheritDoc} */
- public void processNode(String elementName, Locator locator, Attributes attlist, PropertyList pList) throws FOPException {
+ public void processNode
+ (String elementName, Locator locator, Attributes attlist, PropertyList pList)
+ throws FOPException {
super.processNode(elementName, locator, attlist, pList);
if (!inMarker() && (refId == null || "".equals(refId))) {
missingPropertyError("ref-id");
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Block.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Block.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Block.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Block.java Wed Aug 25 16:49:26 2010
@@ -330,7 +330,8 @@ public class Block extends FObjMixed imp
/**
* @return the "fox:disable-column-balancing" property, one of
- * {@link Constants#EN_TRUE}, {@link Constants#EN_FALSE}
+ * {@link org.apache.fop.fo.Constants#EN_TRUE},
+ * {@link org.apache.fop.fo.Constants#EN_FALSE}
*/
public int getDisableColumnBalancing() {
return disableColumnBalancing;
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/BlockContainer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/BlockContainer.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/BlockContainer.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/BlockContainer.java Wed Aug 25 16:49:26 2010
@@ -219,7 +219,8 @@ public class BlockContainer extends FObj
/**
* @return the "fox:disable-column-balancing" property, one of
- * {@link Constants#EN_TRUE}, {@link Constants#EN_FALSE}
+ * {@link org.apache.fop.fo.Constants#EN_TRUE},
+ * {@link org.apache.fop.fo.Constants#EN_FALSE}
*/
public int getDisableColumnBalancing() {
return disableColumnBalancing;
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Float.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Float.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Float.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Float.java Wed Aug 25 16:49:26 2010
@@ -38,7 +38,7 @@ public class Float extends FObj {
// private int clear;
// End of property values
- static boolean notImplementedWarningGiven = false;
+ private static boolean notImplementedWarningGiven = false;
/**
* Base constructor
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Footnote.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Footnote.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Footnote.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Footnote.java Wed Aug 25 16:49:26 2010
@@ -76,9 +76,9 @@ public class Footnote extends FObj {
/**
* {@inheritDoc}
* <br>XSL Content Model: (inline,footnote-body)
- * @todo implement additional constraint: A fo:footnote is not permitted
+ * @asf.todo implement additional constraint: A fo:footnote is not permitted
* to have a fo:float, fo:footnote, or fo:marker as a descendant.
- * @todo implement additional constraint: A fo:footnote is not
+ * @asf.todo implement additional constraint: A fo:footnote is not
* permitted to have as a descendant a fo:block-container that
* generates an absolutely positioned area.
*/
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Inline.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Inline.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Inline.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Inline.java Wed Aug 25 16:49:26 2010
@@ -120,7 +120,8 @@ public class Inline extends InlineLevel
} else if (!isBlockOrInlineItem(nsURI, localName)) {
invalidChildError(loc, nsURI, localName);
} else if (!canHaveBlockLevelChildren && isBlockItem(nsURI, localName)) {
- invalidChildError(loc, getParent().getName(), nsURI, getName(), "rule.inlineContent");
+ invalidChildError(loc, getParent().getName(), nsURI, getName(),
+ "rule.inlineContent");
} else {
blockOrInlineItemFound = true;
}
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Leader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Leader.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Leader.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Leader.java Wed Aug 25 16:49:26 2010
@@ -30,7 +30,7 @@ import org.apache.fop.fo.properties.Leng
* <code>fo:leader</code></a> object.
* The main property of <code>fo:leader</code> is leader-pattern.
* The following patterns are treated: rule, space, dots and use-content.
- * @todo implement validateChildNode()
+ * @asf.todo implement validateChildNode()
*/
public class Leader extends InlineLevel {
// The value of properties relevant for fo:leader.
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/ListItem.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/ListItem.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/ListItem.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/ListItem.java Wed Aug 25 16:49:26 2010
@@ -119,7 +119,7 @@ public class ListItem extends FObj imple
/**
* {@inheritDoc}
- * @todo see if can/should rely on base class for this
+ * @asf.todo see if can/should rely on base class for this
* (i.e., add to childNodes instead)
*/
public void addChildNode(FONode child) {
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Marker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Marker.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Marker.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Marker.java Wed Aug 25 16:49:26 2010
@@ -19,7 +19,6 @@
package org.apache.fop.fo.flow;
-import java.util.Collections;
import java.util.Map;
import org.xml.sax.Attributes;
@@ -111,7 +110,7 @@ public class Marker extends FObjMixed {
* <br><i>Additionally: "An fo:marker may contain any formatting objects that
* are permitted as a replacement of any fo:retrieve-marker that retrieves
* the fo:marker's children."</i>
- * @todo implement "additional" constraint, possibly within fo:retrieve-marker
+ * @asf.todo implement "additional" constraint, possibly within fo:retrieve-marker
*/
protected void validateChildNode(Locator loc, String nsURI, String localName)
throws ValidationException {
@@ -199,17 +198,25 @@ public class Marker extends FObjMixed {
name = attributes.getLocalName(i);
value = attributes.getValue(i);
- this.attribs[i] =
- MarkerAttribute.getInstance(namespace, qname, name, value);
+ this.attribs[i]
+ = MarkerAttribute.getInstance(namespace, qname, name, value);
}
}
- /** Null implementation; not used by this type of {@link PropertyList} */
+ /**
+ * Null implementation; not used by this type of {@link PropertyList}.
+ * @param propId the propert id
+ * @param value the property value
+ */
public void putExplicit(int propId, Property value) {
//nop
}
- /** Null implementation; not used by this type of {@link PropertyList} */
+ /**
+ * Null implementation; not used by this type of {@link PropertyList}.
+ * @param propId the propert id
+ * @return the property id
+ */
public Property getExplicit(int propId) {
return null;
}
@@ -259,7 +266,11 @@ public class Marker extends FObjMixed {
}
}
- /** Default implementation; not used */
+ /**
+ * Default implementation; not used.
+ * @param index a type index
+ * @return type string
+ */
public String getType(int index) {
return "CDATA";
}
@@ -305,12 +316,21 @@ public class Marker extends FObjMixed {
return index;
}
- /** Default implementation; not used */
+ /**
+ * Default implementation; not used
+ * @param name a type name
+ * @param namespace a type namespace
+ * @return type string
+ */
public String getType(String name, String namespace) {
return "CDATA";
}
- /** Default implementation; not used */
+ /**
+ * Default implementation; not used
+ * @param qname a type name
+ * @return type string
+ */
public String getType(String qname) {
return "CDATA";
}
@@ -337,12 +357,16 @@ public class Marker extends FObjMixed {
/** Convenience inner class */
public static final class MarkerAttribute {
- private static PropertyCache attributeCache =
- new PropertyCache(MarkerAttribute.class);
+ private static PropertyCache attributeCache
+ = new PropertyCache(MarkerAttribute.class);
+ /** namespace */
protected String namespace;
+ /** qualfied name */
protected String qname;
+ /** local name */
protected String name;
+ /** value */
protected String value;
/**
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiCase.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiCase.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiCase.java Wed Aug 25 16:49:26 2010
@@ -27,7 +27,7 @@ import org.apache.fop.fo.PropertyList;
/**
* Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_multi-case">
* <code>fo:multi-case</code></a> object.
- * @todo implement validateChildNode()
+ * @asf.todo implement validateChildNode()
*/
public class MultiCase extends FObj {
// The value of properties relevant for fo:multi-case.
@@ -38,7 +38,7 @@ public class MultiCase extends FObj {
// private CommonAccessibility commonAccessibility;
// End of property values
- static boolean notImplementedWarningGiven = false;
+ private static boolean notImplementedWarningGiven = false;
/**
* Base constructor
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiProperties.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiProperties.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiProperties.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiProperties.java Wed Aug 25 16:49:26 2010
@@ -37,11 +37,11 @@ public class MultiProperties extends FOb
// private CommonAccessibility commonAccessibility;
// End of property values
- static boolean notImplementedWarningGiven = false;
+ private static boolean notImplementedWarningGiven = false;
// used for input FO validation
- boolean hasMultiPropertySet = false;
- boolean hasWrapper = false;
+ private boolean hasMultiPropertySet = false;
+ private boolean hasWrapper = false;
/**
* Base constructor
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiPropertySet.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiPropertySet.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiPropertySet.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiPropertySet.java Wed Aug 25 16:49:26 2010
@@ -37,7 +37,7 @@ public class MultiPropertySet extends FO
// private ToBeImplementedProperty activeState;
// End of property values
- static boolean notImplementedWarningGiven = false;
+ private static boolean notImplementedWarningGiven = false;
/**
* Base constructor
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiSwitch.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiSwitch.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiSwitch.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiSwitch.java Wed Aug 25 16:49:26 2010
@@ -39,7 +39,7 @@ public class MultiSwitch extends FObj {
// private CommonAccessibility commonAccessibility;
// End of property values
- static boolean notImplementedWarningGiven = false;
+ private static boolean notImplementedWarningGiven = false;
/**
* Base constructor
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiToggle.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiToggle.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiToggle.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/MultiToggle.java Wed Aug 25 16:49:26 2010
@@ -39,7 +39,7 @@ public class MultiToggle extends FObj {
// public ToBeImplementedProperty prSwitchTo;
// End of property values
- static boolean notImplementedWarningGiven = false;
+ private static boolean notImplementedWarningGiven = false;
/**
* Base constructor
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java Wed Aug 25 16:49:26 2010
@@ -16,6 +16,7 @@
*/
/* $Id$ */
+
package org.apache.fop.fo.flow;
import org.apache.fop.fo.FONode;
@@ -50,7 +51,9 @@ public class RetrieveTableMarker extends
* <i>NOTE: An <code>fo:retrieve-table-marker</code> is only permitted as a descendant
* of an <code>fo:table-header</code> or an <code>fo:table-footer</code>.</i>
*/
- public void processNode(String elementName, Locator locator, Attributes attlist, PropertyList pList) throws FOPException {
+ public void processNode
+ (String elementName, Locator locator, Attributes attlist, PropertyList pList)
+ throws FOPException {
if (findAncestor(FO_TABLE_HEADER) < 0
&& findAncestor(FO_TABLE_FOOTER) < 0) {
invalidChildError(locator, getParent().getName(), FO_URI, getName(),
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Wrapper.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Wrapper.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Wrapper.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/Wrapper.java Wed Aug 25 16:49:26 2010
@@ -76,7 +76,8 @@ public class Wrapper extends FObjMixed {
try {
FONode.validateChildNode(this.parent, loc, nsURI, localName);
} catch (ValidationException vex) {
- invalidChildError(loc, getName(), FO_URI, localName, "rule.wrapperInvalidChildForParent");
+ invalidChildError(loc, getName(), FO_URI, localName,
+ "rule.wrapperInvalidChildForParent");
}
blockOrInlineItemFound = true;
} else {
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/ColumnNumberManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/ColumnNumberManager.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/ColumnNumberManager.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/ColumnNumberManager.java Wed Aug 25 16:49:26 2010
@@ -77,8 +77,7 @@ public class ColumnNumberManager {
for (int i = 0; i < pendingSpans.size(); i++) {
pSpan = (PendingSpan) pendingSpans.get(i);
if (pSpan != null) {
- pSpan.rowsLeft--;
- if (pSpan.rowsLeft == 0) {
+ if ( pSpan.decrRowsLeft() == 0 ) {
pendingSpans.set(i, null);
} else {
usedColumnIndices.set(i);
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/ConditionalBorder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/ConditionalBorder.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/ConditionalBorder.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/ConditionalBorder.java Wed Aug 25 16:49:26 2010
@@ -36,20 +36,23 @@ import org.apache.fop.layoutmgr.table.Co
*/
public class ConditionalBorder {
+ /** normal border */
public static final int NORMAL = 0;
+ /** leading and trailing border */
public static final int LEADING_TRAILING = 1;
+ /** all the rest */
public static final int REST = 2;
/** Normal case, no break. */
- BorderSpecification normal;
+ BorderSpecification normal; // CSOK: VisibilityModifier
/** Special case: the cell is at the top or the bottom of the page. */
- BorderSpecification leadingTrailing;
+ BorderSpecification leadingTrailing; // CSOK: VisibilityModifier
/** Special case: break inside the cell. */
- BorderSpecification rest;
+ BorderSpecification rest; // CSOK: VisibilityModifier
/** The model used to resolve borders. */
private CollapsingBorderModel collapsingBorderModel;
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/GridUnit.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/GridUnit.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/GridUnit.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/GridUnit.java Wed Aug 25 16:49:26 2010
@@ -65,13 +65,13 @@ public class GridUnit {
private byte flags = 0;
/** the border-before specification */
- ConditionalBorder borderBefore;
+ ConditionalBorder borderBefore; // CSOK: VisibilityModifier
/** the border-after specification */
- ConditionalBorder borderAfter;
+ ConditionalBorder borderAfter; // CSOK: VisibilityModifier
/** the border-start specification */
- BorderSpecification borderStart;
+ BorderSpecification borderStart; // CSOK: VisibilityModifier
/** the border-end specification */
- BorderSpecification borderEnd;
+ BorderSpecification borderEnd; // CSOK: VisibilityModifier
/** The border model helper associated with the table */
protected CollapsingBorderModel collapsingBorderModel;
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/PendingSpan.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/PendingSpan.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/PendingSpan.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/PendingSpan.java Wed Aug 25 16:49:26 2010
@@ -27,7 +27,7 @@ class PendingSpan {
/**
* member variable holding the number of rows left
*/
- int rowsLeft;
+ private int rowsLeft;
/**
* Constructor
@@ -37,4 +37,22 @@ class PendingSpan {
public PendingSpan(int rows) {
rowsLeft = rows;
}
+
+ /** @return number of rows spanned */
+ public int getRowsLeft() {
+ return rowsLeft;
+ }
+
+ /**
+ * Decrement rows spanned.
+ * @return number of rows spanned after decrementing
+ */
+ public int decrRowsLeft() {
+ if ( rowsLeft > 0 ) {
+ return --rowsLeft;
+ } else {
+ return 0;
+ }
+ }
+
}
\ No newline at end of file
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java Wed Aug 25 16:49:26 2010
@@ -85,6 +85,10 @@ public class PrimaryGridUnit extends Gri
return (TablePart) node;
}
+ /**
+ * Get cell's layout manager.
+ * @return the cell's layout manager
+ */
public TableCellLayoutManager getCellLM() {
assert cellLM != null;
return cellLM;
@@ -109,6 +113,10 @@ public class PrimaryGridUnit extends Gri
this.elements = elements;
}
+ /**
+ * Obtain the Knuth elements.
+ * @return a list of Knuth elements
+ */
public List getElements() {
return this.elements;
}
@@ -247,6 +255,10 @@ public class PrimaryGridUnit extends Gri
return this.rows;
}
+ /**
+ * Add a row.
+ * @param row the row to be added
+ */
public void addRow(GridUnit[] row) {
if (rows == null) {
rows = new java.util.ArrayList();
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableAndCaption.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableAndCaption.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableAndCaption.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableAndCaption.java Wed Aug 25 16:49:26 2010
@@ -30,7 +30,7 @@ import org.apache.fop.fo.ValidationExcep
/**
* Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_table-and-caption">
* <code>fo:table-and-caption</code></a> property.
- * @todo needs implementation
+ * @asf.todo needs implementation
*/
public class TableAndCaption extends FObj /*implements BreakPropertySet*/ {
// The value of properties relevant for fo:table-and-caption.
@@ -50,7 +50,7 @@ public class TableAndCaption extends FOb
// private int textAlign;
// End of property values
- static boolean notImplementedWarningGiven = false;
+ private static boolean notImplementedWarningGiven = false;
/** used for FO validation */
private boolean tableCaptionFound = false;
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableCaption.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableCaption.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableCaption.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableCaption.java Wed Aug 25 16:49:26 2010
@@ -49,7 +49,7 @@ public class TableCaption extends FObj {
/** used for FO validation */
private boolean blockItemFound = false;
- static boolean notImplementedWarningGiven = false;
+ private static boolean notImplementedWarningGiven = false;
/**
* Create a TableCaption instance with the given {@link FONode}
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableCellContainer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableCellContainer.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableCellContainer.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableCellContainer.java Wed Aug 25 16:49:26 2010
@@ -30,14 +30,26 @@ import org.apache.fop.fo.FONode;
*/
public abstract class TableCellContainer extends TableFObj implements ColumnNumberManagerHolder {
+ /** list of pending spans */
protected List pendingSpans;
+ /** column number manager */
protected ColumnNumberManager columnNumberManager;
+ /**
+ * Construct table cell container.
+ * @param parent the parent node of the cell container
+ */
public TableCellContainer(FONode parent) {
super(parent);
}
+ /**
+ * Add cell to current row.
+ * @param cell a table cell to add
+ * @param firstRow true is first row
+ * @throws FOPException if exception occurs
+ */
protected void addTableCellChild(TableCell cell, boolean firstRow) throws FOPException {
int colNumber = cell.getColumnNumber();
int colSpan = cell.getNumberColumnsSpanned();
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableEventProducer.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableEventProducer.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableEventProducer.java Wed Aug 25 16:49:26 2010
@@ -32,7 +32,10 @@ import org.apache.fop.fo.expr.PropertyEx
public interface TableEventProducer extends EventProducer {
/** Provider class for the event producer. */
- class Provider {
+ static final class Provider {
+
+ private Provider() {
+ }
/**
* Returns an event producer.
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableFObj.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableFObj.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableFObj.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableFObj.java Wed Aug 25 16:49:26 2010
@@ -50,12 +50,12 @@ public abstract class TableFObj extends
private Numeric borderStartPrecedence;
private String ptr;
- ConditionalBorder borderBefore;
- ConditionalBorder borderAfter;
- BorderSpecification borderStart;
- BorderSpecification borderEnd;
+ ConditionalBorder borderBefore; // CSOK: VisibilityModifier
+ ConditionalBorder borderAfter; // CSOK: VisibilityModifier
+ BorderSpecification borderStart; // CSOK: VisibilityModifier
+ BorderSpecification borderEnd; // CSOK: VisibilityModifier
- CollapsingBorderModel collapsingBorderModel;
+ CollapsingBorderModel collapsingBorderModel; // CSOK: VisibilityModifier
/**
* Create a TableFObj instance that is a child
@@ -205,9 +205,10 @@ public abstract class TableFObj extends
int foId = propertyList.getFObj().getNameId();
if (i <= 0) {
if (foId == FO_TABLE_CELL || foId == FO_TABLE_COLUMN) {
- ColumnNumberManagerHolder parent =
- (ColumnNumberManagerHolder) propertyList.getParentFObj();
- ColumnNumberManager columnIndexManager = parent.getColumnNumberManager();
+ ColumnNumberManagerHolder parent
+ = (ColumnNumberManagerHolder) propertyList.getParentFObj();
+ ColumnNumberManager columnIndexManager
+ = parent.getColumnNumberManager();
i = columnIndexManager.getCurrentColumnNumber();
} else {
/* very exceptional case:
@@ -216,10 +217,11 @@ public abstract class TableFObj extends
*/
i = 1;
}
- TableEventProducer eventProducer =
- TableEventProducer.Provider.get(fo.getUserAgent().getEventBroadcaster());
- eventProducer.forceNextColumnNumber(this, propertyList.getFObj().getName(),
- val, i, propertyList.getFObj().getLocator());
+ TableEventProducer eventProducer
+ = TableEventProducer.Provider.get(fo.getUserAgent().getEventBroadcaster());
+ eventProducer.forceNextColumnNumber
+ (this, propertyList.getFObj().getName(),
+ val, i, propertyList.getFObj().getLocator());
}
return NumberProperty.getInstance(i);
}
@@ -229,7 +231,9 @@ public abstract class TableFObj extends
}
/** {@inheritDoc} */
- public void processNode(String elementName, Locator locator, Attributes attlist, PropertyList pList) throws FOPException {
+ public void processNode
+ (String elementName, Locator locator, Attributes attlist, PropertyList pList)
+ throws FOPException {
super.processNode(elementName, locator, attlist, pList);
Table table = getTable();
if (!inMarker() && !table.isSeparateBorderModel()) {
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TablePart.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TablePart.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TablePart.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TablePart.java Wed Aug 25 16:49:26 2010
@@ -46,10 +46,9 @@ public abstract class TablePart extends
// private int visibility;
// End of property values
- /**
- * used for validation
- */
+ /** table rows found */
protected boolean tableRowsFound = false;
+ /** table cells found */
protected boolean tableCellsFound = false;
private boolean firstRow = true;
@@ -124,6 +123,10 @@ public abstract class TablePart extends
return this;
}
+ /**
+ * Finish last row group.
+ * @throws ValidationException if content validation exception
+ */
protected void finishLastRowGroup() throws ValidationException {
if (!inMarker()) {
RowGroupBuilder rowGroupBuilder = getTable().getRowGroupBuilder();
@@ -214,6 +217,7 @@ public abstract class TablePart extends
rowGroups.add(rowGroup);
}
+ /** @return list of row groups */
public List getRowGroups() {
return rowGroups;
}
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableRow.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableRow.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableRow.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/flow/table/TableRow.java Wed Aug 25 16:49:26 2010
@@ -144,7 +144,6 @@ public class TableRow extends TableCellC
return (TablePart) parent;
}
- /** {@inheritDoc} */
boolean isTableRow() {
return true;
}
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/AbstractPageSequence.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/AbstractPageSequence.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/AbstractPageSequence.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/AbstractPageSequence.java Wed Aug 25 16:49:26 2010
@@ -34,7 +34,9 @@ import org.apache.fop.fo.PropertyList;
public abstract class AbstractPageSequence extends FObj {
// The value of properties relevant for fo:page-sequence.
+ /** initial page number */
protected Numeric initialPageNumber;
+ /** forced page count */
protected int forcePageCount;
private String format;
private int letterValue;
@@ -45,6 +47,7 @@ public abstract class AbstractPageSequen
private PageNumberGenerator pageNumberGenerator;
+ /** starting page number */
protected int startingPageNumber = 0;
/**
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/PageSequence.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/PageSequence.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/PageSequence.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/PageSequence.java Wed Aug 25 16:49:26 2010
@@ -151,7 +151,7 @@ public class PageSequence extends Abstra
/**
* {@inheritDoc}
- * @todo see if addChildNode() should also be called for fo's other than
+ * @asf.todo see if addChildNode() should also be called for fo's other than
* fo:flow.
*/
public void addChildNode(FONode child) throws FOPException {
@@ -254,10 +254,9 @@ public class PageSequence extends Abstra
* @return the SimplePageMaster to use for this page
* @throws PageProductionException if there's a problem determining the page master
*/
- public SimplePageMaster getNextSimplePageMaster(int page,
- boolean isFirstPage,
- boolean isLastPage,
- boolean isBlank) throws PageProductionException {
+ public SimplePageMaster getNextSimplePageMaster
+ (int page, boolean isFirstPage, boolean isLastPage, boolean isBlank)
+ throws PageProductionException {
if (pageSequenceMaster == null) {
return simplePageMaster;
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/Region.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/Region.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/Region.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/Region.java Wed Aug 25 16:49:26 2010
@@ -31,7 +31,6 @@ import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.ValidationException;
-import org.apache.fop.fo.expr.PropertyException;
import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
/**
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/RegionBody.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/RegionBody.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/RegionBody.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/RegionBody.java Wed Aug 25 16:49:26 2010
@@ -106,8 +106,10 @@ public class RegionBody extends Region {
* Also the values are resolved relative to the page size
* and reference orientation.
*/
- PercentBaseContext pageWidthContext = getPageWidthContext(LengthBase.CONTAINING_BLOCK_WIDTH);
- PercentBaseContext pageHeightContext = getPageHeightContext(LengthBase.CONTAINING_BLOCK_WIDTH);
+ PercentBaseContext pageWidthContext
+ = getPageWidthContext(LengthBase.CONTAINING_BLOCK_WIDTH);
+ PercentBaseContext pageHeightContext
+ = getPageHeightContext(LengthBase.CONTAINING_BLOCK_WIDTH);
int start;
int end;
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/Root.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/Root.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/Root.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/pagination/Root.java Wed Aug 25 16:49:26 2010
@@ -144,7 +144,11 @@ public class Root extends FObj {
}
- /** @inheritDoc */
+ /**
+ * @param loc location in the source file
+ * @param child the {@link FONode} to validate against
+ * @throws ValidationException if the incoming node is not a valid child for the given FO
+ */
protected void validateChildNode(Locator loc, FONode child) throws ValidationException {
if (child instanceof AbstractPageSequence) {
pageSequenceFound = true;
@@ -207,7 +211,8 @@ public class Root extends FObj {
* @param additionalPages the total pages generated by the sequence (for statistics)
* @throws IllegalArgumentException for negative additional page counts
*/
- public void notifyPageSequenceFinished(int lastPageNumber, int additionalPages) {
+ public void notifyPageSequenceFinished(int lastPageNumber, int additionalPages)
+ throws IllegalArgumentException {
if (additionalPages >= 0) {
totalPagesGenerated += additionalPages;
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/BackgroundPositionShorthand.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/BackgroundPositionShorthand.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/BackgroundPositionShorthand.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/BackgroundPositionShorthand.java Wed Aug 25 16:49:26 2010
@@ -57,7 +57,8 @@ public class BackgroundPositionShorthand
* specified, <code>background-position-vertical</code> is set
* to "50%".
*/
- public Property make(PropertyList propertyList, String value, FObj fo) throws PropertyException {
+ public Property make(PropertyList propertyList, String value, FObj fo)
+ throws PropertyException {
Property p = super.make(propertyList, value, fo);
if (p.getList().size() == 1) {
/* only background-position-horizontal specified
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/BorderSpacingShorthandParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/BorderSpacingShorthandParser.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/BorderSpacingShorthandParser.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/BorderSpacingShorthandParser.java Wed Aug 25 16:49:26 2010
@@ -29,6 +29,7 @@ import org.apache.fop.fo.expr.PropertyEx
*/
public class BorderSpacingShorthandParser extends GenericShorthandParser {
+ /** {@inheritDoc} */
protected Property convertValueForProperty(int propId, Property property,
PropertyMaker maker, PropertyList propertyList)
throws PropertyException {
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java Wed Aug 25 16:49:26 2010
@@ -28,7 +28,8 @@ import org.apache.fop.fo.expr.PropertyEx
* border width described in 7.7.20.
*/
public class BorderWidthPropertyMaker extends LengthProperty.Maker {
- int borderStyleId = 0;
+
+ private int borderStyleId = 0;
/**
* Create a length property which check the value of the border-*-style
@@ -41,7 +42,7 @@ public class BorderWidthPropertyMaker ex
/**
* Set the propId of the style property for the same side.
- * @param borderStyleId
+ * @param borderStyleId the border style id
*/
public void setBorderStyleId(int borderStyleId) {
this.borderStyleId = borderStyleId;
@@ -55,8 +56,7 @@ public class BorderWidthPropertyMaker ex
public Property get(int subpropId, PropertyList propertyList,
boolean bTryInherit, boolean bTryDefault)
- throws PropertyException
- {
+ throws PropertyException {
Property p = super.get(subpropId, propertyList,
bTryInherit, bTryDefault);
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CharacterProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CharacterProperty.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CharacterProperty.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CharacterProperty.java Wed Aug 25 16:49:26 2010
@@ -24,6 +24,8 @@ import org.apache.fop.fo.PropertyList;
/**
* Superclass for properties that wrap a character value
+ * @asf.todo convert character value to int in order to denote unicode scalar value
+ * instead of a single UTF-16 code element
*/
public final class CharacterProperty extends Property {
@@ -39,6 +41,7 @@ public final class CharacterProperty ext
super(propId);
}
+ /** {@inheritDoc} */
public Property make(PropertyList propertyList, String value,
FObj fo) {
char c = value.charAt(0);
@@ -48,7 +51,8 @@ public final class CharacterProperty ext
}
/** cache containing all canonical CharacterProperty instances */
- private static final PropertyCache cache = new PropertyCache(CharacterProperty.class);
+ private static final PropertyCache CACHE
+ = new PropertyCache(CharacterProperty.class);
private final char character;
@@ -59,8 +63,13 @@ public final class CharacterProperty ext
this.character = character;
}
+ /**
+ * Get character property instance for character.
+ * @param character the character
+ * @return the character property instance
+ */
public static CharacterProperty getInstance(char character) {
- return (CharacterProperty) cache.fetch(
+ return (CharacterProperty) CACHE.fetch(
new CharacterProperty(character));
}
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/ColorProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/ColorProperty.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/ColorProperty.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/ColorProperty.java Wed Aug 25 16:49:26 2010
@@ -33,7 +33,8 @@ import org.apache.fop.util.ColorUtil;
public final class ColorProperty extends Property {
/** cache holding canonical ColorProperty instances */
- private static final PropertyCache cache = new PropertyCache(ColorProperty.class);
+ private static final PropertyCache CACHE
+ = new PropertyCache(ColorProperty.class);
/**
* The color represented by this property.
@@ -97,11 +98,12 @@ public final class ColorProperty extends
* @throws PropertyException if the value can't be parsed
* @see ColorUtil#parseColorString(FOUserAgent, String)
*/
- public static ColorProperty getInstance(FOUserAgent foUserAgent, String value) throws PropertyException {
+ public static ColorProperty getInstance(FOUserAgent foUserAgent, String value)
+ throws PropertyException {
ColorProperty instance = new ColorProperty(
ColorUtil.parseColorString(
foUserAgent, value));
- return (ColorProperty)cache.fetch(instance);
+ return (ColorProperty)CACHE.fetch(instance);
}
/**
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonAbsolutePosition.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonAbsolutePosition.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonAbsolutePosition.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonAbsolutePosition.java Wed Aug 25 16:49:26 2010
@@ -33,31 +33,32 @@ public class CommonAbsolutePosition {
/**
* The "absolute-position" property.
*/
- public int absolutePosition;
+ public int absolutePosition; // CSOK: VisibilityModifier
/**
* The "top" property.
*/
- public Length top;
+ public Length top; // CSOK: VisibilityModifier
/**
* The "right" property.
*/
- public Length right;
+ public Length right; // CSOK: VisibilityModifier
/**
* The "bottom" property.
*/
- public Length bottom;
+ public Length bottom; // CSOK: VisibilityModifier
/**
* The "left" property.
*/
- public Length left;
+ public Length left; // CSOK: VisibilityModifier
/**
* Create a CommonAbsolutePosition object.
* @param pList The PropertyList with propery values.
+ * @throws PropertyException if a property exception is raised
*/
public CommonAbsolutePosition(PropertyList pList) throws PropertyException {
absolutePosition = pList.get(Constants.PR_ABSOLUTE_POSITION).getEnum();
@@ -67,6 +68,7 @@ public class CommonAbsolutePosition {
right = pList.get(Constants.PR_RIGHT).getLength();
}
+ /** {@inheritDoc} */
public String toString() {
StringBuffer sb = new StringBuffer("CommonAbsolutePosition{");
sb.append(" absPos=");
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonAccessibility.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonAccessibility.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonAccessibility.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonAccessibility.java Wed Aug 25 16:49:26 2010
@@ -32,16 +32,17 @@ public class CommonAccessibility {
/**
* The "source-doc" property.
*/
- public String sourceDoc = null;
+ public String sourceDoc = null; // CSOK: VisibilityModifier
/**
* The "role" property.
*/
- public String role = null;
+ public String role = null; // CSOK: VisibilityModifier
/**
* Create a <code>CommonAccessibility</code> object.
* @param pList The PropertyList with propery values.
+ * @throws PropertyException if a property exception is raised
*/
public CommonAccessibility(PropertyList pList) throws PropertyException {
sourceDoc = pList.get(Constants.PR_SOURCE_DOCUMENT).getString();
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonAural.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonAural.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonAural.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonAural.java Wed Aug 25 16:49:26 2010
@@ -30,92 +30,92 @@ public class CommonAural {
/**
* The "azimuth" property.
*/
- public int azimuth;
+ public int azimuth; // CSOK: VisibilityModifier
/**
* The "cueAfter" property.
*/
- public String cueAfter;
+ public String cueAfter; // CSOK: VisibilityModifier
/**
* The "cueBefore" property.
*/
- public String cueBefore;
+ public String cueBefore; // CSOK: VisibilityModifier
/**
* The "elevation" property.
*/
- public int elevation;
+ public int elevation; // CSOK: VisibilityModifier
/**
* The "pauseAfter" property.
*/
- public int pauseAfter;
+ public int pauseAfter; // CSOK: VisibilityModifier
/**
* The "pauseBefore" property.
*/
- public int pauseBefore;
+ public int pauseBefore; // CSOK: VisibilityModifier
/**
* The "pitch" property.
*/
- public int pitch;
+ public int pitch; // CSOK: VisibilityModifier
/**
* The "pitch-range" property.
*/
- public int pitchRange;
+ public int pitchRange; // CSOK: VisibilityModifier
/**
* The "playDuring" property.
*/
- public int playDuring;
+ public int playDuring; // CSOK: VisibilityModifier
/**
* The "richness" property.
*/
- public int richness;
+ public int richness; // CSOK: VisibilityModifier
/**
* The "speak" property.
*/
- public int speak;
+ public int speak; // CSOK: VisibilityModifier
/**
* The "speak-header" property.
*/
- public int speakHeader;
+ public int speakHeader; // CSOK: VisibilityModifier
/**
* The "speak-numeral" property.
*/
- public int speakNumeral;
+ public int speakNumeral; // CSOK: VisibilityModifier
/**
* The "speak-punctuation" property.
*/
- public int speakPunctuation;
+ public int speakPunctuation; // CSOK: VisibilityModifier
/**
* The "speech-rate" property.
*/
- public int speechRate;
+ public int speechRate; // CSOK: VisibilityModifier
/**
* The "stress" property.
*/
- public int stress;
+ public int stress; // CSOK: VisibilityModifier
/**
* The "voice-family" property.
*/
- public int voiceFamily;
+ public int voiceFamily; // CSOK: VisibilityModifier
/**
* The "volume" property.
*/
- public int volume;
+ public int volume; // CSOK: VisibilityModifier
/**
* Create a CommonAbsolutePosition object.
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java Wed Aug 25 16:49:26 2010
@@ -42,45 +42,46 @@ import org.apache.fop.fo.expr.PropertyEx
* Stores all common border and padding properties.
* See Sec. 7.7 of the XSL-FO Standard.
*/
-public class CommonBorderPaddingBackground {
+public class CommonBorderPaddingBackground { // CSOK: FinalClassCheck
/**
* cache holding all canonical instances
* (w/ absolute background-position-* and padding-*)
*/
- private static final PropertyCache cache = new PropertyCache(CommonBorderPaddingBackground.class);
+ private static final PropertyCache CACHE
+ = new PropertyCache(CommonBorderPaddingBackground.class);
private int hash = -1;
/**
* The "background-attachment" property.
*/
- public final int backgroundAttachment;
+ public final int backgroundAttachment; // CSOK: VisibilityModifier
/**
* The "background-color" property.
*/
- public final Color backgroundColor;
+ public final Color backgroundColor; // CSOK: VisibilityModifier
/**
* The "background-image" property.
*/
- public final String backgroundImage;
+ public final String backgroundImage; // CSOK: VisibilityModifier
/**
* The "background-repeat" property.
*/
- public final int backgroundRepeat;
+ public final int backgroundRepeat; // CSOK: VisibilityModifier
/**
* The "background-position-horizontal" property.
*/
- public final Length backgroundPositionHorizontal;
+ public final Length backgroundPositionHorizontal; // CSOK: VisibilityModifier
/**
* The "background-position-vertical" property.
*/
- public final Length backgroundPositionVertical;
+ public final Length backgroundPositionVertical; // CSOK: VisibilityModifier
private ImageInfo backgroundImageInfo;
@@ -96,12 +97,13 @@ public class CommonBorderPaddingBackgrou
public static final int END = 3;
/**
- *
+ * Utility class to express border info.
*/
- public static class BorderInfo {
+ public static final class BorderInfo {
/** cache holding all canonical instances */
- private static final PropertyCache cache = new PropertyCache(BorderInfo.class);
+ private static final PropertyCache CACHE
+ = new PropertyCache(BorderInfo.class);
private int mStyle; // Enum for border style
private Color mColor; // Border color
@@ -127,7 +129,7 @@ public class CommonBorderPaddingBackgrou
* @return a cached BorderInfo instance
*/
public static BorderInfo getInstance(int style, CondLengthProperty width, Color color) {
- return cache.fetch(new BorderInfo(style, width, color));
+ return CACHE.fetch(new BorderInfo(style, width, color));
}
/**
@@ -212,7 +214,7 @@ public class CommonBorderPaddingBackgrou
* A border info with style "none". Used as a singleton, in the collapsing-border model,
* for elements which don't specify any border on some of their sides.
*/
- private static final BorderInfo defaultBorderInfo
+ private static final BorderInfo DEFAULT_BORDER_INFO
= BorderInfo.getInstance(Constants.EN_NONE, new ConditionalNullLength(), null);
/**
@@ -274,7 +276,7 @@ public class CommonBorderPaddingBackgrou
* @return a BorderInfo instance with style set to {@link Constants#EN_NONE}
*/
public static BorderInfo getDefaultBorderInfo() {
- return defaultBorderInfo;
+ return DEFAULT_BORDER_INFO;
}
private BorderInfo[] borderInfo = new BorderInfo[4];
@@ -352,13 +354,19 @@ public class CommonBorderPaddingBackgrou
CommonBorderPaddingBackground cachedInstance = null;
/* if padding-* and background-position-* resolve to absolute lengths
* the whole instance can be cached */
- if ((newInstance.padding[BEFORE] == null || newInstance.padding[BEFORE].getLength().isAbsolute())
- && (newInstance.padding[AFTER] == null || newInstance.padding[AFTER].getLength().isAbsolute())
- && (newInstance.padding[START] == null || newInstance.padding[START].getLength().isAbsolute())
- && (newInstance.padding[END] == null || newInstance.padding[END].getLength().isAbsolute())
- && (newInstance.backgroundPositionHorizontal == null || newInstance.backgroundPositionHorizontal.isAbsolute())
- && (newInstance.backgroundPositionVertical == null || newInstance.backgroundPositionVertical.isAbsolute())) {
- cachedInstance = cache.fetch(newInstance);
+ if ((newInstance.padding[BEFORE] == null
+ || newInstance.padding[BEFORE].getLength().isAbsolute())
+ && (newInstance.padding[AFTER] == null
+ || newInstance.padding[AFTER].getLength().isAbsolute())
+ && (newInstance.padding[START] == null
+ || newInstance.padding[START].getLength().isAbsolute())
+ && (newInstance.padding[END] == null
+ || newInstance.padding[END].getLength().isAbsolute())
+ && (newInstance.backgroundPositionHorizontal == null
+ || newInstance.backgroundPositionHorizontal.isAbsolute())
+ && (newInstance.backgroundPositionVertical == null
+ || newInstance.backgroundPositionVertical.isAbsolute())) {
+ cachedInstance = CACHE.fetch(newInstance);
}
/* for non-cached, or not-yet-cached instances, preload the image */
@@ -515,6 +523,7 @@ public class CommonBorderPaddingBackgrou
}
/**
+ * @param side the side to retrieve
* @param discard indicates whether the .conditionality component should be
* considered (end of a reference-area)
* @return the width of the start-border, taking into account the specified conditionality
@@ -755,8 +764,12 @@ public class CommonBorderPaddingBackgrou
hash = 37 * hash + backgroundAttachment;
hash = 37 * hash + (backgroundColor == null ? 0 : backgroundColor.hashCode());
hash = 37 * hash + (backgroundImage == null ? 0 : backgroundImage.hashCode());
- hash = 37 * hash + (backgroundPositionHorizontal == null ? 0 : backgroundPositionHorizontal.hashCode());
- hash = 37 * hash + (backgroundPositionVertical == null ? 0 : backgroundPositionVertical.hashCode());
+ hash = 37 * hash
+ + (backgroundPositionHorizontal == null
+ ? 0 : backgroundPositionHorizontal.hashCode());
+ hash = 37 * hash
+ + (backgroundPositionVertical == null
+ ? 0 : backgroundPositionVertical.hashCode());
hash = 37 * hash + backgroundRepeat;
hash = 37 * hash + (borderInfo[BEFORE] == null ? 0 : borderInfo[BEFORE].hashCode());
hash = 37 * hash + (borderInfo[AFTER] == null ? 0 : borderInfo[AFTER].hashCode());
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonFont.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonFont.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonFont.java Wed Aug 25 16:49:26 2010
@@ -37,7 +37,8 @@ public final class CommonFont {
/** cache holding canonical CommonFont instances (only those with
* absolute font-size and font-size-adjust) */
- private static final PropertyCache cache = new PropertyCache(CommonFont.class);
+ private static final PropertyCache CACHE
+ = new PropertyCache(CommonFont.class);
/** hashcode of this instance */
private int hash = 0;
@@ -61,10 +62,10 @@ public final class CommonFont {
private final EnumProperty fontWeight;
/** The "font-size" property. */
- public final Length fontSize;
+ public final Length fontSize; // CSOK: VisibilityModifier
/** The "font-size-adjust" property. */
- public final Numeric fontSizeAdjust;
+ public final Numeric fontSizeAdjust; // CSOK: VisibilityModifier
/**
@@ -79,7 +80,7 @@ public final class CommonFont {
* @param fontSize the font-size (possibly non-cached)
* @param fontSizeAdjust the font-size-adjust (possibly non-cached)
*/
- private CommonFont(FontFamilyProperty fontFamily,
+ private CommonFont(FontFamilyProperty fontFamily, // CSOK: ParameterNumber
EnumProperty fontSelectionStrategy,
EnumProperty fontStretch,
EnumProperty fontStyle,
@@ -110,7 +111,8 @@ public final class CommonFont {
*/
public static CommonFont getInstance(PropertyList pList) throws PropertyException {
FontFamilyProperty fontFamily = (FontFamilyProperty) pList.get(Constants.PR_FONT_FAMILY);
- EnumProperty fontSelectionStrategy = (EnumProperty) pList.get(Constants.PR_FONT_SELECTION_STRATEGY);
+ EnumProperty fontSelectionStrategy
+ = (EnumProperty) pList.get(Constants.PR_FONT_SELECTION_STRATEGY);
EnumProperty fontStretch = (EnumProperty) pList.get(Constants.PR_FONT_STRETCH);
EnumProperty fontStyle = (EnumProperty) pList.get(Constants.PR_FONT_STYLE);
EnumProperty fontVariant = (EnumProperty) pList.get(Constants.PR_FONT_VARIANT);
@@ -127,7 +129,7 @@ public final class CommonFont {
fontSize,
fontSizeAdjust);
- return cache.fetch(commonFont);
+ return CACHE.fetch(commonFont);
}
/** @return an array with the font-family names */
@@ -183,23 +185,22 @@ public final class CommonFont {
/**
* Create and return an array of <code>FontTriplets</code> based on
* the properties stored in the instance variables.
- *
- * @param fontInfo
- * @return a Font object.
+ * @param fontInfo a font info object
+ * @return a font triplet
*/
public FontTriplet[] getFontState(FontInfo fontInfo) {
- int font_weight;
+ int fw;
switch (fontWeight.getEnum()) {
- case Constants.EN_100: font_weight = 100; break;
- case Constants.EN_200: font_weight = 200; break;
- case Constants.EN_300: font_weight = 300; break;
- case Constants.EN_400: font_weight = 400; break;
- case Constants.EN_500: font_weight = 500; break;
- case Constants.EN_600: font_weight = 600; break;
- case Constants.EN_700: font_weight = 700; break;
- case Constants.EN_800: font_weight = 800; break;
- case Constants.EN_900: font_weight = 900; break;
- default: font_weight = 400;
+ case Constants.EN_100: fw = 100; break;
+ case Constants.EN_200: fw = 200; break;
+ case Constants.EN_300: fw = 300; break;
+ case Constants.EN_400: fw = 400; break;
+ case Constants.EN_500: fw = 500; break;
+ case Constants.EN_600: fw = 600; break;
+ case Constants.EN_700: fw = 700; break;
+ case Constants.EN_800: fw = 800; break;
+ case Constants.EN_900: fw = 900; break;
+ default: fw = 400;
}
String style;
@@ -221,7 +222,7 @@ public final class CommonFont {
//int fontVariant = propertyList.get("font-variant").getEnum();
FontTriplet[] triplets = fontInfo.fontLookup(
getFontFamily(),
- style, font_weight);
+ style, fw);
return triplets;
}
@@ -259,7 +260,8 @@ public final class CommonFont {
hash = 37 * hash + (fontSize == null ? 0 : fontSize.hashCode());
hash = 37 * hash + (fontSizeAdjust == null ? 0 : fontSizeAdjust.hashCode());
hash = 37 * hash + (fontFamily == null ? 0 : fontFamily.hashCode());
- hash = 37 * hash + (fontSelectionStrategy == null ? 0 : fontSelectionStrategy.hashCode());
+ hash = 37 * hash + (fontSelectionStrategy == null
+ ? 0 : fontSelectionStrategy.hashCode());
hash = 37 * hash + (fontStretch == null ? 0 : fontStretch.hashCode());
hash = 37 * hash + (fontStyle == null ? 0 : fontStyle.hashCode());
hash = 37 * hash + (fontVariant == null ? 0 : fontVariant.hashCode());
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonHyphenation.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonHyphenation.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonHyphenation.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonHyphenation.java Wed Aug 25 16:49:26 2010
@@ -36,32 +36,32 @@ import org.apache.fop.fonts.Typeface;
public final class CommonHyphenation {
/** Logger */
- protected static Log log = LogFactory.getLog(CommonHyphenation.class);
+ private static final Log LOG = LogFactory.getLog(CommonHyphenation.class);
- private static final PropertyCache cache = new PropertyCache(CommonHyphenation.class);
+ private static final PropertyCache CACHE = new PropertyCache(CommonHyphenation.class);
private int hash = 0;
/** The "language" property */
- public final StringProperty language;
+ public final StringProperty language; // CSOK: VisibilityModifier
/** The "country" property */
- public final StringProperty country;
+ public final StringProperty country; // CSOK: VisibilityModifier
/** The "script" property */
- public final StringProperty script;
+ public final StringProperty script; // CSOK: VisibilityModifier
/** The "hyphenate" property */
- public final EnumProperty hyphenate;
+ public final EnumProperty hyphenate; // CSOK: VisibilityModifier
/** The "hyphenation-character" property */
- public final CharacterProperty hyphenationCharacter;
+ public final CharacterProperty hyphenationCharacter; // CSOK: VisibilityModifier
/** The "hyphenation-push-character-count" property */
- public final NumberProperty hyphenationPushCharacterCount;
+ public final NumberProperty hyphenationPushCharacterCount; // CSOK: VisibilityModifier
/** The "hyphenation-remain-character-count" property*/
- public final NumberProperty hyphenationRemainCharacterCount;
+ public final NumberProperty hyphenationRemainCharacterCount; // CSOK: VisibilityModifier
/**
* Construct a CommonHyphenation object holding the given properties
@@ -87,24 +87,26 @@ public final class CommonHyphenation {
* Gets the canonical <code>CommonHyphenation</code> instance corresponding
* to the values of the related properties present on the given
* <code>PropertyList</code>
- *
* @param propertyList the <code>PropertyList</code>
+ * @return a common hyphenation instance
+ * @throws PropertyException if a a property exception occurs
*/
- public static CommonHyphenation getInstance(PropertyList propertyList) throws PropertyException {
- StringProperty language =
- (StringProperty) propertyList.get(Constants.PR_LANGUAGE);
- StringProperty country =
- (StringProperty) propertyList.get(Constants.PR_COUNTRY);
- StringProperty script =
- (StringProperty) propertyList.get(Constants.PR_SCRIPT);
- EnumProperty hyphenate =
- (EnumProperty) propertyList.get(Constants.PR_HYPHENATE);
- CharacterProperty hyphenationCharacter =
- (CharacterProperty) propertyList.get(Constants.PR_HYPHENATION_CHARACTER);
- NumberProperty hyphenationPushCharacterCount =
- (NumberProperty) propertyList.get(Constants.PR_HYPHENATION_PUSH_CHARACTER_COUNT);
- NumberProperty hyphenationRemainCharacterCount =
- (NumberProperty) propertyList.get(Constants.PR_HYPHENATION_REMAIN_CHARACTER_COUNT);
+ public static CommonHyphenation getInstance(PropertyList propertyList)
+ throws PropertyException {
+ StringProperty language
+ = (StringProperty) propertyList.get(Constants.PR_LANGUAGE);
+ StringProperty country
+ = (StringProperty) propertyList.get(Constants.PR_COUNTRY);
+ StringProperty script
+ = (StringProperty) propertyList.get(Constants.PR_SCRIPT);
+ EnumProperty hyphenate
+ = (EnumProperty) propertyList.get(Constants.PR_HYPHENATE);
+ CharacterProperty hyphenationCharacter
+ = (CharacterProperty) propertyList.get(Constants.PR_HYPHENATION_CHARACTER);
+ NumberProperty hyphenationPushCharacterCount
+ = (NumberProperty) propertyList.get(Constants.PR_HYPHENATION_PUSH_CHARACTER_COUNT);
+ NumberProperty hyphenationRemainCharacterCount
+ = (NumberProperty) propertyList.get(Constants.PR_HYPHENATION_REMAIN_CHARACTER_COUNT);
CommonHyphenation instance = new CommonHyphenation(
language,
@@ -115,7 +117,7 @@ public final class CommonHyphenation {
hyphenationPushCharacterCount,
hyphenationRemainCharacterCount);
- return cache.fetch(instance);
+ return CACHE.fetch(instance);
}
@@ -164,7 +166,7 @@ public final class CommonHyphenation {
}
}
if (warn) {
- log.warn("Substituted specified hyphenation character (0x"
+ 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: "
@@ -209,12 +211,15 @@ public final class CommonHyphenation {
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 +
- (hyphenationCharacter == null ? 0 : hyphenationCharacter.hashCode());
- hash = 37 * hash +
- (hyphenationPushCharacterCount == null ? 0 : hyphenationPushCharacterCount.hashCode());
- hash = 37 * hash +
- (hyphenationRemainCharacterCount == null ? 0 : hyphenationRemainCharacterCount.hashCode());
+ hash = 37 * hash
+ + (hyphenationCharacter == null
+ ? 0 : hyphenationCharacter.hashCode());
+ hash = 37 * hash
+ + (hyphenationPushCharacterCount == null
+ ? 0 : hyphenationPushCharacterCount.hashCode());
+ hash = 37 * hash
+ + (hyphenationRemainCharacterCount == null
+ ? 0 : hyphenationRemainCharacterCount.hashCode());
this.hash = hash;
}
return this.hash;
Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonMarginBlock.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonMarginBlock.java?rev=989216&r1=989215&r2=989216&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonMarginBlock.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/fo/properties/CommonMarginBlock.java Wed Aug 25 16:49:26 2010
@@ -33,46 +33,47 @@ public class CommonMarginBlock {
/**
* The "margin-top" property.
*/
- public Length marginTop;
+ public Length marginTop; // CSOK: VisibilityModifier
/**
* The "margin-bottom" property.
*/
- public Length marginBottom;
+ public Length marginBottom; // CSOK: VisibilityModifier
/**
* The "margin-left" property.
*/
- public Length marginLeft;
+ public Length marginLeft; // CSOK: VisibilityModifier
/**
* The "margin-right" property.
*/
- public Length marginRight;
+ public Length marginRight; // CSOK: VisibilityModifier
/**
* The "space-before" property.
*/
- public SpaceProperty spaceBefore;
+ public SpaceProperty spaceBefore; // CSOK: VisibilityModifier
/**
* The "space-after" property.
*/
- public SpaceProperty spaceAfter;
+ public SpaceProperty spaceAfter; // CSOK: VisibilityModifier
/**
* The "start-indent" property.
*/
- public Length startIndent;
+ public Length startIndent; // CSOK: VisibilityModifier
/**
* The "end-indent" property.
*/
- public Length endIndent;
+ public Length endIndent; // CSOK: VisibilityModifier
/**
* Create a CommonMarginBlock object.
* @param pList The PropertyList with propery values.
+ * @throws PropertyException if a property exception occurs
*/
public CommonMarginBlock(PropertyList pList) throws PropertyException {
marginTop = pList.get(Constants.PR_MARGIN_TOP).getLength();
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org