git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1039179 13f79535-47bb-0310-9956-ffa450edef68tags/fop-1_1rc1old
@@ -50,7 +50,7 @@ import org.apache.fop.util.License; | |||
* The methods fromJava and fromTeX are commented out because they are not Java 1.4 compliant. | |||
*/ | |||
public final class UnicodeClasses { | |||
/** directory containing unicode properties files */ | |||
public static final String UNICODE_DIR = "http://www.unicode.org/Public/UNIDATA/"; | |||
@@ -73,7 +73,7 @@ public final class UnicodeClasses { | |||
w.write("<!-- in 'src/java/org/apache/fop/hyphenation' -->\n"); | |||
w.write("<!-- * commit the changed file -->\n"); | |||
} | |||
/** | |||
* Generate classes.xml from Java's compiled-in Unicode Character Database | |||
* @param hexcode whether to prefix each class with the hexcode (only for debugging purposes) | |||
@@ -99,7 +99,7 @@ public final class UnicodeClasses { | |||
ow.write("<classes>\n"); | |||
// loop over the first Unicode plane | |||
for (int code = Character.MIN_VALUE; code <= maxChar; ++code) { | |||
// skip surrogate area | |||
if (code == Character.MIN_SURROGATE) { | |||
code = Character.MAX_SURROGATE; | |||
@@ -114,7 +114,7 @@ public final class UnicodeClasses { | |||
|| Character.getType(code) == Character.OTHER_LETTER)) { | |||
continue; | |||
} | |||
// skip a number of blocks | |||
Character.UnicodeBlock ubi = Character.UnicodeBlock.of(code); | |||
if (ubi.equals(Character.UnicodeBlock.SUPERSCRIPTS_AND_SUBSCRIPTS) | |||
@@ -146,18 +146,18 @@ public final class UnicodeClasses { | |||
ow.flush(); | |||
ow.close(); | |||
} | |||
/** | |||
* The column numbers in the UCD file | |||
*/ | |||
public static final int UNICODE = 0, GENERAL_CATEGORY = 2, SIMPLE_UPPERCASE_MAPPING = 12, | |||
SIMPLE_LOWERCASE_MAPPING = 13, SIMPLE_TITLECASE_MAPPING = 14, NUM_FIELDS = 15; | |||
/** | |||
* Generate classes.xml from Unicode Character Database files | |||
* @param hexcode whether to prefix each class with the hexcode (only for debugging purposes) | |||
* @param unidataPath path to the directory with UCD files | |||
* @param unidataPath path to the directory with UCD files | |||
* @param outfilePath output file | |||
* @throws IOException if the input files are not found | |||
* @throws URISyntaxException if {@code unidataPath} cannot be converted to a URI | |||
@@ -175,7 +175,7 @@ public final class UnicodeClasses { | |||
throw new FileNotFoundException | |||
("URI with file or http scheme required for UNIDATA input directory"); | |||
} | |||
File f = new File(outfilePath); | |||
if (f.exists()) { | |||
f.delete(); | |||
@@ -183,7 +183,7 @@ public final class UnicodeClasses { | |||
f.createNewFile(); | |||
FileOutputStream fw = new FileOutputStream(f); | |||
OutputStreamWriter ow = new OutputStreamWriter(fw, "utf-8"); | |||
URI inuri = unidata.resolve("Blocks.txt"); | |||
InputStream inis = null; | |||
if (scheme.equals("file")) { | |||
@@ -253,7 +253,7 @@ public final class UnicodeClasses { | |||
if (j < blockNames.length) { | |||
continue; | |||
} | |||
int uppercode = -1, titlecode = -1; | |||
if (!"".equals(fields[SIMPLE_UPPERCASE_MAPPING])) { | |||
uppercode = Integer.parseInt(fields[SIMPLE_UPPERCASE_MAPPING], 16); | |||
@@ -284,7 +284,7 @@ public final class UnicodeClasses { | |||
/** | |||
* Generate classes.xml from XeTeX's Unicode letters file | |||
* @param hexcode whether to prefix each class with the hexcode (only for debugging purposes) | |||
* @param lettersPath path to XeTeX's Unicode letters file unicode-letters-XeTeX.tex | |||
* @param lettersPath path to XeTeX's Unicode letters file unicode-letters-XeTeX.tex | |||
* @param outfilePath output file | |||
* @throws IOException in case of an I/O exception | |||
*/ | |||
@@ -345,7 +345,7 @@ public final class UnicodeClasses { | |||
inbr.close(); | |||
} | |||
/** | |||
* @param args [--hexcode] [--java|--ucd|--tex] outfile [infile] | |||
* @throws IOException if the input file cannot be found | |||
@@ -375,7 +375,7 @@ public final class UnicodeClasses { | |||
if (++i < args.length) { | |||
infile = args[i]; | |||
} | |||
if (type.equals("java") && infile != null) { | |||
System.err.println("Type java does not allow an infile"); | |||
System.exit(1); |
@@ -28,7 +28,7 @@ import java.io.Writer; | |||
* Write the Apache license text in various forms | |||
*/ | |||
public final class License { | |||
private License() { | |||
} | |||
@@ -56,10 +56,10 @@ public final class License { | |||
* The subversion Id keyword line | |||
*/ | |||
public static final String ID = "$Id$"; | |||
/** | |||
* Calculate the maximum line length in the Apache license text | |||
* for use in formatting | |||
* for use in formatting | |||
*/ | |||
private static int maxLength; | |||
static { | |||
@@ -103,7 +103,7 @@ public final class License { | |||
w.write("\n"); | |||
w.write("<!-- " + ID + " -->\n"); | |||
} | |||
/** | |||
* For testing purposes | |||
* @param args optional, --java or --xml |
@@ -39,13 +39,13 @@ public interface AFPConstants { | |||
* The encoding to use to convert to US ASCII (7 bit) | |||
*/ | |||
String US_ASCII_ENCODING = "US-ASCII"; | |||
/** | |||
* The scaling of the default transform is set to | |||
* approximately 72 user space coordinates per square inch | |||
*/ | |||
int DPI_72 = 72; | |||
/** | |||
* 72dpi in millipoints | |||
*/ |
@@ -167,7 +167,7 @@ public class AFPDataObjectFactory { | |||
//set color converter (i.e. an rgb to grayscale converter) | |||
graphicsObj.setColorConverter(g2d.getPaintingState().getColorConverter()); | |||
// paint to graphics object | |||
Graphics2DImagePainter painter = graphicsObjectInfo.getPainter(); | |||
Rectangle2D area = graphicsObjectInfo.getArea(); |
@@ -32,7 +32,7 @@ public class AFPFontInfo { | |||
/** | |||
* Main constructor | |||
* | |||
* | |||
* @param afpFont The AFP Font | |||
* @param tripletList List of font triplets to associate with this font | |||
*/ | |||
@@ -43,7 +43,7 @@ public class AFPFontInfo { | |||
/** | |||
* Returns the afp font | |||
* | |||
* | |||
* @return the afp font | |||
*/ | |||
public AFPFont getAFPFont() { | |||
@@ -52,7 +52,7 @@ public class AFPFontInfo { | |||
/** | |||
* Returns the list of font triplets associated with this font. | |||
* | |||
* | |||
* @return List of font triplets | |||
*/ | |||
public List/*<FontTriplet>*/ getFontTriplets() { |
@@ -386,7 +386,7 @@ public class GraphicsObject extends AbstractDataObject { | |||
/** the internal graphics state */ | |||
private static final class GraphicsState { | |||
private GraphicsState() { | |||
} | |||
@@ -56,7 +56,7 @@ public class IncludePageOverlay extends AbstractNamedAFPObject { | |||
/** | |||
* Constructor for the Include Page Overlay | |||
* | |||
* | |||
* @param overlayName Name of the page segment | |||
* @param x The x position | |||
* @param y The y position | |||
@@ -64,7 +64,7 @@ public class IncludePageOverlay extends AbstractNamedAFPObject { | |||
*/ | |||
public IncludePageOverlay(String overlayName, int x, int y, int orientation) { | |||
super(overlayName); | |||
this.x = x; | |||
this.y = y; | |||
setOrientation(orientation); |
@@ -46,22 +46,22 @@ public class IncludePageSegment extends AbstractNamedAFPObject { | |||
* The x position where we need to put this object on the page | |||
*/ | |||
private int x; | |||
/** | |||
* The y position where we need to put this object on the page | |||
*/ | |||
private int y; | |||
/** | |||
* Constructor for the Include Page Segment | |||
* | |||
* | |||
* @param name Name of the page segment | |||
* @param x The x position | |||
* @param y The y position | |||
*/ | |||
public IncludePageSegment(String name, int x, int y) { | |||
super(name); | |||
this.x = x; | |||
this.y = y; | |||
} |
@@ -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,10 +25,10 @@ package org.apache.fop.afp.modca; | |||
public class InterchangeSet { | |||
/** interchange set 1 string value */ | |||
public static final String MODCA_PRESENTATION_INTERCHANGE_SET_1 = "MO:DCA-P IS/1"; | |||
/** interchange set 2 string value */ | |||
public static final String MODCA_PRESENTATION_INTERCHANGE_SET_2 = "MO:DCA-P IS/2"; | |||
/** resource interchange set string value */ | |||
public static final String MODCA_RESOURCE_INTERCHANGE_SET = "MO:DCA-L"; | |||
@@ -47,7 +47,7 @@ public class InterchangeSet { | |||
/** | |||
* Returns the interchange set value of a given string | |||
* | |||
* | |||
* @param str an interchange set value | |||
* @return an interchange set | |||
*/ | |||
@@ -65,7 +65,7 @@ public class InterchangeSet { | |||
/** | |||
* Main constructor | |||
* | |||
* | |||
* @param value the interchange set value | |||
*/ | |||
public InterchangeSet(int value) { | |||
@@ -74,39 +74,39 @@ public class InterchangeSet { | |||
/** | |||
* Returns true if complies with MOD:CA interchange set 1 | |||
* | |||
* | |||
* @return true if complies with MOD:CA interchange set 1 | |||
*/ | |||
protected boolean is1() { | |||
return value == SET_1; | |||
} | |||
/** | |||
* Returns true if complies with MOD:CA interchange set 2 | |||
* | |||
* | |||
* @return true if complies with MOD:CA interchange set 2 | |||
*/ | |||
public boolean is2() { | |||
return value == SET_2; | |||
} | |||
/** | |||
* Returns true if complies with MOD:CA resource set | |||
* | |||
* | |||
* @return true if complies with MOD:CA resource set | |||
*/ | |||
public boolean isResource() { | |||
return value == RESOURCE_SET; | |||
} | |||
/** {@inheritDoc} */ | |||
public String toString() { | |||
return NAMES[value]; | |||
} | |||
/** | |||
* Returns true if MOD:CA interchange set 2 (resource groups) is supported | |||
* | |||
* | |||
* @return true if MOD:CA interchange set 2 (resource groups) is supported | |||
*/ | |||
public boolean supportsLevel2() { |
@@ -34,7 +34,7 @@ public class InvokeMediumMap extends AbstractNamedAFPObject { | |||
/** | |||
* Constructor for the Invoke Medium Map | |||
* | |||
* | |||
* @param name the name of the medium map | |||
*/ | |||
public InvokeMediumMap(String name) { |
@@ -35,7 +35,7 @@ import org.apache.fop.afp.util.BinaryUtils; | |||
public class MapPageOverlay extends AbstractAFPObject { | |||
private static final int MAX_SIZE = 253; | |||
/** | |||
* The collection of overlays (maximum of 254 stored as byte[]) | |||
*/ | |||
@@ -53,7 +53,7 @@ public class MapPageOverlay extends AbstractAFPObject { | |||
} | |||
return this.overLays; | |||
} | |||
/** | |||
* Add an overlay to to the map page overlay object. | |||
* |
@@ -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,10 +32,10 @@ import java.util.List; | |||
public class PageSegment extends AbstractNamedAFPObject { | |||
private List/*<AbstractAFPObject>*/ objects = null; | |||
/** | |||
* Main constructor | |||
* | |||
* | |||
* @param name the name of this object | |||
*/ | |||
public PageSegment(String name) { | |||
@@ -44,7 +44,7 @@ public class PageSegment extends AbstractNamedAFPObject { | |||
/** | |||
* Returns a list of objects contained withing this page segment | |||
* | |||
* | |||
* @return a list of objects contained within this page segment | |||
*/ | |||
public List/*<AbstractAFPObject>*/ getObjects() { | |||
@@ -56,13 +56,13 @@ public class PageSegment extends AbstractNamedAFPObject { | |||
/** | |||
* Adds a resource object (image/graphic) to this page segment | |||
* | |||
* | |||
* @param object the resource objec to add to this page segment | |||
*/ | |||
public void addObject(AbstractAFPObject object) { | |||
getObjects().add(object); | |||
} | |||
/** {@inheritDoc} */ | |||
protected void writeStart(OutputStream os) throws IOException { | |||
byte[] data = new byte[17]; | |||
@@ -82,7 +82,7 @@ public class PageSegment extends AbstractNamedAFPObject { | |||
copySF(data, Type.END, Category.PAGE_SEGMENT); | |||
os.write(data); | |||
} | |||
/** {@inheritDoc} */ | |||
public String toString() { | |||
return this.name; |
@@ -102,11 +102,11 @@ public class TagLogicalElement extends AbstractTripletStructuredObject { | |||
FullyQualifiedNameTriplet.FORMAT_CHARSTR, | |||
name); | |||
setAttributeValue(value); | |||
setAttributeQualifier(tleID, 1); | |||
setAttributeQualifier(tleID, 1); | |||
byte[] data = new byte[SF_HEADER.length]; | |||
copySF(data, Type.ATTRIBUTE, Category.PROCESS_ELEMENT); | |||
int tripletDataLength = getTripletDataLength(); | |||
byte[] l = BinaryUtils.convert(data.length + tripletDataLength - 1, 2); | |||
data[1] = l[0]; |
@@ -34,7 +34,7 @@ public class TagLogicalElementBean { | |||
/** | |||
* Constructor for the TagLogicalElementBean. | |||
* | |||
* | |||
* @param key the key attribute | |||
* @param value the value attribute | |||
*/ | |||
@@ -45,7 +45,7 @@ public class TagLogicalElementBean { | |||
/** | |||
* Getter for the key attribute. | |||
* | |||
* | |||
* @return the key | |||
*/ | |||
public String getKey() { | |||
@@ -54,7 +54,7 @@ public class TagLogicalElementBean { | |||
/** | |||
* Getter for the value attribute. | |||
* | |||
* | |||
* @return the value | |||
*/ | |||
public String getValue() { |
@@ -40,7 +40,7 @@ public class LineArea extends Area { | |||
* page-number or a page-number-citation is resolved | |||
*/ | |||
private final class LineAdjustingInfo implements Serializable { | |||
private static final long serialVersionUID = -6103629976229458273L; | |||
private int lineAlignment; |
@@ -199,7 +199,7 @@ public final class Trait implements Serializable { | |||
public static final Integer OVERLINE_COLOR = new Integer(35); | |||
/** Trait for color of linethrough decorations when rendering inline parent. */ | |||
public static final Integer LINETHROUGH_COLOR = new Integer(36); | |||
/** The ptr trait. Used for accessibility */ | |||
public static final Integer PTR = new Integer(37); | |||
@@ -31,7 +31,7 @@ public class Image extends Area { | |||
private static final long serialVersionUID = 4800834714349695386L; | |||
private String url; | |||
/** | |||
* Create a new image with the given url. | |||
* |
@@ -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,5 +29,5 @@ public interface BreakPropertySet { | |||
/** @return the "break-before" property. */ | |||
int getBreakBefore(); | |||
} |
@@ -30,7 +30,7 @@ import org.apache.fop.fo.expr.PropertyException; | |||
* Window - Preferences - Java - Code Generation - Code and Comments | |||
*/ | |||
public class DimensionPropertyMaker extends CorrespondingPropertyMaker { | |||
private int[][] extraCorresponding = null; | |||
/** |
@@ -26,7 +26,7 @@ import java.util.List; | |||
import org.apache.fop.fonts.autodetect.FontInfoFinder; | |||
/** | |||
* Adds a list of fonts to a given font info list | |||
* Adds a list of fonts to a given font info list | |||
*/ | |||
public class FontAdder { | |||
private FontEventListener listener; | |||
@@ -44,7 +44,7 @@ public class FontAdder { | |||
this.resolver = resolver; | |||
this.listener = listener; | |||
} | |||
/** | |||
* Iterates over font url list adding to font info list | |||
* @param fontURLList font file list |
@@ -106,7 +106,7 @@ public final class FontCache implements Serializable { | |||
/** | |||
* Returns the default font cache file. | |||
* | |||
* | |||
* @param forWriting | |||
* true if the user directory should be created | |||
* @return the default font cache file | |||
@@ -133,7 +133,7 @@ public final class FontCache implements Serializable { | |||
/** | |||
* Reads the default font cache file and returns its contents. | |||
* | |||
* | |||
* @return the font cache deserialized from the file (or null if no cache | |||
* file exists or if it could not be read) | |||
*/ | |||
@@ -143,7 +143,7 @@ public final class FontCache implements Serializable { | |||
/** | |||
* Reads a font cache file and returns its contents. | |||
* | |||
* | |||
* @param cacheFile | |||
* the cache file | |||
* @return the font cache deserialized from the file (or null if no cache | |||
@@ -186,7 +186,7 @@ public final class FontCache implements Serializable { | |||
/** | |||
* Writes the font cache to disk. | |||
* | |||
* | |||
* @throws FOPException | |||
* fop exception | |||
*/ | |||
@@ -196,7 +196,7 @@ public final class FontCache implements Serializable { | |||
/** | |||
* Writes the font cache to disk. | |||
* | |||
* | |||
* @param cacheFile | |||
* the file to write to | |||
* @throws FOPException | |||
@@ -226,7 +226,7 @@ public final class FontCache implements Serializable { | |||
/** | |||
* creates a key given a font info for the font mapping | |||
* | |||
* | |||
* @param fontInfo | |||
* font info | |||
* @return font cache key | |||
@@ -242,7 +242,7 @@ public final class FontCache implements Serializable { | |||
/** | |||
* cache has been updated since it was read | |||
* | |||
* | |||
* @return if this cache has changed | |||
*/ | |||
public boolean hasChanged() { | |||
@@ -251,7 +251,7 @@ public final class FontCache implements Serializable { | |||
/** | |||
* is this font in the cache? | |||
* | |||
* | |||
* @param embedUrl | |||
* font info | |||
* @return boolean | |||
@@ -262,7 +262,7 @@ public final class FontCache implements Serializable { | |||
/** | |||
* is this font info in the cache? | |||
* | |||
* | |||
* @param fontInfo | |||
* font info | |||
* @return font | |||
@@ -275,7 +275,7 @@ public final class FontCache implements Serializable { | |||
/** | |||
* Tries to identify a File instance from an array of URLs. If there's no | |||
* file URL in the array, the method returns null. | |||
* | |||
* | |||
* @param urls | |||
* array of possible font urls | |||
* @return file font file | |||
@@ -313,7 +313,7 @@ public final class FontCache implements Serializable { | |||
/** | |||
* Adds a font info to cache | |||
* | |||
* | |||
* @param fontInfo | |||
* font info | |||
*/ | |||
@@ -346,7 +346,7 @@ public final class FontCache implements Serializable { | |||
/** | |||
* Returns a font from the cache. | |||
* | |||
* | |||
* @param embedUrl | |||
* font info | |||
* @return CachedFontFile object | |||
@@ -360,7 +360,7 @@ public final class FontCache implements Serializable { | |||
* Returns the EmbedFontInfo instances belonging to a font file. If the font | |||
* file was modified since it was cached the entry is removed and null is | |||
* returned. | |||
* | |||
* | |||
* @param embedUrl | |||
* the font URL | |||
* @param lastModified | |||
@@ -380,7 +380,7 @@ public final class FontCache implements Serializable { | |||
/** | |||
* removes font from cache | |||
* | |||
* | |||
* @param embedUrl | |||
* embed url | |||
*/ | |||
@@ -398,7 +398,7 @@ public final class FontCache implements Serializable { | |||
/** | |||
* has this font previously failed to load? | |||
* | |||
* | |||
* @param embedUrl | |||
* embed url | |||
* @param lastModified | |||
@@ -425,7 +425,7 @@ public final class FontCache implements Serializable { | |||
/** | |||
* Registers a failed font with the cache | |||
* | |||
* | |||
* @param embedUrl | |||
* embed url | |||
* @param lastModified | |||
@@ -463,7 +463,7 @@ public final class FontCache implements Serializable { | |||
/** | |||
* Retrieve the last modified date/time of a URL. | |||
* | |||
* | |||
* @param url | |||
* the URL | |||
* @return the last modified date/time | |||
@@ -520,7 +520,7 @@ public final class FontCache implements Serializable { | |||
/** | |||
* Gets the modified timestamp for font file (not always available) | |||
* | |||
* | |||
* @return modified timestamp | |||
*/ | |||
public long lastModified() { | |||
@@ -530,7 +530,7 @@ public final class FontCache implements Serializable { | |||
/** | |||
* Gets the modified timestamp for font file (used for the purposes of | |||
* font info caching) | |||
* | |||
* | |||
* @param lastModified | |||
* modified font file timestamp | |||
*/ |
@@ -41,7 +41,7 @@ public class FontDetector { | |||
private static final String[] FONT_MIMETYPES = { | |||
"application/x-font", "application/x-font-truetype" | |||
}; | |||
private FontManager fontManager; | |||
private FontAdder fontAdder; | |||
private boolean strict; | |||
@@ -75,7 +75,7 @@ public class FontDetector { | |||
List/*<URL>*/ fontURLList = fontFileFinder.find( | |||
fontBase.getAbsolutePath()); | |||
fontAdder.add(fontURLList, fontInfoList); | |||
//Can only use the font base URL if it's a file URL | |||
} | |||
} catch (IOException e) { |
@@ -175,11 +175,11 @@ public class FontManager { | |||
} | |||
return fontCache; | |||
} | |||
/** | |||
* Saves the FontCache as necessary | |||
* | |||
* @throws FOPException fop exception | |||
* | |||
* @throws FOPException fop exception | |||
*/ | |||
public void saveCache() throws FOPException { | |||
if (useCache) { |
@@ -85,7 +85,7 @@ public class FontManagerConfigurator { | |||
// global font configuration | |||
Configuration fontsCfg = cfg.getChild("fonts", false); | |||
if (fontsCfg != null) { | |||
// font substitution | |||
Configuration substitutionsCfg = fontsCfg.getChild("substitutions", false); | |||
if (substitutionsCfg != null) { |
@@ -139,9 +139,9 @@ public abstract class Typeface implements FontMetrics { | |||
} | |||
} | |||
} | |||
/** {@inheritDoc} */ | |||
public String toString() { | |||
return getFullName(); | |||
} | |||
} | |||
} |
@@ -73,7 +73,7 @@ public class HyphenationTreeCache { | |||
* @param lang the language | |||
* @param country the country (may be null or "none") | |||
* @param hyphPatNames the map of user-configured hyphenation pattern file names | |||
* @return the hyphenation pattern file name or null | |||
* @return the hyphenation pattern file name or null | |||
*/ | |||
public static String constructUserKey(String lang, String country, Map hyphPatNames) { | |||
String userKey = null; | |||
@@ -84,7 +84,7 @@ public class HyphenationTreeCache { | |||
} | |||
return userKey; | |||
} | |||
/** | |||
* Cache a hyphenation tree under its key. | |||
* @param key the key (ex. "de_CH" or "en") |
@@ -273,14 +273,14 @@ public class PatternParser extends DefaultHandler implements PatternConsumer { | |||
parser = mainParser; | |||
} | |||
} | |||
// | |||
// ContentHandler methods | |||
// | |||
/** | |||
* {@inheritDoc} | |||
* @throws SAXException | |||
* @throws SAXException | |||
*/ | |||
public void startElement(String uri, String local, String raw, | |||
Attributes attrs) throws SAXException { | |||
@@ -463,9 +463,9 @@ public class PatternParser extends DefaultHandler implements PatternConsumer { | |||
public void addPattern(String p, String v) { | |||
testOut.println("pattern: " + p + " : " + v); | |||
} | |||
private PrintStream testOut = System.out; | |||
/** | |||
* Set test out stream. | |||
* @param testOut the testOut to set | |||
@@ -473,7 +473,7 @@ public class PatternParser extends DefaultHandler implements PatternConsumer { | |||
public void setTestOut(PrintStream testOut) { | |||
this.testOut = testOut; | |||
} | |||
/** | |||
* Close test out file. | |||
*/ | |||
@@ -503,5 +503,5 @@ public class PatternParser extends DefaultHandler implements PatternConsumer { | |||
} | |||
} | |||
} |
@@ -27,10 +27,10 @@ import java.io.ObjectOutputStream; | |||
/** | |||
* Serialize hyphenation patterns | |||
* For all xml files in the source directory a pattern file is built in the target directory | |||
* This class may be called from the ant build file in a java task | |||
* This class may be called from the ant build file in a java task | |||
*/ | |||
public class SerializeHyphPattern { | |||
private boolean errorDump = false; | |||
/** |
@@ -59,7 +59,7 @@ public abstract class BreakingAlgorithm { | |||
/** Holder for symbolic literals for the fitness classes */ | |||
static final class FitnessClasses { | |||
private FitnessClasses() { | |||
} | |||
@@ -91,7 +91,7 @@ public abstract class LeafNodeLayoutManager extends AbstractLayoutManager | |||
* @param ipd inline progression dimension | |||
* @param bHyph true if hyphenated | |||
* @param alignmentContext an alignment context | |||
*/ | |||
*/ | |||
public AreaInfo(short iLS, MinOptMax ipd, boolean bHyph, | |||
AlignmentContext alignmentContext) { | |||
iLScount = iLS; |
@@ -401,7 +401,7 @@ public abstract class PDFObject implements PDFWritable { | |||
* identical, this method is not required to check everything. In the case | |||
* of PDFObjects, this means that the overriding function does not have to | |||
* check for {@link #getObjectID()}. | |||
* | |||
* | |||
* @param o | |||
* object to compare to. | |||
* @return true if the other object has the same content. |
@@ -33,7 +33,7 @@ public abstract class AbstractConfigurator { | |||
protected static final Log log = LogFactory.getLog(AbstractConfigurator.class); | |||
private static final String MIME = "mime"; | |||
/** fop factory configuration */ | |||
protected FOUserAgent userAgent = null; | |||
@@ -39,7 +39,7 @@ public final class DummyPercentBaseContext implements PercentBaseContext { | |||
public static DummyPercentBaseContext getInstance() { | |||
return singleton; | |||
} | |||
/** {@inheritDoc} */ | |||
public int getBaseLength(int lengthBase, FObj fo) { | |||
return 0; |
@@ -44,7 +44,7 @@ public class AFPInvokeMediumMapElement extends AbstractAFPExtensionObject { | |||
super.startOfNode(); | |||
if (parent.getNameId() != Constants.FO_PAGE_SEQUENCE | |||
&& parent.getNameId() != Constants.FO_SIMPLE_PAGE_MASTER) { | |||
invalidChildError(getLocator(), parent.getName(), getNamespaceURI(), getName(), | |||
"rule.childOfPageSequence"); | |||
} |
@@ -74,7 +74,7 @@ public class GoToXYAction extends AbstractAction implements DocumentNavigationEx | |||
* <p> | |||
* This function will always return a valid value for safety. Use | |||
* {@link #isComplete()} to check if the link is actually complete. | |||
* | |||
* | |||
* @return the page index (0-based) | |||
*/ | |||
public int getPageIndex() { | |||
@@ -90,7 +90,7 @@ public class GoToXYAction extends AbstractAction implements DocumentNavigationEx | |||
* <p> | |||
* This function will always return a valid value for safety. Use | |||
* {@link #isComplete()} to check if the link is actually complete. | |||
* | |||
* | |||
* @return the target location (coordinates in millipoints) | |||
*/ | |||
public Point getTargetLocation() { | |||
@@ -112,7 +112,7 @@ public class GoToXYAction extends AbstractAction implements DocumentNavigationEx | |||
private boolean isCompleteExceptTargetLocation() { | |||
return (getPageIndex() >= 0); | |||
} | |||
/** {@inheritDoc} */ | |||
public boolean isComplete() { | |||
return this.isCompleteExceptTargetLocation() && (this.targetLocation != null); | |||
@@ -147,9 +147,9 @@ public class GoToXYAction extends AbstractAction implements DocumentNavigationEx | |||
atts.addAttribute(null, "id", "id", XMLUtil.CDATA, getID()); | |||
atts.addAttribute(null, "page-index", "page-index", | |||
XMLUtil.CDATA, Integer.toString(pageIndex)); | |||
atts.addAttribute(null, "x", "x", XMLUtil.CDATA, | |||
atts.addAttribute(null, "x", "x", XMLUtil.CDATA, | |||
Integer.toString(reportedTargetLocation.x)); | |||
atts.addAttribute(null, "y", "y", XMLUtil.CDATA, | |||
atts.addAttribute(null, "y", "y", XMLUtil.CDATA, | |||
Integer.toString(reportedTargetLocation.y)); | |||
} else { | |||
atts.addAttribute(null, "idref", "idref", XMLUtil.CDATA, getID()); |
@@ -134,7 +134,7 @@ public abstract class AbstractImageAdapter implements PDFImage { | |||
// sRGB hasn't been set up for the PDF document | |||
// so install but don't set to DefaultRGB | |||
cs = PDFICCBasedColorSpace.setupsRGBColorSpace(doc); | |||
} | |||
} | |||
pdfICCStream = cs.getICCStream(); | |||
} | |||
return pdfICCStream; |
@@ -84,7 +84,7 @@ public class PDFImageHandlerSVG implements ImageHandler { | |||
userAgent.getFactory().getImageManager(), | |||
userAgent.getImageSessionContext(), | |||
new AffineTransform()); | |||
//Cloning SVG DOM as Batik attaches non-thread-safe facilities (like the CSS engine) | |||
//to it. | |||
Document clonedDoc = BatikUtil.cloneSVGDocument(imageSVG.getDocument()); |
@@ -29,7 +29,7 @@ public interface PSEventProducer extends EventProducer { | |||
/** Provider class for the event producer. */ | |||
final class Provider { | |||
private Provider() { | |||
} | |||
@@ -62,7 +62,7 @@ extends RtfContainer { | |||
public static final String FOOTERY = "footery"; | |||
/** constant for itap level */ | |||
public static final String ITAP = "itap"; | |||
/** String array of RtfPage attributes */ | |||
public static final String[] PAGE_ATTR = new String[]{ | |||
PAGE_WIDTH, PAGE_HEIGHT, LANDSCAPE, MARGIN_TOP, MARGIN_BOTTOM, |
@@ -111,7 +111,7 @@ public class BuilderContext { | |||
return result; | |||
} | |||
/** | |||
/** | |||
* Push an RtfContainer on our stack. | |||
* @param c the container | |||
*/ |
@@ -38,7 +38,7 @@ public class RefElement extends MIFElement { | |||
super(name); | |||
} | |||
/** | |||
/** | |||
* @param key a key | |||
* @return an mif element | |||
*/ |