Thread: [FOray-commit] SF.net SVN: foray: [7989] trunk/foray (Page 2)
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-09-08 01:44:50
|
Revision: 7989
http://svn.sourceforge.net/foray/?rev=7989&view=rev
Author: victormote
Date: 2006-09-07 18:44:31 -0700 (Thu, 07 Sep 2006)
Log Message:
-----------
Style changes only.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTask.java
trunk/foray/foray-app/src/java/org/foray/app/ant/RunTest.java
trunk/foray/foray-app/src/java/org/foray/demo/servlet/AbstractDemoServlet.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/SerializeHyphPattern.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFEncryption.java
trunk/foray/foray-pretty/src/java/org/foray/pretty/FOrayXDiff.java
trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java
trunk/foray/scripts/checkstyle-config.xml
Modified: trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTask.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTask.java 2006-09-08 01:37:47 UTC (rev 7988)
+++ trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTask.java 2006-09-08 01:44:31 UTC (rev 7989)
@@ -228,7 +228,7 @@
/**
* Starts execution of this task
*/
- public void execute() throws BuildException {
+ public void execute() {
Log log = null;
switch (getMessageType()) {
case Project.MSG_INFO: {
Modified: trunk/foray/foray-app/src/java/org/foray/app/ant/RunTest.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/ant/RunTest.java 2006-09-08 01:37:47 UTC (rev 7988)
+++ trunk/foray/foray-app/src/java/org/foray/app/ant/RunTest.java 2006-09-08 01:44:31 UTC (rev 7989)
@@ -79,7 +79,7 @@
* This creates the reference output, if required, then tests
* the current build.
*/
- public void execute() throws BuildException {
+ public void execute() {
runReference();
testNewBuild();
}
@@ -129,7 +129,7 @@
* the version required.
* The reference output is then created.
*/
- protected void runReference() throws BuildException {
+ protected void runReference() {
// check not already done
final File f = new File(basedir + "/reference/output/");
// if(f.exists()) {
Modified: trunk/foray/foray-app/src/java/org/foray/demo/servlet/AbstractDemoServlet.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/demo/servlet/AbstractDemoServlet.java 2006-09-08 01:37:47 UTC (rev 7988)
+++ trunk/foray/foray-app/src/java/org/foray/demo/servlet/AbstractDemoServlet.java 2006-09-08 01:44:31 UTC (rev 7989)
@@ -141,8 +141,7 @@
*/
protected FOrayDocument setupJAXPDocument(final File xmlFile,
final File xslFile, final FOraySession session)
- throws TransformerFactoryConfigurationError,
- TransformerConfigurationException, FOrayException {
+ throws TransformerConfigurationException, FOrayException {
// Setup FOrayDocument
final TransformerFactory factory = TransformerFactory.newInstance();
final Transformer transformer = factory.newTransformer(
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java 2006-09-08 01:37:47 UTC (rev 7988)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java 2006-09-08 01:44:31 UTC (rev 7989)
@@ -180,8 +180,7 @@
* @param mappingClassName The name of the Namespace subclass for which
* an instance should be created.
*/
- public Namespace createNonstandardNamespace(final String mappingClassName)
- throws IllegalArgumentException {
+ public Namespace createNonstandardNamespace(final String mappingClassName) {
try {
return (Namespace)Class.forName(mappingClassName).newInstance();
} catch (final ClassNotFoundException e) {
Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/SerializeHyphPattern.java
===================================================================
--- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/SerializeHyphPattern.java 2006-09-08 01:37:47 UTC (rev 7988)
+++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/SerializeHyphPattern.java 2006-09-08 01:44:31 UTC (rev 7989)
@@ -33,7 +33,6 @@
import org.axsl.hyphenR.HyphenationException;
import org.apache.commons.logging.Log;
-import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.taskdefs.MatchingTask;
@@ -54,7 +53,7 @@
/**
* Main method, which is called by ant.
*/
- public void execute() throws BuildException {
+ public void execute() {
final DirectoryScanner ds = this.getDirectoryScanner(sourceDir);
final String[] files = ds.getIncludedFiles();
for (int i = 0; i < files.length; i++) {
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFEncryption.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFEncryption.java 2006-09-08 01:37:47 UTC (rev 7988)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFEncryption.java 2006-09-08 01:44:31 UTC (rev 7989)
@@ -390,7 +390,7 @@
*
* @return the PDF
*/
- public String toPDF() throws IllegalStateException {
+ public String toPDF() {
if (this.dictionary == null) {
throw new IllegalStateException("PDF Encryption has not been "
+ "initialized");
Modified: trunk/foray/foray-pretty/src/java/org/foray/pretty/FOrayXDiff.java
===================================================================
--- trunk/foray/foray-pretty/src/java/org/foray/pretty/FOrayXDiff.java 2006-09-08 01:37:47 UTC (rev 7988)
+++ trunk/foray/foray-pretty/src/java/org/foray/pretty/FOrayXDiff.java 2006-09-08 01:44:31 UTC (rev 7989)
@@ -100,7 +100,7 @@
}
private void convertStreams(final InputStream[] streams)
- throws IllegalArgumentException, XMLStreamException {
+ throws XMLStreamException {
if (streams == null) {
throw new IllegalArgumentException("No InputStreams to compare.");
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java 2006-09-08 01:37:47 UTC (rev 7988)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java 2006-09-08 01:44:31 UTC (rev 7989)
@@ -786,8 +786,7 @@
return pageList.size();
}
- public PageFormat getPageFormat(final int pageIndex)
- throws IndexOutOfBoundsException {
+ public PageFormat getPageFormat(final int pageIndex) {
if (pageIndex >= pageList.size()) {
return null;
}
@@ -814,8 +813,7 @@
return pageFormat;
}
- public Printable getPrintable(final int pageIndex)
- throws IndexOutOfBoundsException {
+ public Printable getPrintable(final int pageIndex) {
return this;
}
Modified: trunk/foray/scripts/checkstyle-config.xml
===================================================================
--- trunk/foray/scripts/checkstyle-config.xml 2006-09-08 01:37:47 UTC (rev 7988)
+++ trunk/foray/scripts/checkstyle-config.xml 2006-09-08 01:44:31 UTC (rev 7989)
@@ -162,9 +162,7 @@
</module>
<module name="PackageDeclaration"/>
<module name="ParenPad"/>
- <module name="RedundantThrows">
- <property name="severity" value="ignore"/>
- </module>
+ <module name="RedundantThrows"/>
<module name="RightCurly">
<property name="severity" value="ignore"/>
</module>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-08 01:53:46
|
Revision: 7990
http://svn.sourceforge.net/foray/?rev=7990&view=rev
Author: victormote
Date: 2006-09-07 18:53:21 -0700 (Thu, 07 Sep 2006)
Log Message:
-----------
Style changes only.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java
trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/TIFFGraphic.java
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFunction.java
trunk/foray/foray-render/src/java/org/foray/render/Renderer.java
trunk/foray/foray-render/src/java/org/foray/render/pcl/PCLRenderer.java
trunk/foray/scripts/checkstyle-config.xml
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2006-09-08 01:44:31 UTC (rev 7989)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2006-09-08 01:53:21 UTC (rev 7990)
@@ -203,15 +203,12 @@
if (minIPD > 0) {
if (node.traitIPDimensionMax(this, maxAllocationIPD) >= 0) {
optIPD = (minIPD + maxIPD)/2;
- }
- else {
+ } else {
optIPD = minIPD;
}
- }
- else if (node.traitIPDimensionMax(this, maxAllocationIPD) >= 0) {
+ } else if (node.traitIPDimensionMax(this, maxAllocationIPD) >= 0) {
optIPD = maxIPD;
- }
- else {
+ } else {
getLogger().error("At least one of minimum, optimum, or "
+ "maximum IPD must be specified on table.");
optIPD = maxIPD;
@@ -222,17 +219,14 @@
int iProportionalWidth = 0;
if (optIPD > totalFixedWidth) {
iProportionalWidth = optIPD - totalFixedWidth;
- }
- else if (maxIPD > totalFixedWidth) {
+ } else if (maxIPD > totalFixedWidth) {
iProportionalWidth = maxIPD - totalFixedWidth;
- }
- else {
+ } else {
iProportionalWidth = maxAllocationIPD - totalFixedWidth;
}
if (iProportionalWidth > 0) {
dUnitLength = iProportionalWidth / totalTableUnits;
- }
- else {
+ } else {
getLogger().error("Sum of fixed column widths "
+ totalFixedWidth
+ " greater than maximum available IPD "
@@ -245,22 +239,19 @@
// Reduce fixed column widths by this much???
}
//log.debug("1 table-unit = " + dUnitLength + " mpt");
- }
- else {
+ } else {
/* No proportional units. If minimum IPD is specified, check
* that sum of column widths > minIPD.
*/
if (minIPD > totalFixedWidth) {
// Add extra space to each column
dWidthFactor = (double) minIPD/(double)totalFixedWidth;
- }
- else if (maxIPD < totalFixedWidth) {
+ } else if (maxIPD < totalFixedWidth) {
// Note: if maxIPD=auto, use maxAllocWidth
getLogger().warn("Sum of fixed column widths "
+ totalFixedWidth
+ " greater than maximum specified IPD " + maxIPD);
- }
- else if (optIPD != -1 && totalFixedWidth != optIPD) {
+ } else if (optIPD != -1 && totalFixedWidth != optIPD) {
getLogger().warn("Sum of fixed column widths "
+ totalFixedWidth
+ " differs from specified optimum IPD " + optIPD);
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2006-09-08 01:44:31 UTC (rev 7989)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2006-09-08 01:53:21 UTC (rev 7990)
@@ -196,8 +196,7 @@
outputTarget.stopOutput();
} catch (final AreaRException e) {
throw new SAXException(e);
- }
- catch (final IOException e) {
+ } catch (final IOException e) {
throw new SAXException(e);
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java 2006-09-08 01:44:31 UTC (rev 7989)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java 2006-09-08 01:53:21 UTC (rev 7990)
@@ -468,17 +468,14 @@
if ((flags & 8) > 0) {
offset += 2; // WE_HAVE_A_SCALE
- }
- else if ((flags & 64) > 0) {
+ } else if ((flags & 64) > 0) {
offset += 4; // WE_HAVE_AN_X_AND_Y_SCALE
- }
- else if ((flags & 128) > 0) {
+ } else if ((flags & 128) > 0) {
offset += 8; // WE_HAVE_A_TWO_BY_TWO
}
if ((flags & 32) > 0) {
moreComposites = true;
- }
- else {
+ } else {
moreComposites = false;
}
}
@@ -536,8 +533,7 @@
if ((flags & 32) > 0) {
moreComposites = true;
- }
- else {
+ } else {
moreComposites = false;
}
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java 2006-09-08 01:44:31 UTC (rev 7989)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java 2006-09-08 01:53:21 UTC (rev 7990)
@@ -185,19 +185,16 @@
return (Namespace)Class.forName(mappingClassName).newInstance();
} catch (final ClassNotFoundException e) {
throw new IllegalArgumentException("Could not find "
- + mappingClassName);
- }
- catch (final InstantiationException e) {
+ + mappingClassName);
+ } catch (final InstantiationException e) {
throw new IllegalArgumentException("Could not instantiate "
- + mappingClassName);
- }
- catch (final IllegalAccessException e) {
+ + mappingClassName);
+ } catch (final IllegalAccessException e) {
throw new IllegalArgumentException("Could not access "
- + mappingClassName);
- }
- catch (final ClassCastException e) {
+ + mappingClassName);
+ } catch (final ClassCastException e) {
throw new IllegalArgumentException(mappingClassName
- + " is not an ElementMapping");
+ + " is not an ElementMapping");
}
}
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/TIFFGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/TIFFGraphic.java 2006-09-08 01:44:31 UTC (rev 7989)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/TIFFGraphic.java 2006-09-08 01:53:21 UTC (rev 7990)
@@ -85,12 +85,10 @@
if (fld != null) {
if (fld.getAsInt(0) == 0) {
// All is fine
- }
- else if (fld.getAsInt(0) == 2) {
+ } else if (fld.getAsInt(0) == 2) {
this.colorSpace = ColorSpace.getInstance(
ColorSpace.CS_sRGB);
- }
- else {
+ } else {
throw new GraphicException("Error while loading image "
+ this.url.toString() + " : "
+ this.getClass() + " - "
Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java
===================================================================
--- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java 2006-09-08 01:44:31 UTC (rev 7989)
+++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java 2006-09-08 01:53:21 UTC (rev 7990)
@@ -185,8 +185,7 @@
hTree = (HyphenationTree)ois.readObject();
} catch (final Exception e) {
e.printStackTrace();
- }
- finally {
+ } finally {
if (ois != null) {
try {
ois.close();
@@ -222,8 +221,7 @@
hTree = (HyphenationTree)ois.readObject();
} catch (final Exception e) {
e.printStackTrace();
- }
- finally {
+ } finally {
if (ois != null) {
try {
ois.close();
Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java
===================================================================
--- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java 2006-09-08 01:44:31 UTC (rev 7989)
+++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java 2006-09-08 01:53:21 UTC (rev 7990)
@@ -528,8 +528,7 @@
ht = (HyphenationTree)ois.readObject();
} catch (final Exception e) {
e.printStackTrace();
- }
- finally {
+ } finally {
if (ois != null) {
try {
ois.close();
@@ -545,8 +544,7 @@
oos.writeObject(ht);
} catch (final Exception e) {
e.printStackTrace();
- }
- finally {
+ } finally {
if (oos != null) {
try {
oos.flush();
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFunction.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFunction.java 2006-09-08 01:44:31 UTC (rev 7989)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFunction.java 2006-09-08 01:53:21 UTC (rev 7990)
@@ -508,9 +508,8 @@
}
p.append("endobj" + EOL);
-
- } // end of if FunctionType 0
- else if (this.functionType == 2) {
+ // end of if FunctionType 0
+ } else if (this.functionType == 2) {
// DOMAIN
if (this.domain != null) {
p.append("/Domain [ ");
Modified: trunk/foray/foray-render/src/java/org/foray/render/Renderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2006-09-08 01:44:31 UTC (rev 7989)
+++ trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2006-09-08 01:53:21 UTC (rev 7990)
@@ -179,8 +179,7 @@
try {
imgW = backgroundImage.absoluteWidth(getPixelsPerInch());
imgH = backgroundImage.absoluteHeight(getPixelsPerInch());
- }
- catch (final GraphicException fie) {
+ } catch (final GraphicException fie) {
getLogger().error("Error obtaining bg image width and height");
getLogger().error(fie.getMessage());
return;
Modified: trunk/foray/foray-render/src/java/org/foray/render/pcl/PCLRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/pcl/PCLRenderer.java 2006-09-08 01:44:31 UTC (rev 7989)
+++ trunk/foray/foray-render/src/java/org/foray/render/pcl/PCLRenderer.java 2006-09-08 01:53:21 UTC (rev 7990)
@@ -331,8 +331,7 @@
if (lastcount >= 0) {
if (ib == lastbyte) {
lastcount++;
- }
- else {
+ } else {
ic[icwidth++] = (char)(lastcount & 0xFF);
ic[icwidth++] = (char)lastbyte;
lastbyte = ib;
Modified: trunk/foray/scripts/checkstyle-config.xml
===================================================================
--- trunk/foray/scripts/checkstyle-config.xml 2006-09-08 01:44:31 UTC (rev 7989)
+++ trunk/foray/scripts/checkstyle-config.xml 2006-09-08 01:53:21 UTC (rev 7990)
@@ -163,9 +163,7 @@
<module name="PackageDeclaration"/>
<module name="ParenPad"/>
<module name="RedundantThrows"/>
- <module name="RightCurly">
- <property name="severity" value="ignore"/>
- </module>
+ <module name="RightCurly"/>
<module name="TrailingComment">
<property name="severity" value="ignore"/>
</module>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-08 02:37:49
|
Revision: 7991
http://svn.sourceforge.net/foray/?rev=7991&view=rev
Author: victormote
Date: 2006-09-07 19:36:30 -0700 (Thu, 07 Sep 2006)
Log Message:
-----------
Style changes only.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java
trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java
trunk/foray/foray-common/src/java/org/foray/common/Environment.java
trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java
trunk/foray/foray-common/src/java/org/foray/common/RandomReaderArray.java
trunk/foray/foray-common/src/java/org/foray/common/XMLCharacter.java
trunk/foray/foray-font/src/java/org/foray/font/FOrayConsumerFont.java
trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java
trunk/foray/foray-font/src/java/org/foray/font/Subset.java
trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java
trunk/foray/foray-font/src/java/org/foray/font/format/Kerning.java
trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFilePFM.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFFileCollection.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableCMAP.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableKERN.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Region.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderSeparation.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ColumnWidth.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LineHeight.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Padding.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Pause.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TextDecoration.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnCeiling.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnFloor.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnMax.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnMin.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnRound.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/FOrayGraphicServer.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/GIFGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/JAIGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/JPEGGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/PNGGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/factory/BMPFactory.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/factory/GIFFactory.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/factory/JPEGFactory.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/factory/PNGFactory.java
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/TernaryTree.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFColor.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFunction.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFICCStream.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFPathPaint.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFPattern.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFResources.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFString.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXPostScript.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractFlowPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjMixedPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemBodyPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RowSpanMgr.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/StaticContentPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/Status.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java
trunk/foray/foray-pretty/src/java/org/foray/pretty/FOrayXDiff.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSReal.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSSystemDict.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/CMap04Entry.java
trunk/foray/foray-ps/src/java/org/foray/ps/filter/ASCIIHexFilter.java
trunk/foray/foray-render/src/java/org/foray/render/pcl/PCLRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/ps/ASCII85OutputStream.java
trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java
trunk/foray/scripts/checkstyle-config.xml
Modified: trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -354,8 +354,8 @@
SessionConfig.PRECEDENCE_COMMAND_LINE)) {
return true;
}
- return (this.rendererOptions.parseOption(key, value,
- OutputConfig.PRECEDENCE_COMMAND_LINE));
+ return this.rendererOptions.parseOption(key, value,
+ OutputConfig.PRECEDENCE_COMMAND_LINE);
}
private void setOutputMode(final int mode) throws FOrayException {
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -84,7 +84,7 @@
}
public boolean generatedByExists() {
- return (generatedBy != null);
+ return generatedBy != null;
}
public String generatedByName() {
@@ -345,8 +345,8 @@
int x = prOriginX();
if (this.getBPAxis() == Constants.AXIS_VERTICAL) {
// Our BP Axis is vertical
- final boolean goingRight = (this.traitIPDirectionOdd()
- == Constants.DIRECTION_LEFT_TO_RIGHT);
+ final boolean goingRight = this.traitIPDirectionOdd()
+ == Constants.DIRECTION_LEFT_TO_RIGHT;
if (goingRight) {
x -= this.traitBorderStartWidth();
} else {
@@ -354,8 +354,8 @@
}
} else {
// Our BP Axis is horizontal
- final boolean goingRight = (this.traitBPDirection()
- == Constants.DIRECTION_LEFT_TO_RIGHT);
+ final boolean goingRight = this.traitBPDirection()
+ == Constants.DIRECTION_LEFT_TO_RIGHT;
if (goingRight) {
x -= this.traitBorderBeforeWidth();
} else {
@@ -375,8 +375,8 @@
int y = prOriginY();
if (this.getBPAxis() == Constants.AXIS_VERTICAL) {
// Our BP Axis is vertical
- final boolean goingDown = (this.traitBPDirection()
- == Constants.DIRECTION_TOP_TO_BOTTOM);
+ final boolean goingDown = this.traitBPDirection()
+ == Constants.DIRECTION_TOP_TO_BOTTOM;
if (goingDown) {
y += this.traitBorderBeforeWidth();
} else {
@@ -384,8 +384,8 @@
}
} else {
// Our BP Axis is horizontal
- final boolean goingUp = (this.traitIPDirectionOdd()
- == Constants.DIRECTION_BOTTOM_TO_TOP);
+ final boolean goingUp = this.traitIPDirectionOdd()
+ == Constants.DIRECTION_BOTTOM_TO_TOP;
if (goingUp) {
y -= this.traitBorderStartWidth();
} else {
@@ -445,8 +445,8 @@
int x = crOriginX();
if (this.getBPAxis() == Constants.AXIS_VERTICAL) {
// Our BP Axis is vertical
- final boolean goingRight = (this.traitIPDirectionOdd()
- == Constants.DIRECTION_LEFT_TO_RIGHT);
+ final boolean goingRight = this.traitIPDirectionOdd()
+ == Constants.DIRECTION_LEFT_TO_RIGHT;
if (goingRight) {
x -= this.traitPaddingStart();
} else {
@@ -454,8 +454,8 @@
}
} else {
// Our BP Axis is horizontal
- final boolean goingRight = (this.traitBPDirection()
- == Constants.DIRECTION_LEFT_TO_RIGHT);
+ final boolean goingRight = this.traitBPDirection()
+ == Constants.DIRECTION_LEFT_TO_RIGHT;
if (goingRight) {
x -= this.traitPaddingBefore();
} else {
@@ -474,8 +474,8 @@
// Start at the content-rectangle origin.
int y = crOriginY();
if (this.getBPAxis() == Constants.AXIS_VERTICAL) {
- final boolean goingDown = (this.traitBPDirection()
- == Constants.DIRECTION_TOP_TO_BOTTOM);
+ final boolean goingDown = this.traitBPDirection()
+ == Constants.DIRECTION_TOP_TO_BOTTOM;
if (goingDown) {
y += this.traitPaddingBefore();
} else {
@@ -483,8 +483,8 @@
}
} else {
// Our BP Axis is horizontal
- final boolean goingRight = (this.traitBPDirection()
- == Constants.DIRECTION_LEFT_TO_RIGHT);
+ final boolean goingRight = this.traitBPDirection()
+ == Constants.DIRECTION_LEFT_TO_RIGHT;
if (goingRight) {
y -= this.traitPaddingBefore();
} else {
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -115,7 +115,7 @@
* @return AreaContainer The next column area
*/
public NormalFlowRA addSpanArea(final int numColumns) {
- final SpanRA spanArea = new SpanRA(((RegionBody) traitGeneratedBy()),
+ final SpanRA spanArea = new SpanRA((RegionBody) traitGeneratedBy(),
this, numColumns);
this.isNewSpanArea = true;
return spanArea.getCurrentColumnArea();
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -175,7 +175,7 @@
*/
public int crOriginIPDOffset() {
// Add the extent of the region-start.
- final PageRA page = ((PageRA) getParentArea());
+ final PageRA page = (PageRA) getParentArea();
if (page.getRegionStart() == null) {
return 0;
}
@@ -187,7 +187,7 @@
*/
public int crOriginBPDOffset() {
// Add the extent of the region-before.
- final PageRA page = ((PageRA) getParentArea());
+ final PageRA page = (PageRA) getParentArea();
if (page.getRegionBefore() == null) {
return 0;
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -121,7 +121,7 @@
}
public boolean isLastColumn() {
- return (currentColumn == traitColumnCount());
+ return currentColumn == traitColumnCount();
}
public Area getOverflowArea(final Area childRequesting)
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -179,7 +179,7 @@
int minIPD;
int maxIPD;
- final boolean bHasProportionalUnits = (totalTableUnits > 0.0);
+ final boolean bHasProportionalUnits = totalTableUnits > 0.0;
if (node.traitIPDimensionMax(this, maxAllocationIPD) >= 0) {
maxIPD = node.traitIPDimensionMax(this, maxAllocationIPD);
} else {
@@ -266,8 +266,8 @@
int colWidth = -1;
if (column.traitColumnWidthTableUnits() > 0) {
//Proportional width
- colWidth = ((int)(column.traitColumnWidthTableUnits()
- * dUnitLength));
+ colWidth = (int) (column.traitColumnWidthTableUnits()
+ * dUnitLength);
} else {
//Fixed width
colWidth = column.traitColumnWidth(this, tableWidth);
Modified: trunk/foray/foray-common/src/java/org/foray/common/Environment.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/Environment.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-common/src/java/org/foray/common/Environment.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -63,7 +63,7 @@
} catch (final InternalError e1) {
return false;
}
- return (ge != null);
+ return ge != null;
}
/**
Modified: trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -269,7 +269,7 @@
final int byte2 = readUnsignedByte();
final int byte3 = readUnsignedByte();
final int byte4 = readUnsignedByte();
- return ((byte4 << 24) + (byte3 << 16) + (byte2 << 8) + (byte1 << 0));
+ return (byte4 << 24) + (byte3 << 16) + (byte2 << 8) + (byte1 << 0);
}
@@ -282,7 +282,7 @@
public int readUnsignedShortLoHi() throws IOException {
final int byte1 = readUnsignedByte();
final int byte2 = readUnsignedByte();
- return ((byte2 << 8) + (byte1 << 0));
+ return (byte2 << 8) + (byte1 << 0);
}
/**
@@ -294,7 +294,7 @@
public int readShortLoHi() throws IOException {
final int byte1 = readByte();
final int byte2 = readByte();
- return ((byte2 << 8) + (byte1 << 0));
+ return (byte2 << 8) + (byte1 << 0);
}
/**
Modified: trunk/foray/foray-common/src/java/org/foray/common/RandomReaderArray.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/RandomReaderArray.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-common/src/java/org/foray/common/RandomReaderArray.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -130,7 +130,7 @@
*/
public final boolean readBoolean() throws IOException {
final int ch = readUnsignedByte();
- return (ch != 0);
+ return ch != 0;
}
/**
@@ -195,7 +195,7 @@
final int byte2 = this.readUnsignedByte();
final int byte3 = this.readUnsignedByte();
final int byte4 = this.readUnsignedByte();
- return ((byte1 << 24) + (byte2 << 16) + (byte3 << 8) + (byte4 << 0));
+ return (byte1 << 24) + (byte2 << 16) + (byte3 << 8) + (byte4 << 0);
}
/**
Modified: trunk/foray/foray-common/src/java/org/foray/common/XMLCharacter.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/XMLCharacter.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-common/src/java/org/foray/common/XMLCharacter.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -603,7 +603,7 @@
final String expanded = XMLCharacter.expandEntityReference(c);
buffer.replace(i, i + 1, expanded);
/* Advance the counter past the replaced text. */
- i += (expanded.length() - 1);
+ i += expanded.length() - 1;
}
}
return buffer.toString().toCharArray();
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayConsumerFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayConsumerFont.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayConsumerFont.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -100,7 +100,7 @@
}
public boolean subSetting() {
- return (this.subset != null);
+ return this.subset != null;
}
public Log getLogger() {
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -489,7 +489,7 @@
}
if (fontFamilyAliases.containsKey(alias)) {
final RegisteredFontFamily family =
- ((RegisteredFontFamily)fontFamilyAliases.get(alias));
+ (RegisteredFontFamily) fontFamilyAliases.get(alias);
throw new FontException("Alias " + alias
+ " already registered to family " + family.getName());
}
@@ -689,7 +689,7 @@
*/
public boolean isRegisteredFontFamily(final String name) {
final RegisteredFontFamily rff = this.getRegisteredFontFamily(name);
- return (rff != null);
+ return rff != null;
}
/**
@@ -803,7 +803,7 @@
*/
public boolean isRegisteredFont(final String fontID) {
final Object object = this.registeredFonts.get(fontID);
- return (object != null);
+ return object != null;
}
/**
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -224,7 +224,7 @@
}
/* Can my encoding encode it? */
final int encodedChar = this.encoding.encodeCharacter(codePoint);
- return (encodedChar != 0);
+ return encodedChar != 0;
}
/**
@@ -383,7 +383,7 @@
}
public boolean subSetting() {
- return (this.getSubset() != null);
+ return this.getSubset() != null;
}
/**
Modified: trunk/foray/foray-font/src/java/org/foray/font/Subset.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/Subset.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-font/src/java/org/foray/font/Subset.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -274,7 +274,7 @@
final int index = StringUtil.indexOfSortedCharArray(
this.originalByOriginal, (char) originalGlyphIndex, 0,
this.numGlyphsUsed() - 1);
- return (index > -1);
+ return index > -1;
}
public Log getLogger() {
Modified: trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -101,7 +101,7 @@
*/
public int getDescender(final int fontSize) {
final FontMetrics fm = getSizedFont(fontSize);
- return (-1 * SystemFont.MILLIPOINT_CONVERSION_FACTOR * fm.getDescent());
+ return -1 * SystemFont.MILLIPOINT_CONVERSION_FACTOR * fm.getDescent();
}
/**
@@ -377,7 +377,7 @@
* If so, returns it.
* If not, creates and caches new one with the new size.
*/
- final float s = (fontSize / 1000f);
+ final float s = fontSize / 1000f;
/* Get local copies to make sure thread-safe. */
final FontMetrics lastFontMetrics = this.lastMetrics;
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/Kerning.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/Kerning.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/Kerning.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -196,7 +196,7 @@
}
public boolean isEmpty() {
- return (lastIndex < 0);
+ return lastIndex < 0;
}
private void sortKerning() {
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFilePFM.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFilePFM.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFilePFM.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -306,7 +306,7 @@
}
public boolean getIsProportional() {
- return ((dfPitchAndFamily & 1) == 1);
+ return (dfPitchAndFamily & 1) == 1;
}
/**
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/TTFFileCollection.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/TTFFileCollection.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/TTFFileCollection.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -54,7 +54,7 @@
protected void readFile() throws IOException {
this.ttcHeader = new TTCTableHeader(this);
this.tableDirectories = new TTFTableDirectory[ttcHeader.numDirectories];
- for (int i = 0; (i < ttcHeader.numDirectories); i++) {
+ for (int i = 0; i < ttcHeader.numDirectories; i++) {
final TTFTableDirectory tableDir = new TTFTableDirectory(this,
ttcHeader.dirOffsets[i]);
tableDirectories[i] = tableDir;
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -275,7 +275,7 @@
final int glyphLength = computeGlyphLength(origGlyphIndex);
writeULong(byteArray, i * 4, endOffset);
if ((endOffset + glyphLength) > endOffset) {
- endOffset = (endOffset + glyphLength);
+ endOffset = endOffset + glyphLength;
}
}
// Write the "extra" entry
@@ -590,7 +590,7 @@
final long position = glyfTableDirEntry.getOffset()
+ glyphOffset;
in.seek(position);
- final boolean glyphIsComposite = (in.readShort() < 0);
+ final boolean glyphIsComposite = in.readShort() < 0;
/* Return to the original location. */
in.seek(cp);
if (glyphIsComposite
@@ -735,7 +735,7 @@
i++;
}
- return (i - 1);
+ return i - 1;
}
private long getCheckSum(final byte[] byteArray, final int start,
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableCMAP.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableCMAP.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableCMAP.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -183,7 +183,7 @@
= glyphIdArrayOffset
+ ((rangeOffset[i] / 2)
+ (j - startCount[i])
- + (i) - segCountX2 / 2)
+ + i - segCountX2 / 2)
* 2;
getReader().seek(glyphOffset);
final char glyphIndex =
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableKERN.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableKERN.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableKERN.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -97,15 +97,15 @@
}
private boolean isHorizontal(final short coverage) {
- return ((coverage & 0x0001) == 0x0001);
+ return (coverage & 0x0001) == 0x0001;
}
private boolean hasMinimums(final short coverage) {
- return ((coverage & 0x0002) == 0x0002);
+ return (coverage & 0x0002) == 0x0002;
}
private boolean isCrossStream(final short coverage) {
- return ((coverage & 0x0004) == 0x0004);
+ return (coverage & 0x0004) == 0x0004;
}
private short subtableFormat(final short coverage) {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -590,8 +590,8 @@
public boolean inlineWrapOption(final FOContext context) {
final FObj effectiveParent = effectiveParent(context);
- return (effectiveParent.traitWrapOption(context)
- == Constants.FOVAL_WRAP);
+ return effectiveParent.traitWrapOption(context)
+ == Constants.FOVAL_WRAP;
}
public boolean inlineHyphenate() {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -242,7 +242,7 @@
}
public boolean hasData() {
- return (rootFObj != null);
+ return rootFObj != null;
}
public Log getLogger() {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -171,7 +171,7 @@
*/
protected boolean regionNameExists(final String regionName) {
final String regionClass = (String) this.regionMap.get(regionName);
- return (regionClass != null);
+ return regionClass != null;
}
public Namespace getNamespace() {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-08 01:53:21 UTC (rev 7990)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-08 02:36:30 UTC (rev 7991)
@@ -70,9 +70,9 @@
return null;
}
this.lastDocumentPageNumber ++;
+ final boolean lastPageOdd = (this.lastDocumentPageNumber % 2) == 1;
final org.foray.fotree.fo.obj.SimplePageMaster spm =
- getNextSimplePageMaster(
- ((this.lastDocumentPageNumber % 2) == 1), isBlank, psm);
+ getNextSimp...
[truncated message content] |
|
From: <vic...@us...> - 2006-09-08 02:56:08
|
Revision: 7994
http://svn.sourceforge.net/foray/?rev=7994&view=rev
Author: victormote
Date: 2006-09-07 19:55:52 -0700 (Thu, 07 Sep 2006)
Log Message:
-----------
Style changes only.
Modified Paths:
--------------
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractFlowPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemBodyPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemLabelPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/StaticContentPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableRowPL.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSReal.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSSystemDict.java
trunk/foray/foray-ps/src/java/org/foray/ps/filter/ASCII85Filter.java
trunk/foray/foray-ps/src/java/org/foray/ps/java2d/Java2DSystemDict.java
trunk/foray/foray-ps/src/java/org/foray/ps/java2d/demo/DemoPanel.java
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractFlowPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractFlowPL.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractFlowPL.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -98,7 +98,7 @@
}
// flow is *always* laid out into a BodyAreaContainer
- final RegionRABody bac = (RegionRABody)area;
+ final RegionRABody bac = (RegionRABody) area;
boolean prevChildMustKeepWithNext = false;
final int numChildren = getFO().getChildren().size();
@@ -156,7 +156,7 @@
return getStatus();
}
// I don't much like exposing this. (AHS 001217)
- final NormalFlowRA column = (NormalFlowRA)currentArea;
+ final NormalFlowRA column = (NormalFlowRA) currentArea;
// Cast verified at construction.
final SpanRA span = (SpanRA) column.getWritableParent();
span.setCurrentColumn(span.getCurrentColumn() + 1);
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -67,22 +67,22 @@
}
public void setYPosition(final int value) {
- ((GenericContainer)areaContainerRef.get()).setYPosition(value);
+ ((GenericContainer) areaContainerRef.get()).setYPosition(value);
}
public int getYPosition() {
- return ((GenericContainer)areaContainerRef.get()).getYPosition();
+ return ((GenericContainer) areaContainerRef.get()).getYPosition();
}
public int getHeight(final FOContext context) {
- return ((GenericContainer)areaContainerRef.get()).crBPD()
+ return ((GenericContainer) areaContainerRef.get()).crBPD()
+ getReal().traitSpaceBeforeOptimum(context)
+ getReal().traitSpaceAfterOptimum(context);
}
public void removeLayout(final Area area) {
if (areaContainerRef != null) {
- area.removeChild((GenericContainer)areaContainerRef.get());
+ area.removeChild((GenericContainer) areaContainerRef.get());
}
if (getReal().traitSpaceBeforeOptimum(area) != 0) {
area.incrementProgressionDimension(-getReal()
@@ -107,7 +107,7 @@
// The area will be the first non-space child in its parent
// Note: it's not added yet!
if (parent instanceof BlockContainerRA &&
- ((BlockContainerRA)parent).traitAbsolutePosition()
+ ((BlockContainerRA) parent).traitAbsolutePosition()
== Constants.FOVAL_ABSOLUTE) {
return true;
}
@@ -187,7 +187,7 @@
throw new AreaWException("Currently only Table Rows are "
+ "supported in table body, header and footer");
}
- final TableRow row = (TableRow)child;
+ final TableRow row = (TableRow) child;
final TableRowPL rowPL = (TableRowPL) getLayoutProxy(row);
rowPL.setRowSpanMgr(rowSpanMgr);
@@ -244,7 +244,7 @@
// FIXME!!! Handle rows spans!!!
removeTableRowLayout(row, areaContainer);
for (int j = 0; j < keepWith.size(); j++) {
- final TableRow tr = (TableRow)keepWith.get(j);
+ final TableRow tr = (TableRow) keepWith.get(j);
removeTableRowLayout(tr, areaContainer);
i--;
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -69,7 +69,7 @@
if (tableArea != null && tableArea.getPreviousSibling() != null) {
final int numChildren = label.getChildren().size();
for (int i = getProgress(); i < numChildren; i++) {
- final FONode fo = (FONode)label.getChildren().get(i);
+ final FONode fo = (FONode) label.getChildren().get(i);
int status;
if (Status.isIncomplete(status
= getLayoutProxy(fo).layout(area, retrieveMarker))) {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -100,7 +100,7 @@
* @param snapshot the ArrayList of saved progress indicators (Integers)
*/
public void rollback(final ArrayList snapshot) {
- this.progress = ((Integer)snapshot.get(0)).intValue();
+ this.progress = ((Integer) snapshot.get(0)).intValue();
snapshot.remove(0);
if (this.progress == START) {
resetProgress();
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -80,7 +80,7 @@
return;
}
for (int i = this.progress + 1; i < children.size(); i++) {
- final FONode fo = (FONode)children.get(i);
+ final FONode fo = (FONode) children.get(i);
getLayoutProxy(fo).resetProgress();
}
final FONode node = (FONode) children.get(this.progress);
@@ -99,7 +99,7 @@
start = 0;
}
for (int i = start; i < node.childrenFO().size(); i++) {
- final FONode fo = (FONode)node.childrenFO().get(i);
+ final FONode fo = (FONode) node.childrenFO().get(i);
final FONodePL nodePL = this.getLayoutProxy(fo);
final int status = nodePL.layout(area, retrieveMarker);
if (Status.isIncomplete(status)) {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListBlockPL.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -66,7 +66,7 @@
final int numChildren = node.childrenFO().size();
for (int i = listBlockPL.getProgress(); i < numChildren; i++) {
- final ListItem listItem = (ListItem)node.childrenFO().get(i);
+ final ListItem listItem = (ListItem) node.childrenFO().get(i);
final ListItemPL listItemPL = (ListItemPL) getLayoutProxy(
listItem);
int status = listItemPL.layout(blockArea, retrieveMarker);
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemBodyPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemBodyPL.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemBodyPL.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -65,7 +65,7 @@
final int numChildren = node.childrenFO().size();
for (int i = getProgress(); i < numChildren; i++) {
- final FObj fo = (FObj)node.childrenFO().get(i);
+ final FObj fo = (FObj) node.childrenFO().get(i);
final int status = getLayoutProxy(fo).layout(area, retrieveMarker);
if (Status.isIncomplete(status)) {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemLabelPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemLabelPL.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemLabelPL.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -59,7 +59,7 @@
+ "list-item-label must have exactly one block.");
}
- final Block block = (Block)node.childrenFO().get(0);
+ final Block block = (Block) node.childrenFO().get(0);
/*
* For calculating the lineage - The fo:list-item-label formatting
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemPL.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemPL.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -70,7 +70,7 @@
retrieveMarker);
/* Now lay out the list-item-label inside the new block-area. */
- final ListItemLabel label = (ListItemLabel)node.childrenFO().get(0);
+ final ListItemLabel label = (ListItemLabel) node.childrenFO().get(0);
int status;
// what follows doesn't yet take into account whether the
// body failed completely or only got some text in
@@ -84,7 +84,7 @@
}
/* Now create a BlockArea to contain the list-item-body. */
- final ListItemBody body = (ListItemBody)node.childrenFO().get(1);
+ final ListItemBody body = (ListItemBody) node.childrenFO().get(1);
final ListItemBodyPL bodyPL = (ListItemBodyPL) getLayoutProxy(body);
status = bodyPL.layout(group, retrieveMarker);
if (Status.isIncomplete(status)) {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -241,7 +241,7 @@
return Status.OK;
}
}
- final NormalFlowRA colArea = (NormalFlowRA)area;
+ final NormalFlowRA colArea = (NormalFlowRA) area;
switch (node.traitBreakBefore(area)) {
case Constants.FOVAL_PAGE: {
// if first ColumnArea, and empty, return OK
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/StaticContentPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/StaticContentPL.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/StaticContentPL.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -50,7 +50,7 @@
final int numChildren = node.childrenFO().size();
for (int i = 0; i < numChildren; i++) {
- final FObj fo = (FObj)node.childrenFO().get(i);
+ final FObj fo = (FObj) node.childrenFO().get(i);
int status = getLayoutProxy(fo).layout(area, retrieveMarker);
if (Status.isIncomplete(status)) {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -113,7 +113,7 @@
final int numChildren = node.childrenFO().size();
for (int i = getProgress(); bDone == false && i < numChildren; i++) {
- final FObj fo = (FObj)node.childrenFO().get(i);
+ final FObj fo = (FObj) node.childrenFO().get(i);
// Overflows may cause a row to be re-layedout,
// need to pass already processed content.
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -103,7 +103,7 @@
}
for (int i = getProgress(); i < node.childrenFO().size(); i++) {
- final FONode fo = (FONode)node.childrenFO().get(i);
+ final FONode fo = (FONode) node.childrenFO().get(i);
if (fo instanceof Marker) {
final MarkerPL markerPL = (MarkerPL) getLayoutProxy(fo);
markerPL.layout(area, retrieveMarker);
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableRowPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableRowPL.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableRowPL.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -80,7 +80,7 @@
// If off the end, the rest of the cells had better be
// explicitly positioned!!! (returns -1)
- final TableCell cell = (TableCell)getReal().getChildren().get(i);
+ final TableCell cell = (TableCell) getReal().getChildren().get(i);
int numCols = cell.traitNumberColumnsSpanned();
int cellColNum = cell.traitColumnNumber(context);
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSReal.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSReal.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSReal.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -165,9 +165,9 @@
final double trouble = doubleDown % 1;
if (trouble > 0.950) {
- p.append((int)doubleDown + 1);
+ p.append((int) doubleDown + 1);
} else if (trouble < 0.050) {
- p.append((int)doubleDown);
+ p.append((int) doubleDown);
} else {
final String doubleString = Double.toString(doubleDown);
final int decimal = doubleString.indexOf(".");
@@ -196,9 +196,9 @@
final double trouble = doubleDown % 1;
if (trouble > (1.0 - (5.0 / (Math.pow(10.0, dec))))) {
- p.append((int)doubleDown + 1);
+ p.append((int) doubleDown + 1);
} else if (trouble < (5.0 / (Math.pow(10.0, dec)))) {
- p.append((int)doubleDown);
+ p.append((int) doubleDown);
} else {
final String doubleString = Double.toString(doubleDown);
final int decimal = doubleString.indexOf(".");
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSSystemDict.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSSystemDict.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSSystemDict.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -764,9 +764,9 @@
protected double popDouble(final int operation) throws PSException {
final PSNumber psn = popPSNumber(operation);
if (psn instanceof PSInteger) {
- return ((PSInteger)psn).getValue();
+ return ((PSInteger) psn).getValue();
} else if (psn instanceof PSReal) {
- return ((PSReal)psn).getValue();
+ return ((PSReal) psn).getValue();
}
return 0;
}
@@ -1336,7 +1336,7 @@
throw new PSException(interpreter, PSErrorDict.RANGECHECK,
PSOperator.OPER_GET);
}
- pushOperand((PSObject)array.value[index]);
+ pushOperand((PSObject) array.value[index]);
}
protected void getDictionary(final PSDictionary dict, final PSObject where)
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/filter/ASCII85Filter.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/filter/ASCII85Filter.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/filter/ASCII85Filter.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -98,7 +98,7 @@
if (val == 0) {
conv = new byte[5];
for (int j = 0; j < 5; j++) {
- conv[j] = (byte)'!';
+ conv[j] = (byte) '!';
}
}
buffer.write(conv, 0, n + 1);
@@ -124,18 +124,18 @@
word = -word;
}
if (word == 0) {
- final byte[] result = { (byte)ASCII85_ZERO };
+ final byte[] result = { (byte) ASCII85_ZERO };
return result;
}
- final byte c5 = (byte)((word % BASE_85_4) + ASCII85_START);
+ final byte c5 = (byte) ((word % BASE_85_4) + ASCII85_START);
word = word / BASE_85_4;
- final byte c4 = (byte)((word % BASE_85_4) + ASCII85_START);
+ final byte c4 = (byte) ((word % BASE_85_4) + ASCII85_START);
word = word / BASE_85_4;
- final byte c3 = (byte)((word % BASE_85_4) + ASCII85_START);
+ final byte c3 = (byte) ((word % BASE_85_4) + ASCII85_START);
word = word / BASE_85_4;
- final byte c2 = (byte)((word % BASE_85_4) + ASCII85_START);
+ final byte c2 = (byte) ((word % BASE_85_4) + ASCII85_START);
word = word / BASE_85_4;
- final byte c1 = (byte)((word % BASE_85_4) + ASCII85_START);
+ final byte c1 = (byte) ((word % BASE_85_4) + ASCII85_START);
final byte[] ret = { c1 , c2, c3, c4, c5 };
for (int i = 0; i < ret.length; i++) {
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/java2d/Java2DSystemDict.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/java2d/Java2DSystemDict.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/java2d/Java2DSystemDict.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -106,22 +106,22 @@
final double y = popDouble(PSOperator.OPER_MOVETO);
final double x = popDouble(PSOperator.OPER_MOVETO);
//interpreter.logger.debug(x + " " + y + " moveto");
- currentPath.moveTo((float)x, (float)y);
+ currentPath.moveTo((float) x, (float) y);
}
public void rmoveto() throws PSException {
- final double dy = (float)popDouble(PSOperator.OPER_RMOVETO);
- final double dx = (float)popDouble(PSOperator.OPER_RMOVETO);
+ final double dy = (float) popDouble(PSOperator.OPER_RMOVETO);
+ final double dx = (float) popDouble(PSOperator.OPER_RMOVETO);
//interpreter.logger.debug(dx + " " + dy + " rmoveto");
final Point2D pt = currentPath.getCurrentPoint();
- currentPath.moveTo((float)(pt.getX() + dx), (float)(pt.getY() + dy));
+ currentPath.moveTo((float) (pt.getX() + dx), (float) (pt.getY() + dy));
}
public void lineto() throws PSException {
final double y = popDouble(PSOperator.OPER_LINETO);
final double x = popDouble(PSOperator.OPER_LINETO);
//interpreter.logger.debug(x + " " + y + " loveto");
- currentPath.lineTo((float)x, (float)y);
+ currentPath.lineTo((float) x, (float) y);
}
public void rlineto() throws PSException {
@@ -129,7 +129,7 @@
final double dx = popDouble(PSOperator.OPER_RLINETO);
//interpreter.logger.debug(dx + " " + dy + " rlineto");
final Point2D pt = currentPath.getCurrentPoint();
- currentPath.lineTo((float)(pt.getX() + dx), (float)(pt.getY() + dy));
+ currentPath.lineTo((float) (pt.getX() + dx), (float) (pt.getY() + dy));
}
public void newpath() {
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/java2d/demo/DemoPanel.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/java2d/demo/DemoPanel.java 2006-09-08 02:49:27 UTC (rev 7993)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/java2d/demo/DemoPanel.java 2006-09-08 02:55:52 UTC (rev 7994)
@@ -70,15 +70,15 @@
getHeight() - 60);
paintBarcode(graphics, rect);
graphics.setColor(Color.blue);
- graphics.drawRect((int)rect.getX(), (int)rect.getY(),
- (int)rect.getWidth(), (int)rect.getHeight());
+ graphics.drawRect((int) rect.getX(), (int) rect.getY(),
+ (int) rect.getWidth(), (int) rect.getHeight());
}
protected void paintBarcode(final Graphics graphics, final Rectangle rect) {
//System.out.println("printBarcode: " + rect);
final Dimension dim = rect.getSize();
- final Graphics2D g2d = (Graphics2D)graphics;
+ final Graphics2D g2d = (Graphics2D) graphics;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
g2d.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-08 03:30:38
|
Revision: 8001
http://svn.sourceforge.net/foray/?rev=8001&view=rev
Author: victormote
Date: 2006-09-07 20:30:12 -0700 (Thu, 07 Sep 2006)
Log Message:
-----------
Style changes only.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
trunk/foray/foray-app/src/java/org/foray/app/Options.java
trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java
trunk/foray/foray-app/src/java/org/foray/app/ant/RunTest.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/model/ProjectTeamXMLReader.java
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java
trunk/foray/foray-common/src/java/org/foray/common/ClassService.java
trunk/foray/foray-common/src/java/org/foray/common/Configuration.java
trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java
trunk/foray/foray-common/src/java/org/foray/common/RandomReaderArray.java
trunk/foray/foray-common/src/java/org/foray/common/sax/DocumentReader.java
trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java
trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java
trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java
trunk/foray/scripts/checkstyle-config.xml
Modified: trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -125,7 +125,7 @@
} catch (final Exception e) {
frame.reportException(e);
if (e instanceof FOrayException) {
- throw (FOrayException)e;
+ throw (FOrayException) e;
}
throw new FOrayException(e);
}
Modified: trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -465,7 +465,7 @@
getRendererOptions(), this);
} catch (final Exception e) {
if (e instanceof FOrayException) {
- throw (FOrayException)e;
+ throw (FOrayException) e;
}
throw new FOrayException("AWTStarter could not be loaded.", e);
}
@@ -476,7 +476,7 @@
getRendererOptions(), this);
} catch (final Exception e) {
if (e instanceof FOrayException) {
- throw (FOrayException)e;
+ throw (FOrayException) e;
}
throw new FOrayException("PrintStarter could not be loaded.",
e);
Modified: trunk/foray/foray-app/src/java/org/foray/app/Options.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/Options.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-app/src/java/org/foray/app/Options.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -131,8 +131,8 @@
}
if (e instanceof SAXException) {
e.printStackTrace();
- if (((SAXException)e).getException() != null) {
- ((SAXException)e).getException().printStackTrace();
+ if (((SAXException) e).getException() != null) {
+ ((SAXException) e).getException().printStackTrace();
}
} else {
e.printStackTrace();
Modified: trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -77,7 +77,7 @@
session.process();
} catch (final Exception e) {
if (e instanceof FOrayException) {
- throw (FOrayException)e;
+ throw (FOrayException) e;
}
throw new FOrayException(e);
}
Modified: trunk/foray/foray-app/src/java/org/foray/app/ant/RunTest.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/ant/RunTest.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-app/src/java/org/foray/app/ant/RunTest.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -105,7 +105,7 @@
for (final Iterator keys = diff.keySet().iterator();
keys.hasNext(); ) {
final Object fname = keys.next();
- final Boolean pass = (Boolean)diff.get(fname);
+ final Boolean pass = (Boolean) diff.get(fname);
logger.info("file: " + fname
+ " - reference success: " + pass);
if (pass.booleanValue()) {
@@ -203,7 +203,7 @@
meth = cla.getMethod("runTests", new Class[] {
String.class, String.class, String.class
});
- diff = (HashMap)meth.invoke(tc, new Object[] {
+ diff = (HashMap) meth.invoke(tc, new Object[] {
testsuite, dest, compDir
});
} catch (final Exception e) {
Modified: trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -145,7 +145,7 @@
} catch (final Exception e) {
frame.reportException(e);
if (e instanceof FOrayException) {
- throw (FOrayException)e;
+ throw (FOrayException) e;
}
throw new FOrayException(e);
}
Modified: trunk/foray/foray-app/src/java/org/foray/demo/embed/model/ProjectTeamXMLReader.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/demo/embed/model/ProjectTeamXMLReader.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-app/src/java/org/foray/demo/embed/model/ProjectTeamXMLReader.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -48,7 +48,7 @@
public void parse(final InputSource input) throws IOException,
SAXException {
if (input instanceof ProjectTeamInputSource) {
- parse(((ProjectTeamInputSource)input).getProjectTeam());
+ parse(((ProjectTeamInputSource) input).getProjectTeam());
} else {
throw new SAXException("Unsupported InputSource specified. Must "
+ "be a ProjectTeamInputSource");
@@ -100,7 +100,7 @@
this.getHandler().element("projectname", projectTeam.getProjectName());
final Iterator i = projectTeam.getMembers().iterator();
while (i.hasNext()) {
- final ProjectMember member = (ProjectMember)i.next();
+ final ProjectMember member = (ProjectMember) i.next();
generateFor(member);
}
this.getHandler().endElement("projectteam");
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -80,7 +80,7 @@
while (areaNode != null && !(areaNode instanceof BlockContainerRA)) {
areaNode = areaNode.getAreaNodeParent();
}
- return (BlockContainerRA)areaNode;
+ return (BlockContainerRA) areaNode;
}
public boolean generatedByExists() {
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -109,7 +109,7 @@
for (int i = 0; i < children.size(); i++) {
final Object o = children.get(i);
if (o instanceof PageNumberCitationArea) {
- final PageNumberCitationArea pia = (PageNumberCitationArea)o;
+ final PageNumberCitationArea pia = (PageNumberCitationArea) o;
pia.resolve();
}
}
@@ -422,7 +422,7 @@
for (int i = 0; i < children.size(); i++) {
final Object o = children.get(i);
if (o instanceof AbstractInlineArea) {
- final AbstractInlineArea ia = (AbstractInlineArea)o;
+ final AbstractInlineArea ia = (AbstractInlineArea) o;
if (ia.crBPD() > maxHeight) {
maxHeight = ia.crBPD();
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -68,9 +68,9 @@
int span = Constants.FOVAL_NONE;
if (fo instanceof Block) {
- span = ((Block)fo).traitSpan(this);
+ span = ((Block) fo).traitSpan(this);
} else if (fo instanceof BlockContainer) {
- span = ((BlockContainer)fo).traitSpan(this);
+ span = ((BlockContainer) fo).traitSpan(this);
}
if (this.getChildren().isEmpty()) {
@@ -133,7 +133,7 @@
}
final List spanAreas = this.getChildren();
- final SpanRA spanArea = (SpanRA)spanAreas.get(spanAreas.size()
+ final SpanRA spanArea = (SpanRA) spanAreas.get(spanAreas.size()
- 1);
if (spanArea.isBalanced()) {
@@ -142,9 +142,9 @@
int span = Constants.FOVAL_NONE;
if (fo instanceof Block) {
- span = ((Block)fo).traitSpan(this);
+ span = ((Block) fo).traitSpan(this);
} else if (fo instanceof BlockContainer) {
- span = ((BlockContainer)fo).traitSpan(this);
+ span = ((BlockContainer) fo).traitSpan(this);
}
if ((span == Constants.FOVAL_ALL)
@@ -172,7 +172,7 @@
*/
public void resetSpanArea() {
final List spanAreas = this.getChildren();
- final SpanRA spanArea = (SpanRA)spanAreas.get(spanAreas.size() - 1);
+ final SpanRA spanArea = (SpanRA) spanAreas.get(spanAreas.size() - 1);
if (!spanArea.isBalanced()) {
// span area maintains a record of the total height of
@@ -199,7 +199,7 @@
*/
public boolean isLastColumn() {
final List spanAreas = this.getChildren();
- final SpanRA spanArea = (SpanRA)spanAreas.get(spanAreas.size() - 1);
+ final SpanRA spanArea = (SpanRA) spanAreas.get(spanAreas.size() - 1);
return spanArea.isLastColumn();
}
@@ -214,7 +214,7 @@
public NormalFlowRA getCurrentColumnArea() {
final List spanAreas = this.getChildren();
- final SpanRA spanArea = (SpanRA)spanAreas.get(spanAreas.size() - 1);
+ final SpanRA spanArea = (SpanRA) spanAreas.get(spanAreas.size() - 1);
return spanArea.getCurrentColumnArea();
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -465,7 +465,7 @@
if (retrieve.traitRetrievePosition()
== Constants.FOVAL_FIRST_INCLUDING_CARRYOVER) {
for (int i = 0; i < pageMarkers.size(); i++) {
- final Marker currentMarker = (Marker)pageMarkers.get(i);
+ final Marker currentMarker = (Marker) pageMarkers.get(i);
if (currentMarker.traitMarkerClassName().equals(
retrieve.traitRetrieveClassName())) {
return currentMarker;
@@ -474,7 +474,7 @@
} else if (retrieve.traitRetrievePosition()
== Constants.FOVAL_FIRST_STARTING_WITHIN_PAGE) {
for (int i = 0; i < pageMarkers.size(); i++) {
- final Marker currentMarker = (Marker)pageMarkers.get(i);
+ final Marker currentMarker = (Marker) pageMarkers.get(i);
if (currentMarker.traitMarkerClassName().equals(
retrieve.traitRetrieveClassName())) {
if (startsHere(currentMarker)) {
@@ -485,7 +485,7 @@
} else if (retrieve.traitRetrievePosition()
== Constants.FOVAL_LAST_STARTING_WITHIN_PAGE) {
for (int i = pageMarkers.size() - 1; i >= 0; i--) {
- final Marker currentMarker = (Marker)pageMarkers.get(i);
+ final Marker currentMarker = (Marker) pageMarkers.get(i);
if (currentMarker.traitMarkerClassName().equals(
retrieve.traitRetrieveClassName())) {
if (startsHere(currentMarker)) {
@@ -496,7 +496,7 @@
} else if (retrieve.traitRetrievePosition()
== Constants.FOVAL_LAST_ENDING_WITHIN_PAGE) {
for (int i = pageMarkers.size() - 1; i >= 0; i--) {
- final Marker currentMarker = (Marker)pageMarkers.get(i);
+ final Marker currentMarker = (Marker) pageMarkers.get(i);
if (currentMarker.traitMarkerClassName().equals(
retrieve.traitRetrieveClassName())) {
if (endsHere(currentMarker)) {
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -89,7 +89,7 @@
}
public NormalFlowRA getCurrentColumnArea() {
- return (NormalFlowRA)getChildren().get(currentColumn - 1);
+ return (NormalFlowRA) getChildren().get(currentColumn - 1);
}
public boolean isBalanced() {
@@ -104,7 +104,7 @@
int totalContentHeight = 0;
for (final Iterator e = getChildren().iterator(); e.hasNext(); ) {
totalContentHeight +=
- ((NormalFlowRA)e.next()).crBPD();
+ ((NormalFlowRA) e.next()).crBPD();
}
return totalContentHeight;
}
@@ -112,7 +112,7 @@
public int getMaxContentHeight() {
int maxContentHeight = 0;
for (final Iterator e = getChildren().iterator(); e.hasNext(); ) {
- final NormalFlowRA nextElm = (NormalFlowRA)e.next();
+ final NormalFlowRA nextElm = (NormalFlowRA) e.next();
if (nextElm.crBPD() > maxContentHeight) {
maxContentHeight = nextElm.crBPD();
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -245,7 +245,7 @@
*/
if (minIPD > totalFixedWidth) {
// Add extra space to each column
- dWidthFactor = (double) minIPD/(double)totalFixedWidth;
+ dWidthFactor = (double) minIPD/(double) totalFixedWidth;
} else if (maxIPD < totalFixedWidth) {
// Note: if maxIPD=auto, use maxAllocWidth
getLogger().warn("Sum of fixed column widths "
Modified: trunk/foray/foray-common/src/java/org/foray/common/ClassService.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/ClassService.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-common/src/java/org/foray/common/ClassService.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -62,7 +62,7 @@
final String serviceFile = "META-INF/services/" + cls.getName();
- Vector v = (Vector)providerMap.get(serviceFile);
+ Vector v = (Vector) providerMap.get(serviceFile);
if (v != null) {
return v.elements();
}
@@ -79,7 +79,7 @@
while (e.hasMoreElements()) {
try {
- final URL u = (URL)e.nextElement();
+ final URL u = (URL) e.nextElement();
final InputStream is = u.openStream();
final InputStreamReader r = new InputStreamReader(is, "UTF-8");
Modified: trunk/foray/foray-common/src/java/org/foray/common/Configuration.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/Configuration.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-common/src/java/org/foray/common/Configuration.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -112,7 +112,7 @@
protected String getStringValue(final String key) {
final Object obj = getValue(key);
if (obj instanceof String) {
- return (String)obj;
+ return (String) obj;
}
return null;
}
@@ -126,7 +126,7 @@
protected int getIntValue(final String key) {
final Object obj = getValue(key);
if (obj instanceof String) {
- return Integer.parseInt((String)obj);
+ return Integer.parseInt((String) obj);
}
return -1;
}
@@ -140,9 +140,9 @@
protected Boolean getBooleanValue(final String key) {
final Object obj = getValue(key);
if (obj instanceof String) {
- return new Boolean((String)obj);
+ return new Boolean((String) obj);
} else if (obj instanceof Boolean) {
- return (Boolean)obj;
+ return (Boolean) obj;
} else {
return null;
}
@@ -157,7 +157,7 @@
protected List getListValue(final String key) {
final Object obj = getValue(key);
if (obj instanceof List) {
- return (List)obj;
+ return (List) obj;
}
return null;
}
@@ -285,7 +285,7 @@
logger.info("Dumping configuration: " + getName());
final Iterator iterator = options.keySet().iterator();
while (iterator.hasNext()) {
- final String key = (String)iterator.next();
+ final String key = (String) iterator.next();
logger.info("key: " + key);
final Object value = options.get(key);
if (value instanceof String) {
Modified: trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -342,7 +342,7 @@
}
public String readNullTerminatedString() throws IOException {
- return readTerminatedString((byte)0x00, CHAR_ENCODE_ISO_8859_1);
+ return readTerminatedString((byte) 0x00, CHAR_ENCODE_ISO_8859_1);
}
/**
Modified: trunk/foray/foray-common/src/java/org/foray/common/RandomReaderArray.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/RandomReaderArray.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-common/src/java/org/foray/common/RandomReaderArray.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -106,7 +106,7 @@
public final short readShort() throws IOException {
final int byte1 = readUnsignedByte();
final int byte2 = readUnsignedByte();
- return (short)((byte1 << 8) + (byte2 << 0));
+ return (short) ((byte1 << 8) + (byte2 << 0));
}
/**
@@ -177,7 +177,7 @@
public final char readChar() throws IOException {
final int byte1 = this.readUnsignedByte();
final int byte2 = this.readUnsignedByte();
- return (char)((byte1 << 8) + (byte2 << 0));
+ return (char) ((byte1 << 8) + (byte2 << 0));
}
/**
@@ -230,7 +230,7 @@
break;
}
default: {
- input.append((char)byteRead);
+ input.append((char) byteRead);
break;
}
}
Modified: trunk/foray/foray-common/src/java/org/foray/common/sax/DocumentReader.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/sax/DocumentReader.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-common/src/java/org/foray/common/sax/DocumentReader.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -404,7 +404,7 @@
SAXException {
if (input instanceof DocumentInputSource) {
final Document document =
- ((DocumentInputSource)input).getDocument();
+ ((DocumentInputSource) input).getDocument();
if (contentHandler == null) {
throw new SAXException("ContentHandler is null. Please use "
+ "setContentHandler()");
@@ -450,7 +450,7 @@
final NamedNodeMap map = currentNode.getAttributes();
currentAtts.clear();
for (int i = map.getLength() - 1; i >= 0; i--) {
- final Attr att = (Attr)map.item(i);
+ final Attr att = (Attr) map.item(i);
currentAtts.addAttribute(att.getNamespaceURI(),
att.getLocalName(),
att.getName(), "CDATA",
Modified: trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -118,7 +118,7 @@
parser.parse(filename);
} catch (final SAXException e) {
if (e.getException() instanceof FOrayException) {
- throw (FOrayException)e.getException();
+ throw (FOrayException) e.getException();
}
throw new FOrayException(e);
} catch (final IOException e) {
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -260,12 +260,12 @@
}
} catch (final SAXException e) {
if (e.getException() instanceof FOrayException) {
- throw (FOrayException)e.getException();
+ throw (FOrayException) e.getException();
}
throw new FOrayException(e);
} catch (final TransformerException e) {
if (e.getException() instanceof FOrayException) {
- throw (FOrayException)e.getException();
+ throw (FOrayException) e.getException();
}
throw new FOrayException(e);
} catch (final IOException e) {
@@ -288,13 +288,13 @@
final Log log = getLogger();
if (e instanceof SAXException) {
log.error(e.getMessage());
- if (((SAXException)e).getException() != null) {
- log.error(((SAXException)e).getException().getMessage());
+ if (((SAXException) e).getException() != null) {
+ log.error(((SAXException) e).getException().getMessage());
}
} else if (e instanceof FOrayException) {
e.printStackTrace();
- if (((FOrayException)e).getException() != null) {
- log.error(((FOrayException)e).getException().getMessage());
+ if (((FOrayException) e).getException() != null) {
+ log.error(((FOrayException) e).getException().getMessage());
}
} else {
log.error(e.getMessage());
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java 2006-09-08 03:30:12 UTC (rev 8001)
@@ -105,11 +105,11 @@
Throwable result = exception;
if (result instanceof SAXException) {
- result = ((SAXException)result).getException();
+ result = ((SAXException) result).getException();
}
if (result instanceof InvocationTargetException) {
result =
- ((InvocationTargetException)result)
+ ((InvocationTargetException) result)
.getTargetException();
}
if (result != exception) {
Modified: trunk/foray/scripts/checkstyle-config.xml
===================================================================
--- trunk/foray/scripts/checkstyle-config.xml 2006-09-08 03:23:34 UTC (rev 8000)
+++ trunk/foray/scripts/checkstyle-config.xml 2006-09-08 03:30:12 UTC (rev 8001)
@@ -169,9 +169,7 @@
</module>
<module name="UnnecessaryParentheses"/>
<module name="UpperEll"/>
- <module name="WhitespaceAfter">
- <property name="severity" value="ignore"/>
- </module>
+ <module name="WhitespaceAfter"/>
<module name="WhitespaceAround">
<property name="severity" value="ignore"/>
</module>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-08 03:40:35
|
Revision: 8002
http://svn.sourceforge.net/foray/?rev=8002&view=rev
Author: victormote
Date: 2006-09-07 20:40:15 -0700 (Thu, 07 Sep 2006)
Log Message:
-----------
Style changes only.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/demo/embed/tools/EasyContentHandlerProxy.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AudioDial.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderColor.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/DestinationPlacementOffset.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontSizeAdjust.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/GlyphOrientation.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/HyphLadderCount.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/NumberColumnsRepeated.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/NumberColumnsSpanned.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Pause.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Pitch.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PlayDuring.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Size.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/SpeechRate.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TargetPresentationContext.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TargetProcessingContext.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TargetStylesheet.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TextShadow.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Volume.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/WritingMode.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ZIndex.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDestination.java
trunk/foray/scripts/checkstyle-config.xml
Modified: trunk/foray/foray-app/src/java/org/foray/demo/embed/tools/EasyContentHandlerProxy.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/demo/embed/tools/EasyContentHandlerProxy.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-app/src/java/org/foray/demo/embed/tools/EasyContentHandlerProxy.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -233,4 +233,4 @@
target.skippedEntity(name);
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AudioDial.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AudioDial.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AudioDial.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -113,4 +113,4 @@
return VALID_KEYWORDS;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderColor.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderColor.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderColor.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -167,4 +167,4 @@
return null;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/DestinationPlacementOffset.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/DestinationPlacementOffset.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/DestinationPlacementOffset.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -75,4 +75,4 @@
return null;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontSizeAdjust.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontSizeAdjust.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontSizeAdjust.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -112,4 +112,4 @@
return VALID_KEYWORDS;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/GlyphOrientation.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/GlyphOrientation.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/GlyphOrientation.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -142,4 +142,4 @@
return null;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/HyphLadderCount.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/HyphLadderCount.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/HyphLadderCount.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -103,4 +103,4 @@
return VALID_KEYWORDS;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/NumberColumnsRepeated.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/NumberColumnsRepeated.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/NumberColumnsRepeated.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -71,4 +71,4 @@
return null;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/NumberColumnsSpanned.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/NumberColumnsSpanned.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/NumberColumnsSpanned.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -71,4 +71,4 @@
return null;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Pause.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Pause.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Pause.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -206,4 +206,4 @@
return VALID_KEYWORDS;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Pitch.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Pitch.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Pitch.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -125,4 +125,4 @@
return VALID_KEYWORDS;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PlayDuring.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PlayDuring.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PlayDuring.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -144,4 +144,4 @@
return VALID_KEYWORDS;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Size.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Size.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Size.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -169,4 +169,4 @@
return VALID_KEYWORDS;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/SpeechRate.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/SpeechRate.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/SpeechRate.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -136,4 +136,4 @@
return VALID_KEYWORDS;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TargetPresentationContext.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TargetPresentationContext.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TargetPresentationContext.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -81,4 +81,4 @@
return VALID_KEYWORDS;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TargetProcessingContext.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TargetProcessingContext.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TargetProcessingContext.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -81,4 +81,4 @@
return VALID_KEYWORDS;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TargetStylesheet.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TargetStylesheet.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TargetStylesheet.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -81,4 +81,4 @@
return VALID_KEYWORDS;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TextShadow.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TextShadow.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TextShadow.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -100,4 +100,4 @@
return VALID_KEYWORDS;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Volume.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Volume.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Volume.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -156,4 +156,4 @@
return VALID_KEYWORDS;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/WritingMode.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/WritingMode.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/WritingMode.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -78,4 +78,4 @@
return null;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ZIndex.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ZIndex.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ZIndex.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -126,4 +126,4 @@
return VALID_KEYWORDS;
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDestination.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDestination.java 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDestination.java 2006-09-08 03:40:15 UTC (rev 8002)
@@ -39,4 +39,4 @@
super(doc);
}
-}
\ No newline at end of file
+}
Modified: trunk/foray/scripts/checkstyle-config.xml
===================================================================
--- trunk/foray/scripts/checkstyle-config.xml 2006-09-08 03:30:12 UTC (rev 8001)
+++ trunk/foray/scripts/checkstyle-config.xml 2006-09-08 03:40:15 UTC (rev 8002)
@@ -179,10 +179,8 @@
<!-- Make sure each package has javadoc package.html -->
<module name="PackageHtml"/>
- <!-- Make sure each line ends with a newline. -->
- <module name="NewlineAtEndOfFile">
- <property name="severity" value="ignore"/>
- </module>
+ <!-- Make sure each file ends with a newline. -->
+ <module name="NewlineAtEndOfFile"/>
<!-- Look for duplicate code. -->
<module name="StrictDuplicateCode">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-08 14:44:08
|
Revision: 8004
http://svn.sourceforge.net/foray/?rev=8004&view=rev
Author: victormote
Date: 2006-09-08 07:43:46 -0700 (Fri, 08 Sep 2006)
Log Message:
-----------
Style changes only.
Modified Paths:
--------------
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFAction.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFColor.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFEncryption.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFontDescriptor.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFontType0.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFLink.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFTextString.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXPostScript.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFAElementBridge.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFANode.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFDocumentGraphics2D.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFImageElementBridge.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSFile.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSInterpreter.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSStack.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/GlyphList.java
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFAction.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFAction.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFAction.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -46,7 +46,7 @@
* this constructor is used when there is no additional object being created
*
*/
- public PDFAction() {}
+ public PDFAction() { }
/**
* represent the action to call
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFColor.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFColor.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFColor.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -98,15 +98,15 @@
}
public float getRed() {
- return this.color.getRed()/255f;
+ return this.color.getRed() / 255f;
}
public float getGreen() {
- return this.color.getGreen()/255f;
+ return this.color.getGreen() / 255f;
}
public float getBlue() {
- return this.color.getBlue()/255f;
+ return this.color.getBlue() / 255f;
}
}
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -299,7 +299,7 @@
private void recordLocation(final PDFObject object) {
/* Ensure there is room in the locations xref for the number of
* objects that have been created. */
- while(location.size() < lastIndirectObjectAssigned + 1) {
+ while (location.size() < lastIndirectObjectAssigned + 1) {
location.add(LOCATION_PLACEHOLDER);
}
@@ -383,7 +383,7 @@
buffer.append("/Encrypt " + this.encryption.pdfReference()
+ PDFObject.EOL);
buffer.append("/ID[<" + this.encryption.getFileID(1) + "><"
- + this.encryption.getFileID(2)+">]" + PDFObject.EOL);
+ + this.encryption.getFileID(2) + ">]" + PDFObject.EOL);
}
buffer.append(">>" + PDFObject.EOL);
return buffer.toString();
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFEncryption.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFEncryption.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFEncryption.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -213,10 +213,10 @@
int i = 0;
int j = 0;
- while(i < obuffer.length && i < pbuffer.length) {
+ while (i < obuffer.length && i < pbuffer.length) {
obuffer[i] = pbuffer[i]; i++;
}
- while(i < obuffer.length) {
+ while (i < obuffer.length) {
obuffer[i++] = (byte) PAD[j++];
}
@@ -226,7 +226,7 @@
private String toHex(final byte [] value) {
final StringBuffer buffer = new StringBuffer();
- for(int i=0; i < value.length; i++) {
+ for (int i = 0; i < value.length; i++) {
buffer.append(DIGITS[(value[i] >>> 4) & 0x0F]);
buffer.append(DIGITS[value[i] & 0x0F]);
}
@@ -280,7 +280,7 @@
final byte [] key = new byte[size];
- for(int i = 0; i < size; i++) {
+ for (int i = 0; i < size; i++) {
key[i] = hash[i];
}
@@ -306,13 +306,13 @@
if (!allowPrint) {
permissions -= PERMISSION_PRINT;
}
- if(!allowCopyContent) {
+ if (!allowCopyContent) {
permissions -= PERMISSION_COPY_CONTENT;
}
- if(!allowEditContent) {
+ if (!allowEditContent) {
permissions -= PERMISSION_EDIT_CONTENT;
}
- if(!allowEditAnnotations) {
+ if (!allowEditAnnotations) {
permissions -= PERMISSION_EDIT_ANNOTATIONS;
}
@@ -328,7 +328,7 @@
final byte [] hash = digest.digest();
this.encryptionKey = new byte[5];
- for(int i = 0; i < 5; i++) {
+ for (int i = 0; i < 5; i++) {
this.encryptionKey[i] = hash[i];
}
@@ -361,11 +361,11 @@
+ "initialized");
}
- final byte [] hash = new byte[this.encryptionKey.length+5];
+ final byte [] hash = new byte[this.encryptionKey.length + 5];
int i = 0;
- while(i < this.encryptionKey.length) {
+ while (i < this.encryptionKey.length) {
hash[i] = this.encryptionKey[i]; i++;
}
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFontDescriptor.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFontDescriptor.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFontDescriptor.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -191,7 +191,7 @@
*
* @param begin the buffer to be completed with the specific fields
*/
- protected void fillInPDF(final StringBuffer begin) {}
+ protected void fillInPDF(final StringBuffer begin) { }
protected void embedFont() {
if (! font.fsFont.getFont().isEmbeddable()) {
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFontType0.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFontType0.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFontType0.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -65,12 +65,12 @@
return this.descendantFonts;
}
- protected void writeFirstChar(final StringBuffer buffer) {}
+ protected void writeFirstChar(final StringBuffer buffer) { }
- protected void writeLastChar(final StringBuffer buffer) {}
+ protected void writeLastChar(final StringBuffer buffer) { }
- protected void writeWidths(final StringBuffer buffer) {}
+ protected void writeWidths(final StringBuffer buffer) { }
- protected void writeFontDescriptor(final StringBuffer buffer) {}
+ protected void writeFontDescriptor(final StringBuffer buffer) { }
}
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFLink.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFLink.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFLink.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -112,7 +112,7 @@
// If there is a named destination, use that ...
buffer.append("/Dest " + this.destinationName.toPDF()
+ EOL);
- } else if (this.destination != null){
+ } else if (this.destination != null) {
buffer.append("/Dest " + this.destination.toPDF());
} else if (this.action != null) {
// ... otherwise, use the Action.
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFTextString.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFTextString.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFTextString.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -101,7 +101,7 @@
*/
public static String unicodeToPDFDocEncoding(final String unicodeString) {
final StringBuffer pdfDocString = new StringBuffer(unicodeString);
- for(int i = 0; i < unicodeString.length(); i++) {
+ for (int i = 0; i < unicodeString.length(); i++) {
final char unicodeChar = unicodeString.charAt(i);
final char pdfDocChar = unicodeToPDFDocEncoding(unicodeChar);
if (pdfDocChar == INVALID_PDF_DOC_ENCODING) {
@@ -126,7 +126,7 @@
* This may not be right, but I am pretty sure that the ASCII chars
* are the same.
*/
- if(unicodeChar >= 0x20 && unicodeChar <= 0xff) {
+ if (unicodeChar >= 0x20 && unicodeChar <= 0xff) {
return unicodeChar;
}
/*
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXPostScript.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXPostScript.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXPostScript.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -85,8 +85,8 @@
preamble.append("/showpage {} def" + EOL);
- preamble.append((1f/(double) bboxw) + " "
- + (1f/(double) bboxh) + " scale" + EOL);
+ preamble.append((1f / (double) bboxw) + " "
+ + (1f / (double) bboxh) + " scale" + EOL);
preamble.append(-bbox[0] + " " + (-bbox[1]) + " translate" + EOL);
preamble.append(bbox[0] + " " + bbox[1] + " " + bboxw + " "
+ bboxh + " rectclip" + EOL);
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFAElementBridge.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFAElementBridge.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFAElementBridge.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -47,7 +47,7 @@
/**
* Constructs a new bridge for the <a> element.
*/
- public PDFAElementBridge() {}
+ public PDFAElementBridge() { }
public void setCurrentTransform(final AffineTransform tf) {
transform = tf;
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFANode.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFANode.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFANode.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -48,7 +48,7 @@
/**
* Constructs a new empty <tt>PDFANode</tt>.
*/
- public PDFANode() {}
+ public PDFANode() { }
/**
* Set the destination String.
@@ -77,7 +77,7 @@
final PDFGraphics2D pdfg = (PDFGraphics2D) g2d;
boolean externalLink = true;
final Shape outline = getOutline();
- if(destination.startsWith("#svgView(viewBox(")) {
+ if (destination.startsWith("#svgView(viewBox(")) {
externalLink = false;
final String nums = destination.substring(18,
destination.length() - 2);
@@ -87,7 +87,7 @@
int count = 0;
try {
final StringTokenizer st = new StringTokenizer(nums, ",");
- while(st.hasMoreTokens()) {
+ while (st.hasMoreTokens()) {
final String tok = st.nextToken();
count++;
switch(count) {
@@ -106,7 +106,7 @@
break;
}
}
- } catch(final Exception e) {
+ } catch (final Exception e) {
}
// these numbers need conversion to current
// svg position and scaled for the page
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFDocumentGraphics2D.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFDocumentGraphics2D.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFDocumentGraphics2D.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -146,7 +146,7 @@
final PDFContentStream contentStream = (PDFContentStream)
currentPage.getContentStream();
contentStream.add(getString());
- if(currentAnnotList != null) {
+ if (currentAnnotList != null) {
currentPage.getAnnotList().addAnnotationList(currentAnnotList);
}
pdfDoc.outputHeader(stream);
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -237,7 +237,7 @@
public void addLink(final PDFPage pdfPage, final Shape bounds,
final AffineTransform trans, final String dest,
final boolean externalLink) {
- if(currentAnnotList == null) {
+ if (currentAnnotList == null) {
currentAnnotList = new PDFAnnotList(pdfDoc);
}
final AffineTransform at = getTransform();
@@ -495,7 +495,7 @@
public void draw(final Shape s) {
Color c;
c = getColor();
- if(c.getAlpha() == 0) {
+ if (c.getAlpha() == 0) {
return;
}
@@ -679,7 +679,7 @@
aColorSpace,
someColors, null, theCoords, pdfDoc);
currentStream.write(myPat.getColorSpaceOut(fill));
- } else if (paint instanceof TexturePaint) {}
+ } else if (paint instanceof TexturePaint) { }
}
protected void applyStroke(final Stroke stroke) {
@@ -690,7 +690,7 @@
if (da != null) {
currentStream.write("[");
for (int count = 0; count < da.length; count++) {
- if(((int) da[count]) == 0) {
+ if (((int) da[count]) == 0) {
// the dasharray units in pdf are (whole) numbers
// in user space units, cannot be 0
currentStream.write("1");
@@ -1008,9 +1008,9 @@
// this.area.getLogger().error("fill");
Color c;
c = getBackground();
- if(c.getAlpha() == 0) {
+ if (c.getAlpha() == 0) {
c = getColor();
- if(c.getAlpha() == 0) {
+ if (c.getAlpha() == 0) {
return;
}
}
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFImageElementBridge.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFImageElementBridge.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFImageElementBridge.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -47,7 +47,7 @@
/**
* Constructs a new bridge for the <image> element.
*/
- public PDFImageElementBridge() {}
+ public PDFImageElementBridge() { }
/*
protected GraphicsNode createRasterImageNode(BridgeContext ctx,
Element e, ParsedURL purl) {
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -179,10 +179,10 @@
loc.setLocation(loc.getX(), ypos.doubleValue());
}
if (dxpos != null) {
- loc.setLocation(loc.getX()+dxpos.doubleValue(), loc.getY());
+ loc.setLocation(loc.getX() + dxpos.doubleValue(), loc.getY());
}
if (dypos != null) {
- loc.setLocation(loc.getX(), loc.getY()+dypos.doubleValue());
+ loc.setLocation(loc.getX(), loc.getY() + dypos.doubleValue());
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -100,7 +100,7 @@
* absolute AreaContainer (generally a page column).
*/
public boolean startsAC(Area area) {
- Area parent=null;
+ Area parent = null;
while ((parent = area.getWritableParentArea()) != null &&
parent.hasChildren() == false) {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -86,8 +86,8 @@
}
if (noLayoutCount > infLoopThreshhold) {
throw new AreaWException(
- "No meaningful layout in block after many attempts. \n"+
- "Infinite loop is assumed. Processing halted.");
+ "No meaningful layout in block after many attempts. \n"
+ + "Infinite loop is assumed. Processing halted.");
}
if (getProgress() == FONodePL.BREAK_AFTER) {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -48,7 +48,7 @@
/**
* Set to true if all content completely laid out.
*/
- private boolean bDone=false;
+ private boolean bDone = false;
public TableCellPL(final TableCell cell, final PioneerLS layout) {
super(cell, layout);
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -150,7 +150,7 @@
}
if (node.getTableFooter() != null
&& ! node.traitTableOmitFooterAtBreak(area)
- &&!addedFooter) {
+ && ! addedFooter) {
tf = node.getTableFooter();
final TableFooterPL tfPL = (TableFooterPL)
this.getLayoutProxy(tf);
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSFile.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSFile.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSFile.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -80,7 +80,7 @@
chunk = getNextChunk();
chunkIndex = 0;
if (chunk == null || chunk.length == 0
- || chunkIndex > chunk.length -1) {
+ || chunkIndex > chunk.length - 1) {
closeFile();
return 0x00;
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSInterpreter.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSInterpreter.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSInterpreter.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -387,7 +387,7 @@
* consumeToken(), we need to
*/
if (newExecutionStackSize > oldExecutionStackSize) {
- assert newExecutionStackSize == oldExecutionStackSize + 1:
+ assert newExecutionStackSize == oldExecutionStackSize + 1 :
"More than 1 item added to Execution Stack.";
final PSObject currentExecution = executionStack.peek();
// Warning: This is recursive. We are already inside this.
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSStack.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSStack.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSStack.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -186,7 +186,7 @@
*/
PSFile currentFile() {
PSFile currentFile = null;
- for(int i = list.size() - 1; i > -1 && currentFile == null;
+ for (int i = list.size() - 1; i > -1 && currentFile == null;
i--) {
if (list.get(i) instanceof PSFile) {
currentFile = (PSFile) list.get(i);
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/GlyphList.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/GlyphList.java 2006-09-08 03:46:11 UTC (rev 8003)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/GlyphList.java 2006-09-08 14:43:46 UTC (rev 8004)
@@ -171,7 +171,7 @@
// Otherwise, try to instantiate it.
if (name.equals("AGL")) {
list = new GlyphListAGL();
- } else if (name.equals("ZapfDingbats")){
+ } else if (name.equals("ZapfDingbats")) {
list = new GlyphListZapfDingbats();
}
if (list == null) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-08 15:01:25
|
Revision: 8005
http://svn.sourceforge.net/foray/?rev=8005&view=rev
Author: victormote
Date: 2006-09-08 08:00:32 -0700 (Fri, 08 Sep 2006)
Log Message:
-----------
Style changes only.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
trunk/foray/foray-app/src/java/org/foray/app/Options.java
trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java
trunk/foray/foray-app/src/java/org/foray/app/ant/RunTest.java
trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java
trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java
trunk/foray/foray-common/src/java/org/foray/common/ClassService.java
trunk/foray/foray-common/src/java/org/foray/common/ISO639.java
trunk/foray/foray-common/src/java/org/foray/common/MUserAgent.java
trunk/foray/foray-common/src/java/org/foray/common/StringUtil.java
trunk/foray/foray-common/src/java/org/foray/common/StringUtilPre5.java
trunk/foray/foray-common/src/java/org/foray/common/url/URLFactory.java
trunk/foray/foray-common/src/java/org/foray/common/url/classpath/Handler.java
trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java
trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
trunk/foray/foray-font/src/java/org/foray/font/FontConfig.java
trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java
trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFReader.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java
trunk/foray/foray-font/src/java/org/foray/font/format/Type1PFAFile.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/PropertyMakerFO.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Bookmark.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundPosition.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyTokenizer.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtAngle.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtURI.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/Graphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/ImageConsumerImpl.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/JPEGGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/factory/GraphicFactory.java
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java
trunk/foray/foray-mif/src/java/org/foray/mif/MIFDocument.java
trunk/foray/scripts/checkstyle-config.xml
Modified: trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -92,7 +92,7 @@
if (language == null) {
try {
language = System.getProperty("user.language");
- } catch(final SecurityException se) {
+ } catch (final SecurityException se) {
// if this is running in a secure place
}
}
Modified: trunk/foray/foray-app/src/java/org/foray/app/Options.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/Options.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-app/src/java/org/foray/app/Options.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -116,7 +116,7 @@
} catch (final FOrayException error) {
logger.error("Could not load user configuration:\n"
+ " " + userConfigSource.getSystemId() + "\n"
- + " Error: " + error.getMessage() +"\n"
+ + " Error: " + error.getMessage() + "\n"
+ " Using default values.");
dumpError(error);
}
Modified: trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -64,7 +64,7 @@
configuration);
final PrinterJob pj = PrinterJob.getPrinterJob();
- if(System.getProperty("dialog") != null) {
+ if (System.getProperty("dialog") != null) {
if (! pj.printDialog()) {
throw new FOrayException("Printing cancelled by operator");
}
@@ -86,7 +86,7 @@
int getIntProperty(final String name, final int def) {
final String propValue = System.getProperty(name);
- if(propValue != null) {
+ if (propValue != null) {
try {
return Integer.parseInt(propValue);
} catch (final Exception e) {
Modified: trunk/foray/foray-app/src/java/org/foray/app/ant/RunTest.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/ant/RunTest.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-app/src/java/org/foray/app/ant/RunTest.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -56,7 +56,7 @@
String referenceJar = "";
String refVersion = "";
- public RunTest() {}
+ public RunTest() { }
public void setTestSuite(final String str) {
testsuite = str;
@@ -98,7 +98,7 @@
});
final HashMap diff = runConverter(loader, "areatree",
"reference/output/");
- if (diff != null &&!diff.isEmpty()) {
+ if (diff != null && ! diff.isEmpty()) {
logger.info("====================================");
logger.info("The following files differ:");
boolean broke = false;
Modified: trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -109,10 +109,10 @@
} else if (argument.equals("-b")) {
tc.setBaseDir(args[count + 1]);
count++;
- } else if (argument.equals("-input")){
+ } else if (argument.equals("-input")) {
testFile = args[count + 1];
count++;
- } else if (argument.equals("-output")){
+ } else if (argument.equals("-output")) {
output = args[count + 1];
count++;
} else {
@@ -215,7 +215,7 @@
runTestCase(node);
} else if (nodename.equals("test")) {
runTest(tcase, node);
- } else if (nodename.equals("result")) {}
+ } else if (nodename.equals("result")) { }
}
@@ -324,7 +324,7 @@
* Returns true if equal.
*/
protected boolean compareFiles(final File f1, final File f2) {
- if(f1.length() != f2.length()) {
+ if (f1.length() != f2.length()) {
return false;
}
try {
@@ -343,7 +343,7 @@
return false;
}
}
- } catch (final Exception e) {}
+ } catch (final Exception e) { }
return false;
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -50,7 +50,7 @@
*/
public class NormalBlockArea extends AbstractNormalBlockArea
implements org.axsl.areaR.NormalBlockArea,
- org.axsl.areaW.NormalBlockArea{
+ org.axsl.areaW.NormalBlockArea {
public NormalBlockArea(final FObj parentFObj, final Area parentArea,
final RetrieveMarker retrieveMarker) {
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -85,7 +85,7 @@
}
private PageCollection getAreaTreeParent() {
- assert getParent() instanceof PageCollection:
+ assert getParent() instanceof PageCollection :
"Parent of Page Area must be a PageCollection";
return (PageCollection) getParent();
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -202,7 +202,7 @@
if (bHasProportionalUnits && optIPD < 0) {
if (minIPD > 0) {
if (node.traitIPDimensionMax(this, maxAllocationIPD) >= 0) {
- optIPD = (minIPD + maxIPD)/2;
+ optIPD = (minIPD + maxIPD) / 2;
} else {
optIPD = minIPD;
}
@@ -235,7 +235,7 @@
/* Set remaining proportional units to a number which
* will assure the minimum column size for tuMin.
*/
- dUnitLength = MINCOLWIDTH/tuMin;
+ dUnitLength = MINCOLWIDTH / tuMin;
// Reduce fixed column widths by this much???
}
//log.debug("1 table-unit = " + dUnitLength + " mpt");
@@ -245,7 +245,7 @@
*/
if (minIPD > totalFixedWidth) {
// Add extra space to each column
- dWidthFactor = (double) minIPD/(double) totalFixedWidth;
+ dWidthFactor = (double) minIPD / (double) totalFixedWidth;
} else if (maxIPD < totalFixedWidth) {
// Note: if maxIPD=auto, use maxAllocWidth
getLogger().warn("Sum of fixed column widths "
Modified: trunk/foray/foray-common/src/java/org/foray/common/ClassService.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/ClassService.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-common/src/java/org/foray/common/ClassService.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -56,7 +56,7 @@
public static synchronized Enumeration providers(final Class cls) {
ClassLoader cl = cls.getClassLoader();
// null if loaded by bootstrap class loader
- if(cl == null) {
+ if (cl == null) {
cl = ClassLoader.getSystemClassLoader();
}
Modified: trunk/foray/foray-common/src/java/org/foray/common/ISO639.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/ISO639.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-common/src/java/org/foray/common/ISO639.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -622,7 +622,7 @@
/**
* Private constructor (should not be instantiated).
*/
- private ISO639() {}
+ private ISO639() { }
/**
* Determines whether a given language code is a valid 2-character or
Modified: trunk/foray/foray-common/src/java/org/foray/common/MUserAgent.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/MUserAgent.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-common/src/java/org/foray/common/MUserAgent.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -62,7 +62,7 @@
return new Point(0, 0);
}
- public void setSVGCursor(final Cursor cursor) {}
+ public void setSVGCursor(final Cursor cursor) { }
public Dimension2D getViewportSize() {
return new Dimension(100, 100);
Modified: trunk/foray/foray-common/src/java/org/foray/common/StringUtil.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/StringUtil.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-common/src/java/org/foray/common/StringUtil.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -37,7 +37,7 @@
/**
* Private constructor (should never be instantiated).
*/
- private StringUtil() {}
+ private StringUtil() { }
/**
* Reports whether an input character is a valid hexadecimal character.
@@ -224,7 +224,7 @@
buffer.replace(lastOpportunity, lastOpportunity + 1, eol);
currentLineStarts = lastOpportunity + 1 + eol.length();
lastOpportunity = -1;
- i =+ eol.length() - 1;
+ i = eol.length() - 1;
}
final char c = buffer.charAt(i);
if (c == ' ') {
Modified: trunk/foray/foray-common/src/java/org/foray/common/StringUtilPre5.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/StringUtilPre5.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-common/src/java/org/foray/common/StringUtilPre5.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -41,7 +41,7 @@
/**
* Private constructor (should never be instantiated).
*/
- private StringUtilPre5() {}
+ private StringUtilPre5() { }
/**
* Mimics Java 5.0: Character.charCount(int).
Modified: trunk/foray/foray-common/src/java/org/foray/common/url/URLFactory.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/url/URLFactory.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-common/src/java/org/foray/common/url/URLFactory.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -141,7 +141,7 @@
int c;
int start = 0;
String newProtocol = null;
- boolean aRef=false;
+ boolean aRef = false;
limit = spec.length();
while ((limit > 0) && (spec.charAt(limit - 1) <= ' ')) {
@@ -159,7 +159,7 @@
* This means protocols cannot start w/ '#', but we must parse
* ref URL's like: "hello:there" w/ a ':' in them.
*/
- aRef=true;
+ aRef = true;
}
for (i = start; !aRef && (i < limit) &&
((c = spec.charAt(i)) != '/'); i++) {
Modified: trunk/foray/foray-common/src/java/org/foray/common/url/classpath/Handler.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/url/classpath/Handler.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-common/src/java/org/foray/common/url/classpath/Handler.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -58,12 +58,12 @@
protected URLConnection openConnection(final URL u) {
return new URLConnection(u) {
- public void connect() {}
+ public void connect() { }
public InputStream getInputStream() throws IOException {
final String path = url.getPath();
final String resourcePath =
- (path.charAt(0) == '/')? path.substring(1): path;
+ (path.charAt(0) == '/') ? path.substring(1) : path;
final InputStream inputStream = getClass().getClassLoader().
getResourceAsStream(resourcePath);
if (inputStream == null) {
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -207,8 +207,9 @@
final long memoryNow = runtime.totalMemory() - runtime.freeMemory();
final long memoryUsed = (memoryNow - initialMemory) / 1024L;
- getLogger().debug("Initial heap size: " + (initialMemory/1024L) + "Kb");
- getLogger().debug("Current heap size: " + (memoryNow/1024L) + "Kb");
+ getLogger().debug("Initial heap size: " + (initialMemory / 1024L)
+ + "Kb");
+ getLogger().debug("Current heap size: " + (memoryNow / 1024L) + "Kb");
getLogger().debug("Total memory used: " + memoryUsed + "Kb");
if (!MEM_PROFILE_WITH_GC) {
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -177,7 +177,7 @@
return this.defaultFreeStandingFont;
}
- protected RegisteredFontDesc getDefaultSystemFont(){
+ protected RegisteredFontDesc getDefaultSystemFont() {
if (this.defaultSystemFont != null) {
return this.defaultSystemFont;
}
@@ -199,7 +199,8 @@
return this.defaultSystemFont;
}
- protected RegisteredFontDesc getDefaultFont(final boolean freeStandingFont){
+ protected RegisteredFontDesc getDefaultFont(
+ final boolean freeStandingFont) {
RegisteredFontDesc defaultFont = null;
RegisteredFontFamily rff = getRegisteredFontFamily("any");
if (rff != null) {
Modified: trunk/foray/foray-font/src/java/org/foray/font/FontConfig.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FontConfig.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-font/src/java/org/foray/font/FontConfig.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -213,7 +213,7 @@
if (ttfFonts == null) {
return;
}
- for(int i = 0; i < ttfFonts.length; i++) {
+ for (int i = 0; i < ttfFonts.length; i++) {
new FontConfigFontFile(this, ttfFonts[i].getPostscriptName());
}
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -330,7 +330,7 @@
}
if (! valueNull && ! fromEnvironmentNull) {
logError("<parameter> element cannot have both a 'value' and a "
- +"'from-environment' attribute. Ignored.");
+ + "'from-environment' attribute. Ignored.");
return false;
}
return true;
Modified: trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -457,11 +457,11 @@
} catch (final IOException e) {
throw new FontException("Error reading input stream for: \n "
+ fontFileReader.getDescription(), e);
- } catch(final IllegalArgumentException iae) {
+ } catch (final IllegalArgumentException iae) {
/* Ignore this. This just means that the fontFormat is not one that
* java recognizes, probably because the runtime is lower than
* java 1.5. The proper things to do is just return null.*/
- } catch(final FontFormatException ffe) {
+ } catch (final FontFormatException ffe) {
throw new FontException(ffe);
} finally {
if (fontStream != null) {
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/TTFReader.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/TTFReader.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/TTFReader.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -52,7 +52,7 @@
/**
* Basic Constructor.
*/
- public TTFReader() {}
+ public TTFReader() { }
/**
* The main method (accessible from command-line) for the TTFReader tool.
@@ -125,7 +125,7 @@
final ArrayList arguments = new ArrayList();
for (int i = 0; i < args.length; i++) {
if (args[i].startsWith("-")) {
- if ((i + 1) < args.length &&!args[i + 1].startsWith("-")) {
+ if ((i + 1) < args.length && ! args[i + 1].startsWith("-")) {
options.put(args[i], args[i + 1]);
i++;
} else {
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -777,7 +777,7 @@
sum = getCheckSum(directoryTableArray, 0, directoryTableArray.length);
sum = correctCheckSumForMax(sum);
final Iterator iter = tableFontOrderList.iterator();
- while(iter.hasNext()) {
+ while (iter.hasNext()) {
final byte[] byteArray = (byte[]) tableMap.get(iter.next());
sum = getCheckSum(byteArray, 0, byteArray.length);
sum = correctCheckSumForMax(sum);
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/Type1PFAFile.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/Type1PFAFile.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/Type1PFAFile.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -91,7 +91,7 @@
boolean cleartomarkFound = false;
while (! cleartomarkFound) {
// Move every element in textToCheck to the "right" one place
- for(int i = textToCheck.length - 1; i > 0; i--) {
+ for (int i = textToCheck.length - 1; i > 0; i--) {
textToCheck[i] = textToCheck[i - 1];
}
// Read the new byte in
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -201,7 +201,7 @@
}
public void throwException(final String contextMessage,
- final String message) throws FOTreeException{
+ final String message) throws FOTreeException {
final FOTreeException exception = new FOTreeException(message);
exception.setContextMessage(contextMessage);
throw exception;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -836,7 +836,7 @@
public static char applyLinefeedTreatment(final char c,
final short linefeedTreatment) {
- assert c == 0x000a: "Invalid linefeed-treatment input.";
+ assert c == 0x000a : "Invalid linefeed-treatment input.";
switch (linefeedTreatment) {
case Constants.FOVAL_IGNORE: {
return DISCARD_CHAR;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -141,7 +141,7 @@
}
notifyFObjComplete(currentFObj);
- if(currentFObj instanceof PageSequence) {
+ if (currentFObj instanceof PageSequence) {
// Notify the listeners that this page-sequence is complete.
notifyPageSequenceComplete((PageSequence) currentFObj);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -111,7 +111,7 @@
try {
final Namespace ns = createNonstandardNamespace(str);
registerNamespace(ns);
- } catch (final IllegalArgumentException e) {}
+ } catch (final IllegalArgumentException e) { }
}
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -1627,7 +1627,7 @@
break;
}
}
- } else if (absoluteAxis == Constants.AXIS_VERTICAL){
+ } else if (absoluteAxis == Constants.AXIS_VERTICAL) {
switch (subProperty) {
case Property.MINIMUM: {
absDimProperty = (AbsoluteDimension) getProperty(
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/PropertyMakerFO.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/PropertyMakerFO.java 2006-09-08 14:43:46 UTC (rev 8004)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/PropertyMakerFO.java 2006-09-08 15:00:32 UTC (rev 8005)
@@ -1139,7 +1139,7 @@
if (property == null) {
return null;
}
- assert property instanceof RelativeDimension: "block-progression-"
+ assert property instanceof RelativeDimension : "block-progression-"
+ "dimension must be a RelativeDimension";
((RelativeDimension) property).addComponent(propertyList,
propertyFullName, attributeValue);
@@ -1151,7 +1151,7 @@
if (property == null) {
return null;
}
- assert property instanceof RelativeDimension: "inline-progression-"
+ assert property instanceof RelativeDimension : "inline-progression-"
+ "dimension must be a RelativeDimension";
((RelativeDimension) property).addComponent(propertyList,
propertyFullName, attributeValue);
@@ -1163,7 +1163,7 @@
if (property == null) {
return null;
}
- assert property instanceof RelativeSpace: "space-after must be a "
+ assert property instanceof RelativeSpace : "space-after must be a "
+ "RelativeSpace";
((RelativeSpace) property).addComponent(propertyList,
propertyFullName, attributeValue);
@@ -1175,7 +1175,7 @@
if (property == null) {
return null;
}
- assert property instanceof RelativeSpace: "space-before must be a "
+ assert property instanceof RelativeSpace : "space-before must be a "
+ "RelativeSpace";
((RelativeSpace) property).addComponent(propertyList,
propertyFullName, attributeValue);
@@ -1187,7 +1187,7 @@
if (property == null) {
return null;
}
- assert property instanceof RelativeSpace: "space-end must be a "
+ assert property instanceof RelativeSpace : "space-end must be a "
+ "RelativeSpace";
((RelativeSpace) property).addComponent(propertyList,
propertyFullName, attributeValue);
@@ -1199,7 +1199,7 @@
if (property == null) {
return null;
}
- assert property instanceof RelativeSpace: "space-start must be a "
+ assert property instanceof RelativeSpace : "space-start must be a "
+ "RelativeSpace";
((RelativeSpace) property).addComponent(propertyList,
...
[truncated message content] |
|
From: <vic...@us...> - 2006-09-09 18:59:45
|
Revision: 8012
http://svn.sourceforge.net/foray/?rev=8012&view=rev
Author: victormote
Date: 2006-09-09 11:59:26 -0700 (Sat, 09 Sep 2006)
Log Message:
-----------
Remove magic numbers.
Modified Paths:
--------------
trunk/foray/foray-mif/src/java/org/foray/mif/MIFDocument.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/foray-mif/src/java/org/foray/mif/MIFDocument.java
===================================================================
--- trunk/foray/foray-mif/src/java/org/foray/mif/MIFDocument.java 2006-09-09 18:29:56 UTC (rev 8011)
+++ trunk/foray/foray-mif/src/java/org/foray/mif/MIFDocument.java 2006-09-09 18:59:26 UTC (rev 8012)
@@ -44,6 +44,8 @@
*/
public class MIFDocument {
+ public static final float MILLIPOINT_CONVERSION = 1000f;
+
private static final String EOL = "\n";
private static final String TAB = "\t";
@@ -157,8 +159,11 @@
public void output(final OutputStream stream) throws IOException {
- final String mif = "\n<Document " + "\n<DPageSize " + width / 1000f
- + " " + height / 1000f + " >\n>";
+ final String mif = EOL
+ + "<Document " + EOL
+ + "<DPageSize " + width / MILLIPOINT_CONVERSION
+ + " " + height / MILLIPOINT_CONVERSION + " >" + EOL
+ + ">";
final byte buf[] = mif.getBytes();
stream.write(buf);
@@ -203,7 +208,7 @@
String path = this.url;
// Strip 'file:'
- path = path.substring(5);
+ path = path.substring("file:".length());
String result = "";
int i;
do { // replace all matching '/'
@@ -218,19 +223,20 @@
} while (i != -1);
- String mif = "\n<ImportObject" + "\n<ImportObFixedSize Yes>";
- mif += "\n\t<ImportObFileDI " + "`<c\\>" + path + "'" + " >";
- mif += "\n\t<ShapeRect " + this.x / 1000f + " " + this.y / 1000f
- + " " + this.w / 1000f + " " + this.h / 1000f + " >";
-
- mif += "\n> #End ImportObj";
+ String mif = EOL
+ + "<ImportObject" + EOL
+ + "<ImportObFixedSize Yes>" + EOL;
+ mif += TAB + "<ImportObFileDI " + "`<c\\>" + path + "'" + " >"
+ + EOL;
+ mif += TAB + "<ShapeRect " + this.x / MILLIPOINT_CONVERSION + " "
+ + this.y / MILLIPOINT_CONVERSION + " "
+ + this.w / MILLIPOINT_CONVERSION + " "
+ + this.h / MILLIPOINT_CONVERSION + " >" + EOL;
+ mif += "> #End ImportObj";
stream.write(mif.getBytes());
-
}
-
}
-
/**
* A MIF Frame.
*/
@@ -256,7 +262,9 @@
}
public void output(final OutputStream stream) throws IOException {
- String mif = "\n<Frame" + "\n\t<ID " + this.id + " >";
+ String mif = EOL
+ + "<Frame" + EOL
+ + TAB + "<ID " + this.id + " >";
mif += EOL
+ TAB + "<Pen 15>" + EOL
+ TAB + "<Fill 7>" + EOL
@@ -276,26 +284,24 @@
+ TAB + "<BLOffset 0>" + EOL
+ TAB + "<Cropped No>" + EOL
+ TAB + "<FrameType Below>" + EOL
- + TAB + "<AnchorAlign Center>";
+ + TAB + "<AnchorAlign Center>" + EOL;
- mif += "\n\t<ShapeRect " + this.x / 1000f + " " + this.y / 1000f
- + " " + this.w / 1000f + " " + this.h / 1000f + " >";
+ mif += TAB + "<ShapeRect "
+ + this.x / MILLIPOINT_CONVERSION + " "
+ + this.y / MILLIPOINT_CONVERSION + " "
+ + this.w / MILLIPOINT_CONVERSION + " "
+ + this.h / MILLIPOINT_CONVERSION + " >";
-
stream.write(mif.getBytes());
for (int i = 0; i < content.size(); i++) {
((ImportObject) content.get(i)).output(stream);
}
- mif = "\n> #End Frame";
+ mif = EOL + "> #End Frame";
stream.write(mif.getBytes());
-
-
-
}
public int getID() {
-
return this.id;
}
@@ -351,16 +357,21 @@
public void output(final OutputStream stream) throws IOException {
- String mif = "\n<TextRect" + "\n\t<ID " + textRectID + ">"
- + "\n\t<ShapeRect " + rx / 1000f + " " + ry / 1000f
- + " " + w / 1000f + " " + h / 1000f + ">";
+ String mif = EOL
+ + "<TextRect" + EOL
+ + TAB + "<ID " + textRectID + ">" + EOL
+ + TAB + "<ShapeRect " + rx / MILLIPOINT_CONVERSION + " "
+ + ry / MILLIPOINT_CONVERSION + " "
+ + w / MILLIPOINT_CONVERSION + " "
+ + h / MILLIPOINT_CONVERSION + ">";
if (numCols > 1) {
- mif += "\n<TRNumColumns " + numCols + ">";
- mif += "\n<TRColumnGap " + colGap / 1000f + ">";
+ mif += EOL + "<TRNumColumns " + numCols + ">";
+ mif += EOL + "<TRColumnGap "
+ + colGap / MILLIPOINT_CONVERSION + ">";
}
- mif += "\n> #End TextRect";
+ mif += EOL + "> #End TextRect";
final byte buf[] = mif.getBytes();
stream.write(buf);
}
@@ -405,15 +416,15 @@
public void output(final OutputStream stream) throws IOException {
- String mif = "\n<Page" + "\n\t<PageType " + pageType + ">"
- + "\n\t<PageBackground " + "`" + pageBackground
- + "'" + ">";
+ String mif = EOL + "<Page" + EOL
+ + TAB + "<PageType " + pageType + ">" + EOL
+ + TAB + "<PageBackground " + "`" + pageBackground + "'" + ">";
final byte buf[] = mif.getBytes();
stream.write(buf);
for (int i = 0; i < textRects.size(); i++) {
((TextRect) textRects.get(i)).output(stream);
}
- mif = "\n> #End Page\n";
+ mif = EOL + "> #End Page" + EOL;
stream.write(mif.getBytes());
}
}
@@ -466,12 +477,12 @@
}
public void output(final OutputStream stream) throws IOException {
- String mif = "\n<TextFlow";
+ String mif = EOL + "<TextFlow";
stream.write(mif.getBytes());
for (int i = 0; i < paras.size(); i++) {
((Para) paras.get(i)).output(stream);
}
- mif = "\n> #End TextFlow";
+ mif = EOL + "> #End TextFlow";
stream.write(mif.getBytes());
}
}
@@ -527,21 +538,24 @@
public void output(final OutputStream stream) throws IOException {
- String mif = "\n<Para";
+ String mif = EOL + "<Para";
// Is there a block property?
if (pgf != null) {
- mif += "\n<Pgf";
- mif += "\n<PgfTag `Body'>";
- mif += "\n<PgfLIndent " + pgf.startIndent / 1000f + ">";
- mif += "\n<PgfRIndent " + pgf.endIndent / 1000f + ">";
- mif += "\n>";
+ mif += EOL;
+ mif += "<Pgf" + EOL;
+ mif += "<PgfTag `Body'>" + EOL;
+ mif += "<PgfLIndent "
+ + pgf.startIndent / MILLIPOINT_CONVERSION + ">" + EOL;
+ mif += "<PgfRIndent "
+ + pgf.endIndent / MILLIPOINT_CONVERSION + ">" + EOL;
+ mif += ">";
}
stream.write(mif.getBytes());
for (int i = 0; i < paraLines.size(); i++) {
((ParaLine) paraLines.get(i)).output(stream);
}
- mif = "\n> #End ParaLine";
+ mif = EOL + "> #End ParaLine";
stream.write(mif.getBytes());
}
@@ -576,32 +590,34 @@
public void output(final OutputStream stream) throws IOException {
- String mif = "\n<ParaLine";
+ String mif = EOL + "<ParaLine";
// tables dont need the textrectid
if (textRectID != 0) {
- mif += "\n\t<TextRectID " + textRectID + ">";
+ mif += EOL + TAB + "<TextRectID " + textRectID + ">";
}
stream.write(mif.getBytes());
for (int i = 0; i < content.size(); i++) {
final Object elem = content.get(i);
if (elem instanceof String) {
// Output newlines as char hard return
- if (elem.equals("\n")) {
- mif = "\n<Char HardReturn>";
+ if (elem.equals(EOL)) {
+ mif = EOL + "<Char HardReturn>";
} else {
- mif = "\n\t<String `" + mifEncode((String) elem) + "'>";
+ mif = EOL + TAB + "<String `" + mifEncode((String) elem)
+ + "'>";
}
stream.write(mif.getBytes());
} else if (elem instanceof Frame) {
- mif = "\n\t<AFrame " + ((Frame) elem).getID() + " >";
+ mif = EOL + TAB + "<AFrame " + ((Frame) elem).getID()
+ + " >";
stream.write(mif.getBytes());
} else if (elem instanceof Tbl) {
- mif = "\n\t<ATbl " + ((Tbl) elem).getID() + " >";
+ mif = EOL + TAB + "<ATbl " + ((Tbl) elem).getID() + " >";
stream.write(mif.getBytes());
}
}
- mif = "\n> #End ParaLine";
+ mif = EOL + "> #End ParaLine";
stream.write(mif.getBytes());
}
@@ -617,8 +633,12 @@
public PgfCatalog() { }
public void output(final OutputStream stream) throws IOException {
- final String mif = "\n<PgfCatalog" + "\n<Pgf" + "\n<PgfTag `Body'>"
- + "\n>" + "\n>";
+ final String mif = EOL
+ + "<PgfCatalog" + EOL
+ + "<Pgf" + EOL
+ + "<PgfTag `Body'>" + EOL
+ + ">" + EOL
+ + ">";
stream.write(mif.getBytes());
}
@@ -661,14 +681,15 @@
public void output(final OutputStream stream) throws IOException {
- String mif = "\n<Ruling \n<RulingTag `Default'>";
- mif += "\n<RulingPenWidth " + penWidth + ">";
- mif += "\n<RulingPen " + pen + ">";
- mif += "\n<RulingLines " + lines + ">";
- mif += "\n>";
+ String mif = EOL
+ + "<Ruling" + EOL
+ + "<RulingTag `Default'>" + EOL;
+ mif += "<RulingPenWidth " + penWidth + ">" + EOL;
+ mif += "<RulingPen " + pen + ">" + EOL;
+ mif += "<RulingLines " + lines + ">" + EOL;
+ mif += ">";
stream.write(mif.getBytes());
}
-
}
/**
@@ -688,12 +709,12 @@
public void output(final OutputStream stream) throws IOException {
- String mif = "\n<RulingCatalog";
+ String mif = EOL + "<RulingCatalog";
stream.write(mif.getBytes());
for (int i = 0; i < ruling.size(); i++) {
((Ruling) ruling.get(i)).output(stream);
}
- mif = "\n> #End RulingCatalog";
+ mif = EOL + "> #End RulingCatalog";
stream.write(mif.getBytes());
}
@@ -750,7 +771,8 @@
public void output(final OutputStream stream) throws IOException {
- final String mif = "\n\t<TblColumnWidth " + width + " >";
+ final String mif = EOL + TAB + "<TblColumnWidth " + width
+ + " >";
stream.write(mif.getBytes());
}
@@ -785,13 +807,14 @@
public void output(final OutputStream stream)
throws IOException {
- String mif = "\n\t\t<Cell" + "\n\t\t<CellContent";
+ String mif = EOL + TAB + TAB + "<Cell" + EOL
+ + TAB + TAB + "<CellContent";
stream.write(mif.getBytes());
for (int i = 0; i < paras.size(); i++) {
((Para) paras.get(i)).output(stream);
}
- mif = "\n\t\t> #End CellContent";
- mif += "\n\t> #End Cell";
+ mif = EOL + TAB + TAB + "> #End CellContent";
+ mif += EOL + TAB + "> #End Cell";
stream.write(mif.getBytes());
}
}
@@ -805,12 +828,12 @@
}
public void output(final OutputStream stream) throws IOException {
- String mif = "\n\t<Row";
+ String mif = EOL + TAB + "<Row";
stream.write(mif.getBytes());
for (int i = 0; i < cells.size(); i++) {
((Cell) cells.get(i)).output(stream);
}
- mif = "\n\t> #End Row";
+ mif = EOL + TAB + "> #End Row";
stream.write(mif.getBytes());
}
}
@@ -866,19 +889,20 @@
public void output(final OutputStream stream) throws IOException {
- String mif = "\n<Tbl" + "\n\t<TblID " + id + " >";
+ String mif = EOL + "<Tbl" + EOL + TAB + "<TblID " + id + " >" + EOL;
// note tbl format to be added in a later release
- mif += "\n<TblTag Body>" + "\n<TblFormat";
- mif += "\n<TblColumnRuling `Default'>";
- mif += "\n<TblBodyRowRuling `Default'>";
- mif += "\n<TblLRuling `Default'>";
- mif += "\n<TblBRuling `Default'>";
- mif += "\n<TblRRuling `Default'>";
- mif += "\n<TblTRuling `Default'>";
+ mif += "<TblTag Body>" + EOL;
+ mif += "<TblFormat" + EOL;
+ mif += "<TblColumnRuling `Default'>" + EOL;
+ mif += "<TblBodyRowRuling `Default'>" + EOL;
+ mif += "<TblLRuling `Default'>" + EOL;
+ mif += "<TblBRuling `Default'>" + EOL;
+ mif += "<TblRRuling `Default'>" + EOL;
+ mif += "<TblTRuling `Default'>" + EOL;
- mif += "\n> #End TblFormat";
- mif += "\n\t<TblNumColumns " + tblColumns.size() + " >";
+ mif += "> #End TblFormat" + EOL;
+ mif += TAB + "<TblNumColumns " + tblColumns.size() + " >";
stream.write(mif.getBytes());
if (!tblHead.isEmpty()) {
@@ -892,14 +916,14 @@
}
}
if (!tblBody.isEmpty()) {
- mif = "\n\t<TblBody";
+ mif = EOL + TAB + "<TblBody";
stream.write(mif.getBytes());
for (int i = 0; i < tblBody.size(); i++) {
((Row) tblBody.get(i)).output(stream);
}
- mif = "\n\t> #End tblBody";
+ mif = EOL + TAB + "> #End tblBody";
}
- mif += "\n> #End Table";
+ mif += EOL + "> #End Table";
stream.write(mif.getBytes());
}
@@ -993,29 +1017,29 @@
}
public void output(final OutputStream stream) throws IOException {
- String mif = "<MIFFile 5.00>" + "\n<Units Upt>";
+ String mif = "<MIFFile 5.00>" + EOL + "<Units Upt>";
stream.write(mif.getBytes());
pgfCatalog.output(stream);
rulingCatalog.output(stream);
document.output(stream);
if (!aFrames.isEmpty()) {
- mif = "\n<AFrames";
+ mif = EOL + "<AFrames";
stream.write(mif.getBytes());
for (int i = 0; i < aFrames.size(); i++) {
((Frame) aFrames.get(i)).output(stream);
}
- mif = "\n>";
+ mif = EOL + ">";
stream.write(mif.getBytes());
}
if (!tables.isEmpty()) {
- mif = "\n<Tbls";
+ mif = EOL + "<Tbls";
stream.write(mif.getBytes());
for (int i = 0; i < tables.size(); i++) {
((Tbl) tables.get(i)).output(stream);
}
- mif = "\n>";
+ mif = EOL + ">";
stream.write(mif.getBytes());
}
@@ -1091,7 +1115,7 @@
public void startLine() {
if (curFlow.curPara().curParaLine() != null) {
- this.addToStream("\n");
+ this.addToStream(EOL);
curFlow.curPara().startParaLine();
} else {
curFlow.curPara().startParaLine();
Modified: trunk/foray/scripts/checkstyle-suppressions.xml
===================================================================
--- trunk/foray/scripts/checkstyle-suppressions.xml 2006-09-09 18:29:56 UTC (rev 8011)
+++ trunk/foray/scripts/checkstyle-suppressions.xml 2006-09-09 18:59:26 UTC (rev 8012)
@@ -22,8 +22,6 @@
<suppress checks="MagicNumber"
files="org.foray.hyphenR.*"/>
<suppress checks="MagicNumber"
- files="org.foray.mif.*"/>
- <suppress checks="MagicNumber"
files="org.foray.pdf.*"/>
<suppress checks="MagicNumber"
files="org.foray.pioneer.*"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-09 19:16:11
|
Revision: 8013
http://svn.sourceforge.net/foray/?rev=8013&view=rev
Author: victormote
Date: 2006-09-09 12:16:04 -0700 (Sat, 09 Sep 2006)
Log Message:
-----------
Remove magic numbers.
Modified Paths:
--------------
trunk/foray/foray-pretty/src/java/org/foray/pretty/FOrayPretty.java
trunk/foray/foray-pretty/src/java/org/foray/pretty/FOrayXDiff.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/foray-pretty/src/java/org/foray/pretty/FOrayPretty.java
===================================================================
--- trunk/foray/foray-pretty/src/java/org/foray/pretty/FOrayPretty.java 2006-09-09 18:59:26 UTC (rev 8012)
+++ trunk/foray/foray-pretty/src/java/org/foray/pretty/FOrayPretty.java 2006-09-09 19:16:04 UTC (rev 8013)
@@ -65,6 +65,14 @@
*/
public class FOrayPretty extends DefaultHandler2 {
+ public static final byte STATUS_WRONG_QTY_ARGUMENTS = 1;
+ public static final byte STATUS_FILE_NOT_FOUND = 2;
+ public static final byte STATUS_PARSING_ERROR = 3;
+
+ private static final byte DEFAULT_LINE_LENGTH = 80;
+ private static final byte MIN_CL_ARGUMENTS = 2;
+ private static final byte MAX_CL_ARGUMENTS = 3;
+
InputSource input;
OutputStream output;
@@ -124,7 +132,7 @@
private int indent = 2;
/** The maximum number of characters desired on each line. */
- private int desiredLineLength = 80;
+ private int desiredLineLength = DEFAULT_LINE_LENGTH;
/**
* Block elements are started on a new line. However, if they are inside
@@ -907,13 +915,17 @@
* Argument 2 is the location of the output file.
* Argument 3 is an optional location of an OASIS-compliant catalog file
* that can be used to locate local DTDs.
+ * Return status is one of 0 (success),
+ * 1 (wrong quantity of arguments),
+ * 2 (file not found), or
+ * 3 (parsing error).
*/
public static void main(final String[] args) {
if (args == null
- || args.length < 2
- || args.length > 3) {
+ || args.length < MIN_CL_ARGUMENTS
+ || args.length > MAX_CL_ARGUMENTS) {
System.out.print("Wrong number of arguments.");
- System.exit(1);
+ System.exit(STATUS_WRONG_QTY_ARGUMENTS);
}
final String input = args[0];
final String output = args[1];
@@ -928,7 +940,7 @@
inputStream = new BufferedInputStream(fis);
} catch (final FileNotFoundException e) {
System.err.println("File not found: " + input);
- System.exit(2);
+ System.exit(STATUS_FILE_NOT_FOUND);
}
final InputSource inputSource = new InputSource(inputStream);
OutputStream outputStream = null;
@@ -937,7 +949,7 @@
outputStream = new BufferedOutputStream(fos);
} catch (final FileNotFoundException e1) {
System.err.println("File not found: " + output);
- System.exit(3);
+ System.exit(STATUS_FILE_NOT_FOUND);
}
final FOrayPretty processor = new FOrayPretty(inputSource, outputStream,
catalog);
@@ -946,7 +958,7 @@
} catch (final Exception e) {
System.out.print("Error parsing input.");
e.printStackTrace();
- System.exit(4);
+ System.exit(STATUS_PARSING_ERROR);
}
}
Modified: trunk/foray/foray-pretty/src/java/org/foray/pretty/FOrayXDiff.java
===================================================================
--- trunk/foray/foray-pretty/src/java/org/foray/pretty/FOrayXDiff.java 2006-09-09 18:59:26 UTC (rev 8012)
+++ trunk/foray/foray-pretty/src/java/org/foray/pretty/FOrayXDiff.java 2006-09-09 19:16:04 UTC (rev 8013)
@@ -54,6 +54,11 @@
*/
public class FOrayXDiff {
+ public static final byte STATUS_SUCCESS = 0;
+ public static final byte STATUS_MALFORMED_URL = 1;
+ public static final byte STATUS_PARSING_ERROR = 2;
+ public static final byte STATUS_DIFFERENCE_FOUND = 3;
+
private XMLStreamReader[] readers;
/** Caches the best description that we can find of the input source for
@@ -484,6 +489,10 @@
/**
* Command-line interface for {@link FOrayXDiff}.
+ * Return values are 0 (success, no differences found),
+ * 1 (malformed URL),
+ * 2 (parsing error),
+ * and 3 (differences found between the two input files).
* @param args Two or more URLs that should be compared.
*/
public static void main(final String[] args) {
@@ -500,7 +509,7 @@
url = URLFactory.createURL(context, args[i]);
} catch (final MalformedURLException e) {
System.out.println("Malformed URL: " + args[i]);
- System.exit(1);
+ System.exit(STATUS_MALFORMED_URL);
}
urlsToCompare[i] = url;
}
@@ -509,15 +518,15 @@
final boolean equivalent = processor.equivalent();
if (equivalent) {
System.out.println("All XML Streams are equivalent.");
- System.exit(0);
+ System.exit(STATUS_SUCCESS);
} else {
System.out.println("Differences(s) in XML Streams found.");
- System.exit(3);
+ System.exit(STATUS_DIFFERENCE_FOUND);
}
} catch (final Exception e) {
System.out.println("Error parsing input.");
System.out.println(e.getMessage());
- System.exit(2);
+ System.exit(STATUS_PARSING_ERROR);
}
}
Modified: trunk/foray/scripts/checkstyle-suppressions.xml
===================================================================
--- trunk/foray/scripts/checkstyle-suppressions.xml 2006-09-09 18:59:26 UTC (rev 8012)
+++ trunk/foray/scripts/checkstyle-suppressions.xml 2006-09-09 19:16:04 UTC (rev 8013)
@@ -26,8 +26,6 @@
<suppress checks="MagicNumber"
files="org.foray.pioneer.*"/>
<suppress checks="MagicNumber"
- files="org.foray.pretty.*"/>
- <suppress checks="MagicNumber"
files="org.foray.ps.*"/>
<suppress checks="MagicNumber"
files="org.foray.render.*"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-09 19:23:00
|
Revision: 8014
http://svn.sourceforge.net/foray/?rev=8014&view=rev
Author: victormote
Date: 2006-09-09 12:22:54 -0700 (Sat, 09 Sep 2006)
Log Message:
-----------
Remove magic numbers.
Modified Paths:
--------------
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2006-09-09 19:16:04 UTC (rev 8013)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2006-09-09 19:22:54 UTC (rev 8014)
@@ -43,12 +43,13 @@
*/
public class BlockPL extends FObjMixedPL {
+ private static final int DEFAULT_LOOPS_ALLOWED = 50;
// this may be helpful on other FOs too
private boolean anythingLaidOut = false;
//Added to see how long it's been since nothing was laid out.
private int noLayoutCount = 0;
- private int infLoopThreshhold = 50;
+ private int infLoopThreshhold = DEFAULT_LOOPS_ALLOWED;
private boolean breakStatusBeforeChecked = false;
private LineArea currentLineArea;
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-09-09 19:16:04 UTC (rev 8013)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-09-09 19:22:54 UTC (rev 8014)
@@ -215,7 +215,7 @@
protected int layoutInlineContent(final FObj node, LineArea lineArea,
final FOContext foContext) throws AreaWException {
if (! (node instanceof FOLineNonText)) {
- return -1000;
+ return Integer.MIN_VALUE;
}
final FOLineNonText nonText = (FOLineNonText) node;
// this should start a new page
Modified: trunk/foray/scripts/checkstyle-suppressions.xml
===================================================================
--- trunk/foray/scripts/checkstyle-suppressions.xml 2006-09-09 19:16:04 UTC (rev 8013)
+++ trunk/foray/scripts/checkstyle-suppressions.xml 2006-09-09 19:22:54 UTC (rev 8014)
@@ -24,8 +24,6 @@
<suppress checks="MagicNumber"
files="org.foray.pdf.*"/>
<suppress checks="MagicNumber"
- files="org.foray.pioneer.*"/>
- <suppress checks="MagicNumber"
files="org.foray.ps.*"/>
<suppress checks="MagicNumber"
files="org.foray.render.*"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-09 21:48:31
|
Revision: 8019
http://svn.sourceforge.net/foray/?rev=8019&view=rev
Author: victormote
Date: 2006-09-09 14:48:03 -0700 (Sat, 09 Sep 2006)
Log Message:
-----------
Fix build scripts to handle new checkstyle classpath requirements.
Modified Paths:
--------------
trunk/foray/foray-app/scripts/build.xml
trunk/foray/foray-areatree/scripts/build.xml
trunk/foray/foray-common/scripts/build.xml
trunk/foray/foray-core/scripts/build.xml
trunk/foray/foray-font/scripts/build.xml
trunk/foray/foray-fotree/scripts/build.xml
trunk/foray/foray-graphic/scripts/build.xml
trunk/foray/foray-hyphen-r/scripts/build.xml
trunk/foray/foray-layout/scripts/build.xml
trunk/foray/foray-mif/scripts/build.xml
trunk/foray/foray-output/scripts/build.xml
trunk/foray/foray-pdf/scripts/build.xml
trunk/foray/foray-pioneer/scripts/build.xml
trunk/foray/foray-pretty/scripts/build.xml
trunk/foray/foray-ps/scripts/build.xml
trunk/foray/foray-render/scripts/build.xml
trunk/foray/foray-text/scripts/build.xml
Modified: trunk/foray/foray-app/scripts/build.xml
===================================================================
--- trunk/foray/foray-app/scripts/build.xml 2006-09-09 20:42:38 UTC (rev 8018)
+++ trunk/foray/foray-app/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
@@ -133,7 +133,7 @@
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
- <target name="package" depends="compile, style"
+ <target name="package" depends="compile"
description="Generates the jar files (default target)">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
@@ -185,7 +185,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="init" description="Runs checkstyle"
+ <target name="style" depends="package" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
Modified: trunk/foray/foray-areatree/scripts/build.xml
===================================================================
--- trunk/foray/foray-areatree/scripts/build.xml 2006-09-09 20:42:38 UTC (rev 8018)
+++ trunk/foray/foray-areatree/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
@@ -96,7 +96,7 @@
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
- <target name="package" depends="compile, style"
+ <target name="package" depends="compile"
description="Generates the jar files (default target)">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
@@ -153,7 +153,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="init" description="Runs checkstyle"
+ <target name="style" depends="package" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -165,6 +165,12 @@
</taskdef>
<checkstyle config="../../scripts/checkstyle-config.xml">
<fileset dir="${src.dir}" includes="**/*.java"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <fileset dir="${build.dir}">
+ <include name="${name}-${module}.jar"/>
+ </fileset>
+ </classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-common/scripts/build.xml
===================================================================
--- trunk/foray/foray-common/scripts/build.xml 2006-09-09 20:42:38 UTC (rev 8018)
+++ trunk/foray/foray-common/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
@@ -96,7 +96,7 @@
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
- <target name="package" depends="compile, style"
+ <target name="package" depends="compile"
description="Generates the jar files (default target)">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
@@ -153,7 +153,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="init" description="Runs checkstyle"
+ <target name="style" depends="package" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
Modified: trunk/foray/foray-core/scripts/build.xml
===================================================================
--- trunk/foray/foray-core/scripts/build.xml 2006-09-09 20:42:38 UTC (rev 8018)
+++ trunk/foray/foray-core/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
@@ -94,7 +94,7 @@
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
- <target name="package" depends="compile, style"
+ <target name="package" depends="compile"
description="Generates the jar files (default target)">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
@@ -163,6 +163,12 @@
</taskdef>
<checkstyle config="../../scripts/checkstyle-config.xml">
<fileset dir="${src.dir}" includes="**/*.java"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <fileset dir="${build.dir}">
+ <include name="${name}-${module}.jar"/>
+ </fileset>
+ </classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-font/scripts/build.xml
===================================================================
--- trunk/foray/foray-font/scripts/build.xml 2006-09-09 20:42:38 UTC (rev 8018)
+++ trunk/foray/foray-font/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
@@ -106,7 +106,7 @@
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
- <target name="package" depends="compile, style"
+ <target name="package" depends="compile"
description="Generates the jar files (default target)">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
@@ -163,7 +163,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="init" description="Runs checkstyle"
+ <target name="style" depends="package" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -175,6 +175,12 @@
</taskdef>
<checkstyle config="../../scripts/checkstyle-config.xml">
<fileset dir="${src.dir}" includes="**/*.java"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <fileset dir="${build.dir}">
+ <include name="${name}-${module}.jar"/>
+ </fileset>
+ </classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-fotree/scripts/build.xml
===================================================================
--- trunk/foray/foray-fotree/scripts/build.xml 2006-09-09 20:42:38 UTC (rev 8018)
+++ trunk/foray/foray-fotree/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
@@ -104,7 +104,7 @@
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
- <target name="package" depends="compile, style"
+ <target name="package" depends="compile"
description="Generates the jar files (default target)">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
@@ -161,7 +161,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="init" description="Runs checkstyle"
+ <target name="style" depends="package" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -173,6 +173,12 @@
</taskdef>
<checkstyle config="../../scripts/checkstyle-config.xml">
<fileset dir="${src.dir}" includes="**/*.java"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <fileset dir="${build.dir}">
+ <include name="${name}-${module}.jar"/>
+ </fileset>
+ </classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-graphic/scripts/build.xml
===================================================================
--- trunk/foray/foray-graphic/scripts/build.xml 2006-09-09 20:42:38 UTC (rev 8018)
+++ trunk/foray/foray-graphic/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
@@ -147,7 +147,7 @@
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
- <target name="package" depends="compile, style"
+ <target name="package" depends="compile"
description="Generates the jar files (default target)">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
@@ -204,7 +204,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="init" description="Runs checkstyle"
+ <target name="style" depends="package" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -216,6 +216,12 @@
</taskdef>
<checkstyle config="../../scripts/checkstyle-config.xml">
<fileset dir="${src.dir}" includes="**/*.java"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <fileset dir="${build.dir}">
+ <include name="${name}-${module}.jar"/>
+ </fileset>
+ </classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-hyphen-r/scripts/build.xml
===================================================================
--- trunk/foray/foray-hyphen-r/scripts/build.xml 2006-09-09 20:42:38 UTC (rev 8018)
+++ trunk/foray/foray-hyphen-r/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
@@ -119,7 +119,7 @@
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
- <target name="package" depends="compile, style, hyphenation"
+ <target name="package" depends="compile, hyphenation"
description="Generates the jar files (default target)">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
@@ -184,7 +184,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="init" description="Runs checkstyle"
+ <target name="style" depends="package" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -196,6 +196,12 @@
</taskdef>
<checkstyle config="../../scripts/checkstyle-config.xml">
<fileset dir="${src.dir}" includes="**/*.java"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <fileset dir="${build.dir}">
+ <include name="${name}-${module}.jar"/>
+ </fileset>
+ </classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-layout/scripts/build.xml
===================================================================
--- trunk/foray/foray-layout/scripts/build.xml 2006-09-09 20:42:38 UTC (rev 8018)
+++ trunk/foray/foray-layout/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
@@ -93,7 +93,7 @@
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
- <target name="package" depends="compile, style"
+ <target name="package" depends="compile"
description="Generates the jar files (default target)">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
@@ -150,7 +150,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="init" description="Runs checkstyle"
+ <target name="style" depends="package" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -162,6 +162,12 @@
</taskdef>
<checkstyle config="../../scripts/checkstyle-config.xml">
<fileset dir="${src.dir}" includes="**/*.java"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <fileset dir="${build.dir}">
+ <include name="${name}-${module}.jar"/>
+ </fileset>
+ </classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-mif/scripts/build.xml
===================================================================
--- trunk/foray/foray-mif/scripts/build.xml 2006-09-09 20:42:38 UTC (rev 8018)
+++ trunk/foray/foray-mif/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
@@ -92,7 +92,7 @@
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
- <target name="package" depends="compile, style"
+ <target name="package" depends="compile"
description="Generates the jar files (default target)">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
@@ -149,7 +149,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="init" description="Runs checkstyle"
+ <target name="style" depends="package" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
Modified: trunk/foray/foray-output/scripts/build.xml
===================================================================
--- trunk/foray/foray-output/scripts/build.xml 2006-09-09 20:42:38 UTC (rev 8018)
+++ trunk/foray/foray-output/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
@@ -105,7 +105,7 @@
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
- <target name="package" depends="compile, style"
+ <target name="package" depends="compile"
description="Generates the jar files (default target)">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
@@ -162,7 +162,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="init" description="Runs checkstyle"
+ <target name="style" depends="package" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
Modified: trunk/foray/foray-pdf/scripts/build.xml
===================================================================
--- trunk/foray/foray-pdf/scripts/build.xml 2006-09-09 20:42:38 UTC (rev 8018)
+++ trunk/foray/foray-pdf/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
@@ -96,7 +96,7 @@
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
- <target name="package" depends="compile, style"
+ <target name="package" depends="compile"
description="Generates the jar files (default target)">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
@@ -153,7 +153,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="init" description="Runs checkstyle"
+ <target name="style" depends="package" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -165,6 +165,12 @@
</taskdef>
<checkstyle config="../../scripts/checkstyle-config.xml">
<fileset dir="${src.dir}" includes="**/*.java"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <fileset dir="${build.dir}">
+ <include name="${name}-${module}.jar"/>
+ </fileset>
+ </classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-pioneer/scripts/build.xml
===================================================================
--- trunk/foray/foray-pioneer/scripts/build.xml 2006-09-09 20:42:38 UTC (rev 8018)
+++ trunk/foray/foray-pioneer/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
@@ -99,7 +99,7 @@
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
- <target name="package" depends="compile, style"
+ <target name="package" depends="compile"
description="Generates the jar files (default target)">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
@@ -156,7 +156,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="init" description="Runs checkstyle"
+ <target name="style" depends="package" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -168,6 +168,12 @@
</taskdef>
<checkstyle config="../../scripts/checkstyle-config.xml">
<fileset dir="${src.dir}" includes="**/*.java"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <fileset dir="${build.dir}">
+ <include name="${name}-${module}.jar"/>
+ </fileset>
+ </classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-pretty/scripts/build.xml
===================================================================
--- trunk/foray/foray-pretty/scripts/build.xml 2006-09-09 20:42:38 UTC (rev 8018)
+++ trunk/foray/foray-pretty/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
@@ -96,7 +96,7 @@
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
- <target name="package" depends="compile, style"
+ <target name="package" depends="compile"
description="Generates the jar files (default target)">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
@@ -153,7 +153,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="init" description="Runs checkstyle"
+ <target name="style" depends="package" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -165,6 +165,9 @@
</taskdef>
<checkstyle config="../../scripts/checkstyle-config.xml">
<fileset dir="${src.dir}" includes="**/*.java"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ </classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-ps/scripts/build.xml
===================================================================
--- trunk/foray/foray-ps/scripts/build.xml 2006-09-09 20:42:38 UTC (rev 8018)
+++ trunk/foray/foray-ps/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
@@ -99,7 +99,7 @@
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
- <target name="package" depends="compile, style"
+ <target name="package" depends="compile"
description="Generates the jar files (default target)">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
@@ -156,7 +156,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="init" description="Runs checkstyle"
+ <target name="style" depends="package" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -172,6 +172,12 @@
<!-- The GlyphList classes cause checkstyle to exceed stack limits. -->
<exclude name="**/GlyphListAGL*.java"/>
</fileset>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <fileset dir="${build.dir}">
+ <include name="${name}-${module}.jar"/>
+ </fileset>
+ </classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-render/scripts/build.xml
===================================================================
--- trunk/foray/foray-render/scripts/build.xml 2006-09-09 20:42:38 UTC (rev 8018)
+++ trunk/foray/foray-render/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
@@ -116,7 +116,7 @@
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
- <target name="package" depends="compile, style"
+ <target name="package" depends="compile"
description="Generates the jar files (default target)">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
@@ -173,7 +173,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="init" description="Runs checkstyle"
+ <target name="style" depends="package" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -185,6 +185,12 @@
</taskdef>
<checkstyle config="../../scripts/checkstyle-config.xml">
<fileset dir="${src.dir}" includes="**/*.java"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <fileset dir="${build.dir}">
+ <include name="${name}-${module}.jar"/>
+ </fileset>
+ </classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-text/scripts/build.xml
===================================================================
--- trunk/foray/foray-text/scripts/build.xml 2006-09-09 20:42:38 UTC (rev 8018)
+++ trunk/foray/foray-text/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
@@ -102,7 +102,7 @@
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
- <target name="package" depends="compile, style"
+ <target name="package" depends="compile"
description="Generates the jar files (default target)">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
@@ -167,7 +167,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="init" description="Runs checkstyle"
+ <target name="style" depends="package" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -179,6 +179,12 @@
</taskdef>
<checkstyle config="../../scripts/checkstyle-config.xml">
<fileset dir="${src.dir}" includes="**/*.java"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <fileset dir="${build.dir}">
+ <include name="${name}-${module}.jar"/>
+ </fileset>
+ </classpath>
</checkstyle>
</target>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-09 22:56:50
|
Revision: 8020
http://svn.sourceforge.net/foray/?rev=8020&view=rev
Author: victormote
Date: 2006-09-09 15:56:43 -0700 (Sat, 09 Sep 2006)
Log Message:
-----------
Fix build problems.
Modified Paths:
--------------
trunk/foray/foray-app/scripts/build.xml
trunk/foray/foray-core/scripts/build.xml
trunk/foray/scripts/build.xml
Modified: trunk/foray/foray-app/scripts/build.xml
===================================================================
--- trunk/foray/foray-app/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
+++ trunk/foray/foray-app/scripts/build.xml 2006-09-09 22:56:43 UTC (rev 8020)
@@ -197,6 +197,9 @@
</taskdef>
<checkstyle config="../../scripts/checkstyle-config.xml">
<fileset dir="${src.dir}" includes="**/*.java"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ </classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-core/scripts/build.xml
===================================================================
--- trunk/foray/foray-core/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
+++ trunk/foray/foray-core/scripts/build.xml 2006-09-09 22:56:43 UTC (rev 8020)
@@ -151,7 +151,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="init" description="Runs checkstyle"
+ <target name="style" depends="package" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
Modified: trunk/foray/scripts/build.xml
===================================================================
--- trunk/foray/scripts/build.xml 2006-09-09 21:48:03 UTC (rev 8019)
+++ trunk/foray/scripts/build.xml 2006-09-09 22:56:43 UTC (rev 8020)
@@ -562,7 +562,7 @@
<property name="module.common" value="common"/>
<ant antfile="${foray.home}/foray-common/scripts/build.xml"
inheritall="false"
- target="package">
+ target="style">
<property name="foray.config" value="${foray.config}"/>
</ant>
</target>
@@ -575,7 +575,7 @@
<property name="module.pretty" value=", pretty"/>
<ant antfile="${foray.home}/foray-pretty/scripts/build.xml"
inheritall="false"
- target="package">
+ target="style">
<property name="foray.config" value="${foray.config}"/>
</ant>
</target>
@@ -588,7 +588,7 @@
<property name="module.ps" value=", ps"/>
<ant antfile="${foray.home}/foray-ps/scripts/build.xml"
inheritall="false"
- target="package">
+ target="style">
<property name="foray.config" value="${foray.config}"/>
</ant>
</target>
@@ -601,7 +601,7 @@
<property name="module.graphic" value=", graphic"/>
<ant antfile="${foray.home}/foray-graphic/scripts/build.xml"
inheritall="false"
- target="package">
+ target="style">
<property name="foray.config" value="${foray.config}"/>
</ant>
</target>
@@ -614,7 +614,7 @@
<property name="module.mif" value=", mif"/>
<ant antfile="${foray.home}/foray-mif/scripts/build.xml"
inheritall="false"
- target="package">
+ target="style">
<property name="foray.config" value="${foray.config}"/>
</ant>
</target>
@@ -627,7 +627,7 @@
<property name="module.font" value=", font"/>
<ant antfile="${foray.home}/foray-font/scripts/build.xml"
inheritall="false"
- target="package">
+ target="style">
<property name="foray.config" value="${foray.config}"/>
</ant>
</target>
@@ -640,7 +640,7 @@
<property name="module.hyphen" value=", hyphen"/>
<ant antfile="${foray.home}/foray-hyphen-r/scripts/build.xml"
inheritall="false"
- target="package">
+ target="style">
<property name="foray.config" value="${foray.config}"/>
</ant>
</target>
@@ -653,7 +653,7 @@
<property name="module.text" value=", text"/>
<ant antfile="${foray.home}/foray-text/scripts/build.xml"
inheritall="false"
- target="package">
+ target="style">
<property name="foray.config" value="${foray.config}"/>
</ant>
</target>
@@ -666,7 +666,7 @@
<property name="module.pdf" value=", pdf"/>
<ant antfile="${foray.home}/foray-pdf/scripts/build.xml"
inheritall="false"
- target="package">
+ target="style">
<property name="foray.config" value="${foray.config}"/>
</ant>
</target>
@@ -679,7 +679,7 @@
<property name="module.fotree" value=", fotree"/>
<ant antfile="${foray.home}/foray-fotree/scripts/build.xml"
inheritall="false"
- target="package">
+ target="style">
<property name="foray.config" value="${foray.config}"/>
</ant>
</target>
@@ -692,7 +692,7 @@
<property name="module.areatree" value=", areatree"/>
<ant antfile="${foray.home}/foray-areatree/scripts/build.xml"
inheritall="false"
- target="package">
+ target="style">
<property name="foray.config" value="${foray.config}"/>
</ant>
</target>
@@ -704,7 +704,7 @@
<property name="module.output" value=", output"/>
<ant antfile="${foray.home}/foray-output/scripts/build.xml"
inheritall="false"
- target="package">
+ target="style">
<property name="foray.config" value="${foray.config}"/>
</ant>
</target>
@@ -716,7 +716,7 @@
<property name="module.layout" value=", layout"/>
<ant antfile="${foray.home}/foray-layout/scripts/build.xml"
inheritall="false"
- target="package">
+ target="style">
<property name="foray.config" value="${foray.config}"/>
</ant>
</target>
@@ -729,7 +729,7 @@
<property name="module.pioneer" value=", pioneer"/>
<ant antfile="${foray.home}/foray-pioneer/scripts/build.xml"
inheritall="false"
- target="package">
+ target="style">
<property name="foray.config" value="${foray.config}"/>
</ant>
</target>
@@ -742,7 +742,7 @@
<property name="module.render" value=", render"/>
<ant antfile="${foray.home}/foray-render/scripts/build.xml"
inheritall="false"
- target="package">
+ target="style">
<property name="foray.config" value="${foray.config}"/>
</ant>
</target>
@@ -755,7 +755,7 @@
<property name="module.core" value=", core"/>
<ant antfile="${foray.home}/foray-core/scripts/build.xml"
inheritall="false"
- target="package">
+ target="style">
<property name="foray.config" value="${foray.config}"/>
</ant>
</target>
@@ -769,7 +769,7 @@
<property name="file.subset" value=""/>
<ant antfile="${foray.home}/foray-app/scripts/build.xml"
inheritall="false"
- target="package">
+ target="style">
<property name="foray.config" value="${foray.config}"/>
</ant>
</target>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-11 01:56:56
|
Revision: 8048
http://svn.sourceforge.net/foray/?rev=8048&view=rev
Author: victormote
Date: 2006-09-10 18:56:21 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
Enforce "RequireThis" checkstyle check.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/FOrayConsumerFont.java
trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
trunk/foray/foray-font/src/java/org/foray/font/FOrayFontConsumer.java
trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
trunk/foray/foray-font/src/java/org/foray/font/FSTrueTypeFont.java
trunk/foray/foray-font/src/java/org/foray/font/FSType1Font.java
trunk/foray/foray-font/src/java/org/foray/font/FontConfig.java
trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java
trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java
trunk/foray/foray-font/src/java/org/foray/font/RegisteredFont.java
trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java
trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java
trunk/foray/foray-font/src/java/org/foray/font/charset/CharSet.java
trunk/foray/foray-font/src/java/org/foray/font/charset/CharSetParser.java
trunk/foray/foray-font/src/java/org/foray/font/format/FontFile.java
trunk/foray/foray-font/src/java/org/foray/font/format/FontFileReader.java
trunk/foray/foray-font/src/java/org/foray/font/format/Kerning.java
trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFile.java
trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFileAFM.java
trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFilePFM.java
trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFileReader.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTCTableHeader.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFFileCollection.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFFont.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFMtxEntry.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFReader.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTable.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableDirEntry.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableDirectory.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableHEAD.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableHHEA.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableHMTX.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableKERN.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableLOCA.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableMAXP.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableNAME.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableOS2.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTablePCLT.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTablePOST.java
trunk/foray/foray-font/src/java/org/foray/font/format/Type1File.java
trunk/foray/foray-font/src/java/org/foray/font/format/Type1PFAFile.java
trunk/foray/foray-font/src/java/org/foray/font/format/Type1PFBFile.java
trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontOutput.java
trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontPDF.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayConsumerFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayConsumerFont.java 2006-09-11 01:55:14 UTC (rev 8047)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayConsumerFont.java 2006-09-11 01:56:21 UTC (rev 8048)
@@ -113,7 +113,7 @@
protected void optimize() {
if (this.subset != null) {
- subset.sortUsedGlyphs();
+ this.subset.sortUsedGlyphs();
}
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2006-09-11 01:55:14 UTC (rev 8047)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2006-09-11 01:56:21 UTC (rev 8048)
@@ -196,7 +196,7 @@
* {@inheritDoc}
*/
public byte getFontComplexity() {
- return fontComplexity;
+ return this.fontComplexity;
}
/**
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontConsumer.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontConsumer.java 2006-09-11 01:55:14 UTC (rev 8047)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontConsumer.java 2006-09-11 01:56:21 UTC (rev 8048)
@@ -68,9 +68,9 @@
public static final byte ENCODING_ANY = 3;
private static final byte[] VALID_ENCODING_LATITUDES = {
- ENCODING_INTERNAL_ONLY,
- ENCODING_SPECIFIED_ONLY,
- ENCODING_ANY
+ FOrayFontConsumer.ENCODING_INTERNAL_ONLY,
+ FOrayFontConsumer.ENCODING_SPECIFIED_ONLY,
+ FOrayFontConsumer.ENCODING_ANY
};
/** The server that should be used to by this FontConsumer. */
@@ -103,7 +103,7 @@
*/
private HashMap usedFonts = new HashMap();
- private byte encodingLatitude = ENCODING_ANY;
+ private byte encodingLatitude = FOrayFontConsumer.ENCODING_ANY;
/** The FontSelection instance to be used for font-selection-strategy =
* "character-by-character". */
@@ -393,7 +393,7 @@
final FOrayFont[] usedFontsToReturn =
new FOrayFont[this.usedFonts.size()];
int index = 0;
- final Iterator iterator = usedFonts.keySet().iterator();
+ final Iterator iterator = this.usedFonts.keySet().iterator();
while (iterator.hasNext()) {
final FOrayFont realFont = (FOrayFont) iterator.next();
usedFontsToReturn[index] = realFont;
@@ -443,10 +443,10 @@
*/
protected FOrayConsumerFont registerFontUse(final FOrayFont font) {
FOrayConsumerFont consumerFont =
- (FOrayConsumerFont) usedFonts.get(font);
+ (FOrayConsumerFont) this.usedFonts.get(font);
if (consumerFont == null) {
consumerFont = new FOrayConsumerFont(font, this);
- usedFonts.put(font, consumerFont);
+ this.usedFonts.put(font, consumerFont);
}
return consumerFont;
}
@@ -455,11 +455,11 @@
* {@inheritDoc}
*/
public void optimizeFonts() {
- final Iterator iter = usedFonts.keySet().iterator();
+ final Iterator iter = this.usedFonts.keySet().iterator();
while (iter.hasNext()) {
final Object obj = iter.next();
final FOrayConsumerFont consumerFont = (FOrayConsumerFont)
- usedFonts.get(obj);
+ this.usedFonts.get(obj);
consumerFont.optimize();
}
}
@@ -472,7 +472,7 @@
*/
public FOrayConsumerFont getConsumerFont(final FOrayFont font) {
FOrayConsumerFont consumerFont =
- (FOrayConsumerFont) usedFonts.get(font);
+ (FOrayConsumerFont) this.usedFonts.get(font);
if (consumerFont != null) {
return consumerFont;
}
@@ -487,12 +487,14 @@
* {@link #ENCODING_ANY}.
*/
public byte getEncodingLatitude() {
- return encodingLatitude;
+ return this.encodingLatitude;
}
private boolean validEncodingLatitude(final int encodingLatitude) {
- for (int i = 0; i < VALID_ENCODING_LATITUDES.length; i++) {
- if (encodingLatitude == VALID_ENCODING_LATITUDES[i]) {
+ for (int i = 0; i < FOrayFontConsumer.VALID_ENCODING_LATITUDES.length;
+ i++) {
+ if (encodingLatitude
+ == FOrayFontConsumer.VALID_ENCODING_LATITUDES[i]) {
return true;
}
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2006-09-11 01:55:14 UTC (rev 8047)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2006-09-11 01:56:21 UTC (rev 8048)
@@ -248,12 +248,12 @@
*/
public void setBaseURL(final URL url) {
/* If not already set, set it */
- if (baseURL == null) {
- baseURL = url;
+ if (this.baseURL == null) {
+ this.baseURL = url;
return;
}
/* If already set, and not changing it here, ignore it */
- if (baseURL == url) {
+ if (this.baseURL == url) {
return;
}
/* Otherwise warn the client that the change has been ignored */
@@ -261,7 +261,7 @@
}
protected URL getBaseURL() {
- return baseURL;
+ return this.baseURL;
}
/**
@@ -270,12 +270,12 @@
*/
public void setBaseFontURL(final URL url) {
/* If not already set, set it */
- if (baseFontURL == null) {
- baseFontURL = url;
+ if (this.baseFontURL == null) {
+ this.baseFontURL = url;
return;
}
/* If already set, and not changing it here, ignore it */
- if (baseFontURL == url) {
+ if (this.baseFontURL == url) {
return;
}
/* Otherwise warn the client that the change has been ignored */
@@ -283,7 +283,7 @@
}
protected URL getBaseFontURL() {
- return baseFontURL;
+ return this.baseFontURL;
}
/**
@@ -304,14 +304,14 @@
*/
public void setup(final URL fontConfigFile, final Map fontConfigOptions)
throws FontException {
- if (setupCompleted) {
+ if (this.setupCompleted) {
return;
}
getLogger().info("Setting up fonts.");
registerBase14Fonts();
registerAWTFonts();
readFontConfig(fontConfigFile);
- setupCompleted = true;
+ this.setupCompleted = true;
}
private void registerBase14Fonts() throws FontException {
@@ -414,7 +414,7 @@
final FontConfigParser parser =
new FontConfigParser(this, source);
parser.start();
- if (hasFatalConfigurationError) {
+ if (this.hasFatalConfigurationError) {
throw new FontException("Font Configuration has fatal error(s).");
}
}
@@ -431,7 +431,7 @@
this.graphic.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
RenderingHints.VALUE_FRACTIONALMETRICS_ON);
}
- return graphic;
+ return this.graphic;
}
/**
@@ -469,7 +469,7 @@
+ name);
}
rff = new RegisteredFontFamily(this, name);
- fontFamilies.put(name, rff);
+ this.fontFamilies.put(name, rff);
return rff;
}
@@ -483,18 +483,18 @@
final String realFamily)
throws FontException {
final RegisteredFontFamily rff
- = (RegisteredFontFamily) fontFamilies.get(realFamily);
+ = (RegisteredFontFamily) this.fontFamilies.get(realFamily);
if (rff == null) {
throw new FontException("Font family " + realFamily
+ " not found. Can't register alias: " + alias);
}
- if (fontFamilyAliases.containsKey(alias)) {
+ if (this.fontFamilyAliases.containsKey(alias)) {
final RegisteredFontFamily family =
- (RegisteredFontFamily) fontFamilyAliases.get(alias);
+ (RegisteredFontFamily) this.fontFamilyAliases.get(alias);
throw new FontException("Alias " + alias
+ " already registered to family " + family.getName());
}
- fontFamilyAliases.put(alias, rff);
+ this.fontFamilyAliases.put(alias, rff);
}
/**
@@ -517,14 +517,14 @@
* @param using When true, FreeStanding fonts will be configured.
*/
public void setUsingFreeStandingFonts(final boolean using) {
- if (setupCompleted) {
- if (using != usingFreeStandingFonts) {
+ if (this.setupCompleted) {
+ if (using != this.usingFreeStandingFonts) {
getLogger().error("Font setup already completed. " +
"Ignoring setUsingFreeStandingFonts().");
}
return;
}
- usingFreeStandingFonts = using;
+ this.usingFreeStandingFonts = using;
}
/**
@@ -535,19 +535,19 @@
* @param using When true, System fonts will be configured.
*/
public void setUsingSystemFonts(final boolean using) {
- if (setupCompleted) {
- if (using != usingSystemFonts) {
+ if (this.setupCompleted) {
+ if (using != this.usingSystemFonts) {
getLogger().error("Font setup already completed. " +
"Ignoring setUsingFreeStandingFonts().");
}
return;
}
- usingSystemFonts = using;
+ this.usingSystemFonts = using;
}
protected void setFatalConfigurationError(final boolean hasError) {
if (hasError) {
- hasFatalConfigurationError = true;
+ this.hasFatalConfigurationError = true;
}
}
@@ -558,7 +558,7 @@
if (this.systemFontFamilyList == null) {
createSystemFontFamilyList();
}
- return systemFontFamilyList;
+ return this.systemFontFamilyList;
}
/**
@@ -640,7 +640,7 @@
* @return Returns the entityResolver.
*/
public EntityResolver getEntityResolver() {
- return entityResolver;
+ return this.entityResolver;
}
/**
* @param entityResolver The entityResolver to set.
@@ -698,7 +698,7 @@
*/
public String getFontFamilyForAlias(final String alias) {
final RegisteredFontFamily family =
- (RegisteredFontFamily) fontFamilyAliases.get(alias);
+ (RegisteredFontFamily) this.fontFamilyAliases.get(alias);
if (family == null) {
return null;
}
@@ -767,14 +767,14 @@
private boolean isUsableFont(final String systemName, final Object fontFile,
final Object metricsFile) {
- if (! usingFreeStandingFonts) {
+ if (! this.usingFreeStandingFonts) {
/* If not using FreeStandingFonts, then this font should not be
* registered unless it will be able to generate a SystemFont. */
if (systemName == null || systemName.equals("")) {
return false;
}
}
- if (! usingSystemFonts) {
+ if (! this.usingSystemFonts) {
/* If not using SystemFonts, then this font should not be
* registered unless it will be able to generate a FreeStandingFont.
*/
Modified: trunk/foray/foray-font/src/java/org/foray/font/FSTrueTypeFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FSTrueTypeFont.java 2006-09-11 01:55:14 UTC (rev 8047)
+++ trunk/foray/foray-font/src/java/org/foray/font/FSTrueTypeFont.java 2006-09-11 01:56:21 UTC (rev 8048)
@@ -60,7 +60,7 @@
throws IOException {
final Subset subset = fontUse.getSubset();
if (subset != null) {
- final TTFSubSetFile ttfSubset = new TTFSubSetFile(ttf, subset);
+ final TTFSubSetFile ttfSubset = new TTFSubSetFile(this.ttf, subset);
return ttfSubset.buildEmbeddableSubset();
}
final InputStream instream = getFontInputStream();
@@ -82,30 +82,30 @@
* sure this is right.
*/
fontComplexity = FOrayFont.FONT_COMPOSITE;
- this.postscriptName = stripWhiteSpace(ttf.getPostscriptName());
- this.fontName = ttf.getFontName();
- this.familyName = ttf.getFamilyName();
- capHeight = ttf.getCapHeight();
- xHeight = ttf.getXHeight();
- ascender = ttf.getLowerCaseAscent();
- descender = ttf.getLowerCaseDescent();
- fontBBox = ttf.getFontBBox();
- flags = ttf.getFlags();
- stemV = ttf.getStemV();
- italicAngle = ttf.getItalicAngle();
- numGlyphs = ttf.getNumGlyphs();
- this.internalEncoding = ttf.getCMaps();
- width = ttf.getWidths();
+ this.postscriptName = stripWhiteSpace(this.ttf.getPostscriptName());
+ this.fontName = this.ttf.getFontName();
+ this.familyName = this.ttf.getFamilyName();
+ capHeight = this.ttf.getCapHeight();
+ xHeight = this.ttf.getXHeight();
+ ascender = this.ttf.getLowerCaseAscent();
+ descender = this.ttf.getLowerCaseDescent();
+ this.fontBBox = this.ttf.getFontBBox();
+ flags = this.ttf.getFlags();
+ this.stemV = this.ttf.getStemV();
+ italicAngle = this.ttf.getItalicAngle();
+ numGlyphs = this.ttf.getNumGlyphs();
+ this.internalEncoding = this.ttf.getCMaps();
+ width = this.ttf.getWidths();
/*
* The last entry hMetrics entry in the hmtx table holds the default
* width for the remaining glyphs in the font.
*/
missingWidth = width[width.length - 1];
- kerning = ttf.getKerning();
+ kerning = this.ttf.getKerning();
- fontAllowsEmbedding = ttf.isEmbeddable();
- this.fontFormat = ttf.getFontFormat();
+ fontAllowsEmbedding = this.ttf.isEmbeddable();
+ this.fontFormat = this.ttf.getFontFormat();
}
private String stripWhiteSpace(final String s) {
@@ -123,11 +123,11 @@
}
public int[] getFontBBox() {
- return fontBBox;
+ return this.fontBBox;
}
public int getStemV() {
- return stemV;
+ return this.stemV;
}
public byte getFontFormat() {
Modified: trunk/foray/foray-font/src/java/org/foray/font/FSType1Font.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FSType1Font.java 2006-09-11 01:55:14 UTC (rev 8047)
+++ trunk/foray/foray-font/src/java/org/foray/font/FSType1Font.java 2006-09-11 01:56:21 UTC (rev 8048)
@@ -89,30 +89,30 @@
public void parseFont() throws FontException {
final MetricsFileReader reader = this.getRegisteredFont()
.getMetricsFileReader();
- metricsFile = reader.metricsFileFactory();
- if (metricsFile == null) {
+ this.metricsFile = reader.metricsFileFactory();
+ if (this.metricsFile == null) {
throw new FontException("Unknown Metric Format: "
+ reader.getDescription());
}
- if (metricsFile.getInternalEncoding() == null) {
+ if (this.metricsFile.getInternalEncoding() == null) {
throw new FontException("Unusable Internal Encoding: "
+ reader.getDescription());
}
fontComplexity = FOrayFont.FONT_SIMPLE;
- this.postscriptName = metricsFile.getPostscriptName();
- this.fontName = metricsFile.getFontName();
- this.familyName = metricsFile.getFontFamilyName();
- capHeight = metricsFile.getCapHeight();
- xHeight = metricsFile.getXHeight();
- ascender = metricsFile.getLowerCaseAscent();
- descender = metricsFile.getLowerCaseDescent();
- flags = metricsFile.getFlags();
- italicAngle = metricsFile.getItalicAngle();
+ this.postscriptName = this.metricsFile.getPostscriptName();
+ this.fontName = this.metricsFile.getFontName();
+ this.familyName = this.metricsFile.getFontFamilyName();
+ capHeight = this.metricsFile.getCapHeight();
+ xHeight = this.metricsFile.getXHeight();
+ ascender = this.metricsFile.getLowerCaseAscent();
+ descender = this.metricsFile.getLowerCaseDescent();
+ flags = this.metricsFile.getFlags();
+ italicAngle = this.metricsFile.getItalicAngle();
- width = metricsFile.getCharWidths();
- this.internalEncoding = metricsFile.getInternalEncoding();
+ width = this.metricsFile.getCharWidths();
+ this.internalEncoding = this.metricsFile.getInternalEncoding();
- kerning = metricsFile.getKerning();
+ kerning = this.metricsFile.getKerning();
/*
* The following logic is per
@@ -125,7 +125,7 @@
/* If not already set, set the Encoding. */
if (this.internalEncoding == null) {
- final String encodingName = metricsFile.getEncoding();
+ final String encodingName = this.metricsFile.getEncoding();
EncodingVector encoding = null;
if (encodingName.equals("StandardEncoding")
|| encodingName.equals("AdobeStandardEncoding")) {
@@ -144,22 +144,22 @@
int[] bbox = null;
/* Check the AFM file first as that is the cleanest and most
* efficient. */
- if (metricsFile instanceof MetricsFileAFM) {
- bbox = metricsFile.getFontBBox();
+ if (this.metricsFile instanceof MetricsFileAFM) {
+ bbox = this.metricsFile.getFontBBox();
}
if (bbox != null) {
return bbox;
}
/* The next best thing is to get it from the Font file itself. */
- if (type1File != null) {
- bbox = type1File.getFontBBox();
+ if (this.type1File != null) {
+ bbox = this.type1File.getFontBBox();
}
if (bbox != null) {
return bbox;
}
/* If all else fails, use the estimate from the PFM. */
- if (metricsFile != null) {
- bbox = metricsFile.getFontBBox();
+ if (this.metricsFile != null) {
+ bbox = this.metricsFile.getFontBBox();
}
return bbox;
}
@@ -168,22 +168,22 @@
int stemV = 0;
/* Check the AFM file first as that is the cleanest and most
* efficient. */
- if (metricsFile instanceof MetricsFileAFM) {
- stemV = metricsFile.getStemV();
+ if (this.metricsFile instanceof MetricsFileAFM) {
+ stemV = this.metricsFile.getStemV();
}
if (stemV != 0) {
return stemV;
}
/* The next best thing is to get it from the Font file itself. */
- if (type1File != null) {
- stemV = type1File.getStemV();
+ if (this.type1File != null) {
+ stemV = this.type1File.getStemV();
}
if (stemV != 0) {
return stemV;
}
/* If all else fails, use the estimate from the PFM. */
- if (metricsFile != null) {
- stemV = metricsFile.getStemV();
+ if (this.metricsFile != null) {
+ stemV = this.metricsFile.getStemV();
}
return stemV;
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/FontConfig.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FontConfig.java 2006-09-11 01:55:14 UTC (rev 8047)
+++ trunk/foray/foray-font/src/java/org/foray/font/FontConfig.java 2006-09-11 01:56:21 UTC (rev 8048)
@@ -315,14 +315,14 @@
* @return Returns the failureCount.
*/
public int getFailureCount() {
- return failureCount;
+ return this.failureCount;
}
/**
* @return Returns the successCount.
*/
public int getSuccessCount() {
- return successCount;
+ return this.successCount;
}
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java 2006-09-11 01:55:14 UTC (rev 8047)
+++ trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java 2006-09-11 01:56:21 UTC (rev 8048)
@@ -153,7 +153,7 @@
* intantiates parser and starts parsing of config file
*/
public void start() throws FontException {
- final XMLReader parser = createParser(fontServer);
+ final XMLReader parser = createParser(this.fontServer);
/* Turn on validation if it is available. */
try {
parser.setFeature("http://xml.org/sax/features/validation", true);
@@ -165,7 +165,7 @@
parser.setContentHandler(this);
try {
- parser.parse(filename);
+ parser.parse(this.filename);
} catch (final SAXException e) {
if (e.getException() instanceof FontException) {
throw (FontException) e.getException();
@@ -277,7 +277,7 @@
logError("font-family-alias entry invalid. " + "Ignored.");
} else {
try {
- fontServer.registerFontFamilyAlias(alias, family);
+ this.fontServer.registerFontFamilyAlias(alias, family);
} catch (final FontException e) {
logError(e.getMessage());
}
@@ -352,12 +352,13 @@
}
try {
this.currentFontFamily
- = fontServer.registerFontFamily2(name);
+ = this.fontServer.registerFontFamily2(name);
} catch (final FontException e) {
/* Log a warning. */
logWarning(e.getMessage());
/* Use the existing font family if you can. */
- this.currentFontFamily = fontServer.getRegisteredFontFamily(name);
+ this.currentFontFamily = this.fontServer.getRegisteredFontFamily(
+ name);
return;
}
this.currentSimulateSmallCaps = attributes.getValue(
@@ -380,7 +381,7 @@
+ " AND " + xmlBase);
}
}
- fontIdCounter = 0;
+ this.fontIdCounter = 0;
}
/**
@@ -389,15 +390,15 @@
private void parseElementServer(final Attributes attributes) {
if (attributes.getValue("setup-free-standing-fonts")
.equalsIgnoreCase("true")) {
- fontServer.setUsingFreeStandingFonts(true);
+ this.fontServer.setUsingFreeStandingFonts(true);
} else {
- fontServer.setUsingFreeStandingFonts(false);
+ this.fontServer.setUsingFreeStandingFonts(false);
}
if (attributes.getValue("setup-system-fonts")
.equalsIgnoreCase("true")) {
- fontServer.setUsingSystemFonts(true);
+ this.fontServer.setUsingSystemFonts(true);
} else {
- fontServer.setUsingSystemFonts(false);
+ this.fontServer.setUsingSystemFonts(false);
}
}
@@ -448,7 +449,7 @@
simulateOblique,
simulateBackslant,
simulateStretch);
- fontIdCounter++;
+ this.fontIdCounter++;
}
/**
@@ -482,7 +483,7 @@
+ " " + fontFile);
/* TODO: Just invalidate this one font and warn the user instead
* of invalidating everything. */
- fontServer.setFatalConfigurationError(true);
+ this.fontServer.setFatalConfigurationError(true);
}
}
@@ -496,7 +497,7 @@
+ " " + metricsFile);
/* TODO: Just invalidate this one font and warn the user instead
* of invalidating everything. */
- fontServer.setFatalConfigurationError(true);
+ this.fontServer.setFatalConfigurationError(true);
}
}
@@ -514,12 +515,12 @@
if (this.currentFontFamilyMember.style != null) {
name.append(this.currentFontFamilyMember.style);
}
- name.append(fontIdCounter);
+ name.append(this.fontIdCounter);
fontID = name.toString();
}
try {
- fontServer.registerFont(fontID, fontFileURL, metricsFileURL,
- collectionID, embed, systemName);
+ this.fontServer.registerFont(fontID, fontFileURL,
+ metricsFileURL, collectionID, embed, systemName);
} catch (final FontException e) {
this.logError(e.getMessage());
return;
@@ -596,10 +597,10 @@
return;
}
if (localName.equals("font-family")) {
- currentSimulateSmallCaps = null;
- currentEncoding = null;
- currentXMLBase = previousXMLBase;
- currentEmbed = previousEmbed;
+ this.currentSimulateSmallCaps = null;
+ this.currentEncoding = null;
+ this.currentXMLBase = this.previousXMLBase;
+ this.currentEmbed = this.previousEmbed;
return;
}
if (localName.equals("font-description")) {
@@ -713,8 +714,8 @@
return;
}
final int radix = Integer.parseInt(radixString);
- final EncodingParser parser = new EncodingParser(fontServer.getLogger(),
- reader, columnNumber, radix,
+ final EncodingParser parser = new EncodingParser(
+ this.fontServer.getLogger(), reader, columnNumber, radix,
attributes.getValue("glyph-lists"));
try {
parser.parseList();
@@ -762,7 +763,7 @@
return;
}
final GlyphListParser parser = new GlyphListParser(
- fontServer.getLogger(), reader);
+ this.fontServer.getLogger(), reader);
try {
parser.parseList();
} catch (final IOException e2) {
@@ -782,7 +783,7 @@
final Ite...
[truncated message content] |
|
From: <vic...@us...> - 2006-09-11 17:19:59
|
Revision: 8051
http://svn.sourceforge.net/foray/?rev=8051&view=rev
Author: victormote
Date: 2006-09-11 10:19:53 -0700 (Mon, 11 Sep 2006)
Log Message:
-----------
Remove magic numbers.
Modified Paths:
--------------
trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2006-09-11 17:19:25 UTC (rev 8050)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2006-09-11 17:19:53 UTC (rev 8051)
@@ -28,8 +28,7 @@
package org.foray.core;
-import org.axsl.output.OutputTarget;
-import org.axsl.output.Renderer;
+import org.foray.common.WKConstants;
import org.axsl.areaR.AreaRException;
import org.axsl.areaR.PageArea;
@@ -45,6 +44,8 @@
import org.axsl.layout.Layout;
import org.axsl.layout.LayoutException;
import org.axsl.layout.LayoutFactory;
+import org.axsl.output.OutputTarget;
+import org.axsl.output.Renderer;
import org.axsl.text.TextServer;
import org.apache.commons.logging.Log;
@@ -205,11 +206,13 @@
}
final long memoryNow = runtime.totalMemory() - runtime.freeMemory();
- final long memoryUsed = (memoryNow - initialMemory) / 1024L;
+ final long memoryUsed = (memoryNow - initialMemory) /
+ WKConstants.BYTES_PER_KILOBYTE;
- getLogger().debug("Initial heap size: " + (initialMemory / 1024L)
- + "Kb");
- getLogger().debug("Current heap size: " + (memoryNow / 1024L) + "Kb");
+ getLogger().debug("Initial heap size: " + (initialMemory /
+ WKConstants.BYTES_PER_KILOBYTE) + "Kb");
+ getLogger().debug("Current heap size: "
+ + (memoryNow / WKConstants.BYTES_PER_KILOBYTE) + "Kb");
getLogger().debug("Total memory used: " + memoryUsed + "Kb");
if (!MEM_PROFILE_WITH_GC) {
Modified: trunk/foray/scripts/checkstyle-suppressions.xml
===================================================================
--- trunk/foray/scripts/checkstyle-suppressions.xml 2006-09-11 17:19:25 UTC (rev 8050)
+++ trunk/foray/scripts/checkstyle-suppressions.xml 2006-09-11 17:19:53 UTC (rev 8051)
@@ -12,8 +12,6 @@
<suppress checks="MagicNumber"
files="org.foray.area.*"/>
<suppress checks="MagicNumber"
- files="org.foray.core.*"/>
- <suppress checks="MagicNumber"
files="org.foray.font.*"/>
<suppress checks="MagicNumber"
files="org.foray.fotree.*"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-11 17:14:15
|
Revision: 8049
http://svn.sourceforge.net/foray/?rev=8049&view=rev
Author: victormote
Date: 2006-09-11 10:13:48 -0700 (Mon, 11 Sep 2006)
Log Message:
-----------
Enforce "RequireThis" checkstyle check.
Modified Paths:
--------------
trunk/foray/foray-ps/src/java/org/foray/ps/PSArray.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSBoolean.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSColorSpace.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSDictionary.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSException.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSFile.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSFileFilter.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSFileReal.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSGraphicsState.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSInputFile.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSInteger.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSInterpreter.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSName.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSObject.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSOperator.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSReal.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSStack.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSSystemDict.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/CMap04.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/CMap04Entry.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/CMap12.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/CMap12Entry.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingParser.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingVector.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingZapfDingbats.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/GlyphList.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/GlyphListParser.java
trunk/foray/foray-ps/src/java/org/foray/ps/filter/ASCII85Filter.java
trunk/foray/foray-ps/src/java/org/foray/ps/filter/ASCIIHexFilter.java
trunk/foray/foray-ps/src/java/org/foray/ps/filter/EncryptFilter.java
trunk/foray/foray-ps/src/java/org/foray/ps/filter/FlateFilter.java
trunk/foray/foray-ps/src/java/org/foray/ps/filter/PSFilter.java
trunk/foray/foray-ps/src/java/org/foray/ps/java2d/Java2DSystemDict.java
trunk/foray/foray-ps/src/java/org/foray/ps/java2d/demo/DemoFrame.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSArray.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSArray.java 2006-09-11 01:56:21 UTC (rev 8048)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSArray.java 2006-09-11 17:13:48 UTC (rev 8049)
@@ -58,7 +58,7 @@
}
public boolean isExecutable() {
- return executable;
+ return this.executable;
}
public byte getPSObjectType() {
@@ -69,17 +69,17 @@
if (! isExecutable()) {
return null;
}
- if (executionStackIteratorIndex > value.length - 1) {
+ if (this.executionStackIteratorIndex > this.value.length - 1) {
return null;
}
final PSObject nextElement =
- (PSObject) value[executionStackIteratorIndex];
- executionStackIteratorIndex ++;
+ (PSObject) this.value[this.executionStackIteratorIndex];
+ this.executionStackIteratorIndex ++;
return nextElement;
}
public int qtyUnexecutedItems() {
- return value.length - executionStackIteratorIndex;
+ return this.value.length - this.executionStackIteratorIndex;
}
public boolean isComparable(final PSObject object) {
@@ -94,18 +94,18 @@
}
public Object[] getInsideArray() {
- return value;
+ return this.value;
}
public int size() {
- return value.length;
+ return this.value.length;
}
public PSObject get(final int index) {
- if (index < 0 || index > value.length - 1) {
+ if (index < 0 || index > this.value.length - 1) {
return null;
}
- return (PSObject) value[index];
+ return (PSObject) this.value[index];
}
public void resetExecutionStackStatus() {
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSBoolean.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSBoolean.java 2006-09-11 01:56:21 UTC (rev 8048)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSBoolean.java 2006-09-11 17:13:48 UTC (rev 8049)
@@ -41,7 +41,7 @@
}
protected PSObject duplicate() {
- return new PSBoolean(interpreter, value);
+ return new PSBoolean(interpreter, this.value);
}
protected boolean isExecutable() {
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSColorSpace.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSColorSpace.java 2006-09-11 01:56:21 UTC (rev 8048)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSColorSpace.java 2006-09-11 17:13:48 UTC (rev 8049)
@@ -56,15 +56,15 @@
final int type) {
PSName csName = null;
switch (type) {
- case DEVICE_GRAY: {
+ case PSColorSpace.DEVICE_GRAY: {
csName = new PSName(interpreter, "DeviceGray", false, false);
return new PSColorSpace(interpreter, new Object[] {csName});
}
- case DEVICE_RGB: {
+ case PSColorSpace.DEVICE_RGB: {
csName = new PSName(interpreter, "DeviceRGB", false, false);
return new PSColorSpace(interpreter, new Object[] {csName});
}
- case DEVICE_CMYK: {
+ case PSColorSpace.DEVICE_CMYK: {
csName = new PSName(interpreter, "DeviceCMYK", false, false);
return new PSColorSpace(interpreter, new Object[] {csName});
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSDictionary.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSDictionary.java 2006-09-11 01:56:21 UTC (rev 8048)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSDictionary.java 2006-09-11 17:13:48 UTC (rev 8049)
@@ -42,7 +42,7 @@
public PSDictionary(final PSInterpreter interpreter,
final int initialSize) {
super(interpreter);
- dictionary = new HashMap(initialSize);
+ this.dictionary = new HashMap(initialSize);
}
/**
@@ -99,26 +99,26 @@
* We are relying here on proper equals() methods, primarily in the
* PSName and PSString classes.
*/
- dictionary.put(key, value);
+ this.dictionary.put(key, value);
}
public PSObject getItem(final PSObject key) {
- final Iterator iter = dictionary.keySet().iterator();
+ final Iterator iter = this.dictionary.keySet().iterator();
while (iter.hasNext()) {
final PSObject currentKey = (PSObject) iter.next();
if (currentKey.equals(key)) {
- return (PSObject) dictionary.get(currentKey);
+ return (PSObject) this.dictionary.get(currentKey);
}
}
return null;
}
public PSObject getItem(final String key) {
- final Iterator iter = dictionary.keySet().iterator();
+ final Iterator iter = this.dictionary.keySet().iterator();
while (iter.hasNext()) {
final PSObject currentKey = (PSObject) iter.next();
if (currentKey.equals(key)) {
- return (PSObject) dictionary.get(currentKey);
+ return (PSObject) this.dictionary.get(currentKey);
}
}
return null;
@@ -179,7 +179,7 @@
}
public Map getMap() {
- return dictionary;
+ return this.dictionary;
}
public int size() {
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSException.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSException.java 2006-09-11 01:56:21 UTC (rev 8048)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSException.java 2006-09-11 17:13:48 UTC (rev 8049)
@@ -76,16 +76,17 @@
if (this.errorCode < 0
|| this.errorCode > PSErrorDict.ERROR_NAMES.length - 1) {
sb.append("PS Interpeter threw invalid PostScript error: ");
- sb.append(errorCode);
+ sb.append(this.errorCode);
} else {
sb.append("PostScript error: ");
- sb.append(PSErrorDict.ERROR_NAMES[errorCode]);
+ sb.append(PSErrorDict.ERROR_NAMES[this.errorCode]);
sb.append(" (operator: ");
- if (offendingOperator < 1
- || offendingOperator > PSOperator.OPERATOR_NAMES.length) {
+ if (this.offendingOperator < 1
+ || this.offendingOperator
+ > PSOperator.OPERATOR_NAMES.length) {
sb.append("unknown");
} else {
- sb.append(PSOperator.OPERATOR_NAMES[offendingOperator]);
+ sb.append(PSOperator.OPERATOR_NAMES[this.offendingOperator]);
}
sb.append(") ");
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSFile.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSFile.java 2006-09-11 01:56:21 UTC (rev 8048)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSFile.java 2006-09-11 17:13:48 UTC (rev 8049)
@@ -75,41 +75,42 @@
}
protected byte provideInput() throws IOException, PSException {
- if (chunk == null || chunk.length == 0
- || chunkIndex > chunk.length - 1) {
- chunk = getNextChunk();
- chunkIndex = 0;
- if (chunk == null || chunk.length == 0
- || chunkIndex > chunk.length - 1) {
+ if (this.chunk == null || this.chunk.length == 0
+ || this.chunkIndex > this.chunk.length - 1) {
+ this.chunk = getNextChunk();
+ this.chunkIndex = 0;
+ if (this.chunk == null || this.chunk.length == 0
+ || this.chunkIndex > this.chunk.length - 1) {
closeFile();
return 0x00;
}
}
- chunkIndex ++;
- return chunk[chunkIndex - 1];
+ this.chunkIndex ++;
+ return this.chunk[this.chunkIndex - 1];
}
protected abstract byte[] getNextChunk() throws IOException;
protected void closeFile() throws PSException {
- fileIsOpen = false;
- if (popDictionaryStack) {
+ this.fileIsOpen = false;
+ if (this.popDictionaryStack) {
interpreter.getDictionaryStack().pop(-1);
}
}
protected byte[] getRemainingChunk() {
- if (chunk == null) {
+ if (this.chunk == null) {
return null;
}
- final int arraySize = chunk.length - chunkIndex;
+ final int arraySize = this.chunk.length - this.chunkIndex;
if (arraySize < 1) {
return null;
}
final byte[] remainingChunk = new byte[arraySize];
- System.arraycopy(chunk, chunkIndex, remainingChunk, 0, arraySize);
+ System.arraycopy(this.chunk, this.chunkIndex, remainingChunk, 0,
+ arraySize);
// Advance the index past the boundary
- chunkIndex = chunk.length;
+ this.chunkIndex = this.chunk.length;
return remainingChunk;
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSFileFilter.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSFileFilter.java 2006-09-11 01:56:21 UTC (rev 8048)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSFileFilter.java 2006-09-11 17:13:48 UTC (rev 8049)
@@ -75,13 +75,13 @@
return tempChunk;
}
// Get the chunk from the underlying file
- if (underlyingFile != null) {
- tempChunk = underlyingFile.getNextChunk();
- } else if (underlyingString != null) {
- tempChunk = underlyingString.value.getBytes();
+ if (this.underlyingFile != null) {
+ tempChunk = this.underlyingFile.getNextChunk();
+ } else if (this.underlyingString != null) {
+ tempChunk = this.underlyingString.value.getBytes();
}
try {
- return filter.decode(tempChunk);
+ return this.filter.decode(tempChunk);
} catch (final PSFilterException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSFileReal.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSFileReal.java 2006-09-11 01:56:21 UTC (rev 8048)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSFileReal.java 2006-09-11 17:13:48 UTC (rev 8049)
@@ -66,9 +66,9 @@
if (tempChunk != null) {
return tempChunk;
}
- if (input != null) {
- tempChunk = input.providePostScriptInput();
- } else if (value != null) {
+ if (this.input != null) {
+ tempChunk = this.input.providePostScriptInput();
+ } else if (this.value != null) {
// TODO: Handle i/o from real files
tempChunk = null;
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSGraphicsState.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSGraphicsState.java 2006-09-11 01:56:21 UTC (rev 8048)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSGraphicsState.java 2006-09-11 17:13:48 UTC (rev 8049)
@@ -175,7 +175,7 @@
* @return Returns the lineJoin.
*/
public PSInteger getLineJoin() {
- return lineJoin;
+ return this.lineJoin;
}
/**
@@ -189,7 +189,7 @@
* @return Returns the lineCap.
*/
public PSInteger getLineCap() {
- return lineCap;
+ return this.lineCap;
}
/**
@@ -203,7 +203,7 @@
* @return Returns the lineWidth.
*/
public PSNumber getLineWidth() {
- return lineWidth;
+ return this.lineWidth;
}
/**
@@ -217,7 +217,7 @@
* @return Returns the miterLimit.
*/
public PSNumber getMiterLimit() {
- return miterLimit;
+ return this.miterLimit;
}
/**
@@ -231,7 +231,7 @@
* @return Returns the ctm.
*/
public PSMatrix getCTM() {
- return ctm;
+ return this.ctm;
}
/**
@@ -245,7 +245,7 @@
* @return Returns the font.
*/
public PSDictionary getFont() {
- return font;
+ return this.font;
}
/**
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSInputFile.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSInputFile.java 2006-09-11 01:56:21 UTC (rev 8048)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSInputFile.java 2006-09-11 17:13:48 UTC (rev 8049)
@@ -57,7 +57,7 @@
*/
public byte[] providePostScriptInput() throws IOException {
final byte[] buf = new byte[2048];
- final int bytesRead = in.read(buf);
+ final int bytesRead = this.in.read(buf);
if (bytesRead <= 0) {
return null;
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSInteger.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSInteger.java 2006-09-11 01:56:21 UTC (rev 8048)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSInteger.java 2006-09-11 17:13:48 UTC (rev 8049)
@@ -53,8 +53,8 @@
*/
public static PSNumber makePSNumber(final PSInterpreter interpreter,
final long value) {
- if (value > PS_LARGEST_INTEGER
- || value < PS_SMALLEST_INTEGER) {
+ if (value > PSInteger.PS_LARGEST_INTEGER
+ || value < PSInteger.PS_SMALLEST_INTEGER) {
return new PSReal(interpreter, value);
}
return new PSInteger(interpreter, (int) value);
@@ -208,7 +208,7 @@
}
protected PSObject duplicate() {
- return new PSInteger(interpreter, value);
+ return new PSInteger(interpreter, this.value);
}
protected boolean isExecutable() {
@@ -271,11 +271,11 @@
}
public int getValue() {
- return value;
+ return this.value;
}
public double getDoubleValue() {
- return value;
+ return this.value;
}
public void round() {
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSInterpreter.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSInterpreter.java 2006-09-11 01:56:21 UTC (rev 8048)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSInterpreter.java 2006-09-11 17:13:48 UTC (rev 8049)
@@ -66,16 +66,37 @@
public static final byte PLUS_SIGN = 0x2b;
public static final byte MINUS_SIGN = 0x2d;
- public static final byte[] WHITESPACE = { NULL, TAB, LINE_FEED, FORM_FEED,
- CARRIAGE_RETURN, SPACE };
+ public static final byte[] WHITESPACE = {
+ PSInterpreter.NULL,
+ PSInterpreter.TAB,
+ PSInterpreter.LINE_FEED,
+ PSInterpreter.FORM_FEED,
+ PSInterpreter.CARRIAGE_RETURN,
+ PSInterpreter.SPACE,
+ };
- public static final byte[] NEWLINE = { LINE_FEED, CARRIAGE_RETURN };
+ public static final byte[] NEWLINE = {
+ PSInterpreter.LINE_FEED,
+ PSInterpreter.CARRIAGE_RETURN,
+ };
- public static final byte[] DELIMITER = { LEFT_PAREN, RIGHT_PAREN,
- LEFT_ANGLE, RIGHT_ANGLE, LEFT_BRACKET, RIGHT_BRACKET, LEFT_CURLY,
- RIGHT_CURLY, SLASH, PERCENT };
+ public static final byte[] DELIMITER = {
+ PSInterpreter.LEFT_PAREN,
+ PSInterpreter.RIGHT_PAREN,
+ PSInterpreter.LEFT_ANGLE,
+ PSInterpreter.RIGHT_ANGLE,
+ PSInterpreter.LEFT_BRACKET,
+ PSInterpreter.RIGHT_BRACKET,
+ PSInterpreter.LEFT_CURLY,
+ PSInterpreter.RIGHT_CURLY,
+ PSInterpreter.SLASH,
+ PSInterpreter.PERCENT,
+ };
- public static final byte[] SIGN_INDICATOR = { PLUS_SIGN, MINUS_SIGN };
+ public static final byte[] SIGN_INDICATOR = {
+ PSInterpreter.PLUS_SIGN,
+ PSInterpreter.MINUS_SIGN,
+ };
public static final int MAX_ARRAY_SIZE = 65535;
protected Log logger;
@@ -168,9 +189,9 @@
}
this.logger = logger;
// Create the standard input file.
- standardInput = new PSFileReal(this, input);
+ this.standardInput = new PSFileReal(this, input);
// Place it on the execution stack.
- executionStack.push(standardInput);
+ this.executionStack.push(this.standardInput);
// Get the System Dictionary.
if (systemDict == null) {
systemDict = new ReadOnlySystemDict(this);
@@ -190,7 +211,7 @@
array = new PSArray(this, encoding.getGlyphList(), false);
systemDict.addItem(name, array);
// Add the System Dictionary to the dictionary stack.
- dictionaryStack.push(systemDict);
+ this.dictionaryStack.push(systemDict);
/*
* Add "systemdict" as an entry in itself. See PLRM2, Section 8.2,
* "systemdict" entry. It is not an operator, but is an element in the
@@ -200,7 +221,7 @@
systemDict.addItem(name, systemDict);
// Create a Global Dictionary & push it on the dictionary Stack.
PSDictionary newDict = new PSDictionary(this, 0);
- dictionaryStack.push(newDict);
+ this.dictionaryStack.push(newDict);
/*
* Add "globaldict" as an entry in systemdict. See PLRM2, Section 8.2,
* "globaldict" entry. It is not an operator, but is an element in the
@@ -210,7 +231,7 @@
systemDict.addItem(name, newDict);
// Create a User Dictionary & push it on the dictionary Stack.
newDict = new PSDictionary(this, 0);
- dictionaryStack.push(newDict);
+ this.dictionaryStack.push(newDict);
/*
* Add "userdict" as an entry in systemdict. See PLRM2, Section 8.2,
* "userdict" entry. It is not an operator, but is an element in the
@@ -233,8 +254,8 @@
* @throws PSException
*/
public void process() throws PSException {
- while (executionStack.size() != 0) {
- final PSObject currentExecution = executionStack.peek();
+ while (this.executionStack.size() != 0) {
+ final PSObject currentExecution = this.executionStack.peek();
processItem(currentExecution);
}
}
@@ -251,24 +272,25 @@
return;
}
if (currentExecution instanceof PSName) {
- executionStack.pop();
+ this.executionStack.pop();
processName((PSName) currentExecution);
return;
}
if (currentExecution instanceof PSOperator) {
final PSOperator operator = (PSOperator) currentExecution;
- executionStack.pop();
+ this.executionStack.pop();
final boolean completed = operator.execute();
if (! completed) {
- logger.error("Internal PostScript error: Unsupported operator: "
+ this.logger.error("Internal PostScript error: "
+ + "Unsupported operator: "
+ PSOperator.mapEnumToName(operator.operatorEnum));
}
return;
}
// If anything else, log an error & pop the item
- logger.error("Internal PostScript error: invalid item on execution "
- + "stack.");
- executionStack.pop();
+ this.logger.error("Internal PostScript error: invalid item on "
+ + "execution stack.");
+ this.executionStack.pop();
}
/**
@@ -277,7 +299,7 @@
*/
private void executePSFile(final PSFile file) throws PSException {
if (! file.fileIsOpen) {
- executionStack.pop();
+ this.executionStack.pop();
return;
}
byte byteToConsume = 0;
@@ -299,7 +321,7 @@
*/
private void executePSArray(final PSArray array) throws PSException {
if (array.qtyUnexecutedItems() < 1) {
- executionStack.pop();
+ this.executionStack.pop();
return;
}
PSObject object = null;
@@ -311,7 +333,7 @@
*/
if (array.qtyUnexecutedItems() == 1) {
object = array.getNextProcedureItem();
- executionStack.pop();
+ this.executionStack.pop();
/* Reset status so it can be placed on the execution stack
* later. */
array.resetExecutionStackStatus();
@@ -325,11 +347,11 @@
private void executePSArrayItem(final PSObject arrayItem)
throws PSException {
if (arrayItem == null) {
- executionStack.pop();
+ this.executionStack.pop();
return;
}
if (arrayItem instanceof PSArray) {
- operandStack.push(arrayItem);
+ this.operandStack.push(arrayItem);
return;
}
processToken(arrayItem);
@@ -337,13 +359,13 @@
private void adjustCounters(final byte inputByte) {
switch (inputByte) {
- case CARRIAGE_RETURN: {
+ case PSInterpreter.CARRIAGE_RETURN: {
this.currentLine ++;
this.currentColumn = 1;
break;
}
- case LINE_FEED: {
- if (this.lastByteParsed != CARRIAGE_RETURN) {
+ case PSInterpreter.LINE_FEED: {
+ if (this.lastByteParsed != PSInterpreter.CARRIAGE_RETURN) {
this.currentLine ++;
this.currentColumn = 1;
}
@@ -362,26 +384,26 @@
* See PSLRM2 3.2.2, where such characters are listed as self-delimiting.
*/
private void autoDelimitByte(final byte inputByte) throws PSException {
- if (inCommentLine) {
+ if (this.inCommentLine) {
return;
}
- if (inString) {
+ if (this.inString) {
return;
}
switch (inputByte) {
- case LEFT_PAREN:
- case RIGHT_PAREN: // RIGHT_PAREN should never happen
- case LEFT_ANGLE:
- case RIGHT_ANGLE:
- case LEFT_BRACKET:
- case RIGHT_BRACKET:
- case LEFT_CURLY:
- case RIGHT_CURLY:
- case SLASH:
- case PERCENT:
- final int oldExecutionStackSize = executionStack.size();
+ case PSInterpreter.LEFT_PAREN:
+ case PSInterpreter.RIGHT_PAREN: // RIGHT_PAREN should never happen
+ case PSInterpreter.LEFT_ANGLE:
+ case PSInterpreter.RIGHT_ANGLE:
+ case PSInterpreter.LEFT_BRACKET:
+ case PSInterpreter.RIGHT_BRACKET:
+ case PSInterpreter.LEFT_CURLY:
+ case PSInterpreter.RIGHT_CURLY:
+ case PSInterpreter.SLASH:
+ case PSInterpreter.PERCENT:
+ final int oldExecutionStackSize = this.executionStack.size();
consumeToken();
- final int newExecutionStackSize = executionStack.size();
+ final int newExecutionStackSize = this.executionStack.size();
/*
* If the execution stack size increased as a result of the
* consumeToken(), we need to
@@ -389,7 +411,7 @@
if (newExecutionStackSize > oldExecutionStackSize) {
assert newExecutionStackSize == oldExecutionStackSize + 1 :
"More than 1 item added to Execution Stack.";
- final PSObject currentExecution = executionStack.peek();
+ final PSObject currentExecution = this.executionStack.peek();
// Warning: This is recursive. We are already inside this.
processItem(currentExecution);
}
@@ -406,79 +428,79 @@
* This is useful for debugging filtered or encrypted PostScript input.
*/
// System.out.print((char) inputByte);
- if (inCommentLine) {
+ if (this.inCommentLine) {
consumeByteInCommentLine(inputByte);
return;
}
- if (inString) {
+ if (this.inString) {
consumeByteInString(inputByte);
return;
}
switch (inputByte) {
- case PERCENT:
- inCommentLine = true;
+ case PSInterpreter.PERCENT:
+ this.inCommentLine = true;
break;
- case CARRIAGE_RETURN:
- case LINE_FEED:
- case NULL:
- case TAB:
- case FORM_FEED:
- case SPACE:
+ case PSInterpreter.CARRIAGE_RETURN:
+ case PSInterpreter.LINE_FEED:
+ case PSInterpreter.NULL:
+ case PSInterpreter.TAB:
+ case PSInterpreter.FORM_FEED:
+ case PSInterpreter.SPACE:
consumeToken();
break;
- case LEFT_PAREN:
- inString = true;
+ case PSInterpreter.LEFT_PAREN:
+ this.inString = true;
break;
- case LEFT_BRACKET: {
+ case PSInterpreter.LEFT_BRACKET: {
final PSName nameObject = new PSName(this, "[", true, false);
processToken(nameObject);
break;
}
- case RIGHT_BRACKET: {
+ case PSInterpreter.RIGHT_BRACKET: {
final PSName nameObject = new PSName(this, "]", true, false);
processToken(nameObject);
break;
}
- case LEFT_CURLY:
+ case PSInterpreter.LEFT_CURLY:
// Check for a nested procedure
- if (inProcedure) {
+ if (this.inProcedure) {
// Push procedureBeingBuilt onto the procedureStack
- procedureStack.add(procedureBeingBuilt);
+ this.procedureStack.add(this.procedureBeingBuilt);
}
// Start a new procedureBeingBuilt
- procedureBeingBuilt = new ArrayList();
- inProcedure = true;
+ this.procedureBeingBuilt = new ArrayList();
+ this.inProcedure = true;
break;
- case RIGHT_CURLY:
+ case PSInterpreter.RIGHT_CURLY:
// Convert procedureBeingBuilt into a PSArray
final Object[] procedureArray =
- new Object[procedureBeingBuilt.size()];
+ new Object[this.procedureBeingBuilt.size()];
for (int i = 0; i < procedureArray.length; i++) {
- procedureArray[i] = procedureBeingBuilt.get(i);
+ procedureArray[i] = this.procedureBeingBuilt.get(i);
}
final PSArray newArray = new PSArray(this, procedureArray, true);
/*
* If there is anything on the procedureStack, pop the top item off
* and that is now the procedureBeingBuilt.
*/
- if (procedureStack.size() > 0) {
- procedureBeingBuilt = (ArrayList)
- procedureStack.get(procedureStack.size() - 1);
- procedureStack.remove(procedureStack.size() - 1);
+ if (this.procedureStack.size() > 0) {
+ this.procedureBeingBuilt = (ArrayList)
+ this.procedureStack.get(this.procedureStack.size() - 1);
+ this.procedureStack.remove(this.procedureStack.size() - 1);
// Otherwise, make it null.
} else {
- procedureBeingBuilt = null;
+ this.procedureBeingBuilt = null;
}
- if (procedureBeingBuilt == null) {
- operandStack.push(newArray...
[truncated message content] |
|
From: <vic...@us...> - 2006-09-11 17:26:55
|
Revision: 8052
http://svn.sourceforge.net/foray/?rev=8052&view=rev
Author: victormote
Date: 2006-09-11 10:26:45 -0700 (Mon, 11 Sep 2006)
Log Message:
-----------
Remove magic numbers.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java
trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2006-09-11 17:19:53 UTC (rev 8051)
+++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2006-09-11 17:26:45 UTC (rev 8052)
@@ -59,6 +59,8 @@
/** Constant indicating that the input is XML + XSLT. */
public static final int INPUT_XSLT = 2;
+ private static final int STANDARD_OPTIONS_QTY_ARGUMENTS = 3;
+
/** The user configuration file. */
URL userConfig = null;
@@ -344,7 +346,7 @@
* a total of 3 arguments for each, the current one "-so", indicating
* that it is a configuration option, followed by the key and the value.
*/
- if (currentArgument + 3 > args.length) {
+ if (currentArgument + STANDARD_OPTIONS_QTY_ARGUMENTS > args.length) {
throw new FOrayException("Argument " + currentArgument
+ " must be followed by key and value.");
}
Modified: trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java 2006-09-11 17:19:53 UTC (rev 8051)
+++ trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java 2006-09-11 17:26:45 UTC (rev 8052)
@@ -66,6 +66,8 @@
*/
public final class FOraySpecific {
+ private static final int STANDARD_GRAPHIC_SEARCH_ELEMENTS = 3;
+
/**
* Private constructor, as this class should never be instantiated.
*/
@@ -154,7 +156,7 @@
private static URL[] buildGraphicSearchPath(
final SessionConfig configuration) {
- final URL[] urls = new URL[3];
+ final URL[] urls = new URL[STANDARD_GRAPHIC_SEARCH_ELEMENTS];
urls[0] = configuration.getBaseDocument();
urls[1] = configuration.optionBaseDirectory();
try {
Modified: trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java 2006-09-11 17:19:53 UTC (rev 8051)
+++ trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java 2006-09-11 17:26:45 UTC (rev 8052)
@@ -281,7 +281,8 @@
String outname = xmlFile.getName();
if (outname.endsWith(".xml")) {
- outname = outname.substring(0, outname.length() - 4);
+ outname = outname.substring(0,
+ outname.length() - ".xml".length());
}
final BufferedOutputStream bos = new BufferedOutputStream(
new FileOutputStream(new File(destdir,
Modified: trunk/foray/scripts/checkstyle-suppressions.xml
===================================================================
--- trunk/foray/scripts/checkstyle-suppressions.xml 2006-09-11 17:19:53 UTC (rev 8051)
+++ trunk/foray/scripts/checkstyle-suppressions.xml 2006-09-11 17:26:45 UTC (rev 8052)
@@ -8,8 +8,6 @@
<!-- Suppress partially-implemented checks where not yet implemented. -->
<suppress checks="MagicNumber"
- files="org.foray.app.*"/>
- <suppress checks="MagicNumber"
files="org.foray.area.*"/>
<suppress checks="MagicNumber"
files="org.foray.font.*"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-11 18:38:50
|
Revision: 8055
http://svn.sourceforge.net/foray/?rev=8055&view=rev
Author: victormote
Date: 2006-09-11 11:38:39 -0700 (Mon, 11 Sep 2006)
Log Message:
-----------
Fix method return values.
Modified Paths:
--------------
trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/BMPGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/PNGGraphic.java
Modified: trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java 2006-09-11 18:29:15 UTC (rev 8054)
+++ trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java 2006-09-11 18:38:39 UTC (rev 8055)
@@ -92,7 +92,7 @@
* @param byte4 The low-order byte.
* @return The int represented by the four bytes.
*/
- public static int bytesToLong(final byte byte1, final byte byte2,
+ public static long bytesToLong(final byte byte1, final byte byte2,
final byte byte3, final byte byte4) {
final int int1 = unsignedByteToInt(byte1);
final int int2 = unsignedByteToInt(byte2);
@@ -118,7 +118,7 @@
* at start + 3.
* @return The int represented by the four bytes.
*/
- public static int bytesToLongBE(final byte[] byteArray, final int start) {
+ public static long bytesToLongBE(final byte[] byteArray, final int start) {
if (byteArray == null
|| start < 0
|| start + BYTES_PER_INT > byteArray.length) {
@@ -141,7 +141,7 @@
* (the high-order byte) at start + 3.
* @return The int represented by the four bytes.
*/
- public static int bytesToLongLE(final byte[] byteArray, final int start) {
+ public static long bytesToLongLE(final byte[] byteArray, final int start) {
if (byteArray == null
|| start < 0
|| start + BYTES_PER_INT > byteArray.length) {
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/BMPGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/BMPGraphic.java 2006-09-11 18:29:15 UTC (rev 8054)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/BMPGraphic.java 2006-09-11 18:38:39 UTC (rev 8055)
@@ -70,7 +70,7 @@
if (palette != null) {
filepos += palette.length * this.colorSpace.getNumComponents();
}
- final int imagestart = WKConstants.bytesToLongLE(headermap,
+ final int imagestart = (int) WKConstants.bytesToLongLE(headermap,
IMAGE_START_OFFSET);
this.colorSpace = ColorSpace.getInstance(ColorSpace.CS_sRGB);
final int bytesPerRow = computeBytesPerRow();
@@ -240,8 +240,9 @@
final byte[] header = new byte[BMPGraphic.BMP_BASICS_LENGTH];
bis.read(header);
/* Little endian format. */
- this.pixelWidth = WKConstants.bytesToLongLE(header, WIDTH_OFFSET);
- this.pixelHeight = WKConstants.bytesToLongLE(header, HEIGHT_OFFSET);
+ this.pixelWidth = (int) WKConstants.bytesToLongLE(header, WIDTH_OFFSET);
+ this.pixelHeight = (int) WKConstants.bytesToLongLE(header,
+ HEIGHT_OFFSET);
}
public String getName() {
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java 2006-09-11 18:29:15 UTC (rev 8054)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java 2006-09-11 18:38:39 UTC (rev 8055)
@@ -152,17 +152,17 @@
final byte[] fileStart = new byte[this.maxBytesToParseBasics()];
bis.read(fileStart);
if (! isAscii) {
- this.psStart = WKConstants.bytesToLongBE(fileStart,
+ this.psStart = (int) WKConstants.bytesToLongBE(fileStart,
PS_START_OFFSET);
- this.psLength = WKConstants.bytesToLongBE(fileStart,
+ this.psLength = (int) WKConstants.bytesToLongBE(fileStart,
PS_LENGTH_OFFSET);
- this.wmfStart = WKConstants.bytesToLongBE(fileStart,
+ this.wmfStart = (int) WKConstants.bytesToLongBE(fileStart,
WMF_START_OFFSET);
- this.wmfLength = WKConstants.bytesToLongBE(fileStart,
+ this.wmfLength = (int) WKConstants.bytesToLongBE(fileStart,
WMF_LENGTH_OFFSET);
- this.tiffStart = WKConstants.bytesToLongBE(fileStart,
+ this.tiffStart = (int) WKConstants.bytesToLongBE(fileStart,
TIFF_START_OFFSET);
- this.tiffLength = WKConstants.bytesToLongBE(fileStart,
+ this.tiffLength = (int) WKConstants.bytesToLongBE(fileStart,
TIFF_LENGTH_OFFSET);
}
readBBox(fileStart);
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/PNGGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/PNGGraphic.java 2006-09-11 18:29:15 UTC (rev 8054)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/PNGGraphic.java 2006-09-11 18:38:39 UTC (rev 8055)
@@ -66,8 +66,9 @@
final byte[] header = new byte[PNGGraphic.PNG_BASICS_LENGTH];
bis.read(header);
/* PNG is always big endian. */
- this.pixelWidth = WKConstants.bytesToLongBE(header, PIXEL_WIDTH_STARTS);
- this.pixelHeight = WKConstants.bytesToLongBE(header,
+ this.pixelWidth = (int) WKConstants.bytesToLongBE(header,
+ PIXEL_WIDTH_STARTS);
+ this.pixelHeight = (int) WKConstants.bytesToLongBE(header,
PIXEL_HEIGHT_STARTS);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-11 18:56:50
|
Revision: 8056
http://svn.sourceforge.net/foray/?rev=8056&view=rev
Author: victormote
Date: 2006-09-11 11:56:41 -0700 (Mon, 11 Sep 2006)
Log Message:
-----------
1. Fix names, return values, and doc for the unsigned operations.
2. Add new unsigned operations for converting bytes to ints.
Modified Paths:
--------------
trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/BMPGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/PNGGraphic.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java 2006-09-11 18:38:39 UTC (rev 8055)
+++ trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java 2006-09-11 18:56:41 UTC (rev 8056)
@@ -44,6 +44,9 @@
/** The number of bytes in an int. */
public static final byte BYTES_PER_INT = 4;
+ /** The number of bytes in a short. */
+ public static final byte BYTES_PER_SHORT = 2;
+
/** The number of bits in a byte. */
public static final byte BITS_PER_BYTE = 8;
@@ -85,14 +88,15 @@
private WKConstants() { }
/**
- * Converts four bytes to an int.
+ * Converts four unsigned bytes to a long.
+ * (It must be converted to a long because the Java int is signed).
* @param byte1 The high-order byte.
* @param byte2 The second highest-order byte.
* @param byte3 The third highest-order byte.
* @param byte4 The low-order byte.
- * @return The int represented by the four bytes.
+ * @return The long represented by the four bytes.
*/
- public static long bytesToLong(final byte byte1, final byte byte2,
+ public static long unsignedBytesToLong(final byte byte1, final byte byte2,
final byte byte3, final byte byte4) {
final int int1 = unsignedByteToInt(byte1);
final int int2 = unsignedByteToInt(byte2);
@@ -110,15 +114,17 @@
}
/**
- * Converts four big-endian bytes from an array of bytes to an int.
+ * Converts four unsigned big-endian bytes from an array of bytes to a long.
+ * (It must be converted to a long because the Java int is signed).
* @param byteArray The array of bytes containing the bytes to be converted.
* @param start The index to the first byte in the array to be converted.
* This is the high-order byte of the 4 bytes. The second byte will be
* indexed at start + 1, the third byte at start + 2, and the fourth byte
* at start + 3.
- * @return The int represented by the four bytes.
+ * @return The long represented by the four bytes.
*/
- public static long bytesToLongBE(final byte[] byteArray, final int start) {
+ public static long unsignedBytesToLongBE(final byte[] byteArray,
+ final int start) {
if (byteArray == null
|| start < 0
|| start + BYTES_PER_INT > byteArray.length) {
@@ -126,22 +132,25 @@
return 0;
}
int index = start;
- return bytesToLong(byteArray[index++],
+ return unsignedBytesToLong(byteArray[index++],
byteArray[index++],
byteArray[index++],
byteArray[index]);
}
/**
- * Converts four little-endian bytes from an array of bytes to an int.
+ * Converts four unsigned little-endian bytes from an array of bytes to a
+ * long.
+ * (It must be converted to a long because the Java int is signed).
* @param byteArray The array of bytes containing the bytes to be converted.
* @param start The index to the first byte in the array to be converted.
* This is the low-order byte of the 4 bytes. The second byte will be
* indexed at start + 1, the third byte at start + 2, and the fourth byte
* (the high-order byte) at start + 3.
- * @return The int represented by the four bytes.
+ * @return The long represented by the four bytes.
*/
- public static long bytesToLongLE(final byte[] byteArray, final int start) {
+ public static long unsignedBytesToLongLE(final byte[] byteArray,
+ final int start) {
if (byteArray == null
|| start < 0
|| start + BYTES_PER_INT > byteArray.length) {
@@ -149,10 +158,71 @@
return 0;
}
int index = start + BYTES_PER_INT - 1;
- return bytesToLong(byteArray[index--],
+ return unsignedBytesToLong(byteArray[index--],
byteArray[index--],
byteArray[index--],
byteArray[index]);
}
+ /**
+ * Converts two unsigned bytes to an int.
+ * (It must be converted to an int because the Java short is signed).
+ * @param byte1 The high-order byte.
+ * @param byte2 The low-order byte.
+ * @return The int represented by the two bytes.
+ */
+ public static int unsignedBytesToInt(final byte byte1, final byte byte2) {
+ return (int) unsignedBytesToLong((byte) 0, (byte) 0, byte1, byte2);
+ }
+
+ /**
+ * Converts two unsigned big-endian bytes from an array of bytes to an int.
+ * (It must be converted to an int because the Java short is signed).
+ * @param byteArray The array of bytes containing the bytes to be converted.
+ * @param start The index to the first byte in the array to be converted.
+ * This is the high-order byte of the 2 bytes. The second byte (the
+ * low-order byte) will be indexed at start + 1.
+ * @return The int represented by the two bytes.
+ */
+ public static int unsignedBytesToIntBE(final byte[] byteArray,
+ final int start) {
+ if (byteArray == null
+ || start < 0
+ || start + BYTES_PER_SHORT > byteArray.length) {
+ /* Fails silently. */
+ return 0;
+ }
+ int index = start;
+ return (int) unsignedBytesToLong(
+ (byte) 0,
+ (byte) 0,
+ byteArray[index++],
+ byteArray[index]);
+ }
+
+ /**
+ * Converts two unsigned little-endian bytes from an array of bytes to an
+ * int.
+ * (It must be converted to an int because the Java short is signed).
+ * @param byteArray The array of bytes containing the bytes to be converted.
+ * @param start The index to the first byte in the array to be converted.
+ * This is the low-order byte of the 4 bytes. The second byte (the
+ * high-order byte) at start + 1.
+ * @return The int represented by the two bytes.
+ */
+ public static long unsignedBytesToIntLE(final byte[] byteArray,
+ final int start) {
+ if (byteArray == null
+ || start < 0
+ || start + BYTES_PER_SHORT > byteArray.length) {
+ /* Fails silently. */
+ return 0;
+ }
+ int index = start + BYTES_PER_SHORT - 1;
+ return unsignedBytesToLong(byteArray[index--],
+ byteArray[index],
+ (byte) 0,
+ (byte) 0);
+ }
+
}
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/BMPGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/BMPGraphic.java 2006-09-11 18:38:39 UTC (rev 8055)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/BMPGraphic.java 2006-09-11 18:56:41 UTC (rev 8056)
@@ -70,7 +70,7 @@
if (palette != null) {
filepos += palette.length * this.colorSpace.getNumComponents();
}
- final int imagestart = (int) WKConstants.bytesToLongLE(headermap,
+ final int imagestart = (int) WKConstants.unsignedBytesToLongLE(headermap,
IMAGE_START_OFFSET);
this.colorSpace = ColorSpace.getInstance(ColorSpace.CS_sRGB);
final int bytesPerRow = computeBytesPerRow();
@@ -240,8 +240,8 @@
final byte[] header = new byte[BMPGraphic.BMP_BASICS_LENGTH];
bis.read(header);
/* Little endian format. */
- this.pixelWidth = (int) WKConstants.bytesToLongLE(header, WIDTH_OFFSET);
- this.pixelHeight = (int) WKConstants.bytesToLongLE(header,
+ this.pixelWidth = (int) WKConstants.unsignedBytesToLongLE(header, WIDTH_OFFSET);
+ this.pixelHeight = (int) WKConstants.unsignedBytesToLongLE(header,
HEIGHT_OFFSET);
}
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java 2006-09-11 18:38:39 UTC (rev 8055)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java 2006-09-11 18:56:41 UTC (rev 8056)
@@ -152,17 +152,17 @@
final byte[] fileStart = new byte[this.maxBytesToParseBasics()];
bis.read(fileStart);
if (! isAscii) {
- this.psStart = (int) WKConstants.bytesToLongBE(fileStart,
+ this.psStart = (int) WKConstants.unsignedBytesToLongBE(fileStart,
PS_START_OFFSET);
- this.psLength = (int) WKConstants.bytesToLongBE(fileStart,
+ this.psLength = (int) WKConstants.unsignedBytesToLongBE(fileStart,
PS_LENGTH_OFFSET);
- this.wmfStart = (int) WKConstants.bytesToLongBE(fileStart,
+ this.wmfStart = (int) WKConstants.unsignedBytesToLongBE(fileStart,
WMF_START_OFFSET);
- this.wmfLength = (int) WKConstants.bytesToLongBE(fileStart,
+ this.wmfLength = (int) WKConstants.unsignedBytesToLongBE(fileStart,
WMF_LENGTH_OFFSET);
- this.tiffStart = (int) WKConstants.bytesToLongBE(fileStart,
+ this.tiffStart = (int) WKConstants.unsignedBytesToLongBE(fileStart,
TIFF_START_OFFSET);
- this.tiffLength = (int) WKConstants.bytesToLongBE(fileStart,
+ this.tiffLength = (int) WKConstants.unsignedBytesToLongBE(fileStart,
TIFF_LENGTH_OFFSET);
}
readBBox(fileStart);
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/PNGGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/PNGGraphic.java 2006-09-11 18:38:39 UTC (rev 8055)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/PNGGraphic.java 2006-09-11 18:56:41 UTC (rev 8056)
@@ -66,9 +66,9 @@
final byte[] header = new byte[PNGGraphic.PNG_BASICS_LENGTH];
bis.read(header);
/* PNG is always big endian. */
- this.pixelWidth = (int) WKConstants.bytesToLongBE(header,
+ this.pixelWidth = (int) WKConstants.unsignedBytesToLongBE(header,
PIXEL_WIDTH_STARTS);
- this.pixelHeight = (int) WKConstants.bytesToLongBE(header,
+ this.pixelHeight = (int) WKConstants.unsignedBytesToLongBE(header,
PIXEL_HEIGHT_STARTS);
}
Modified: trunk/foray/scripts/checkstyle-suppressions.xml
===================================================================
--- trunk/foray/scripts/checkstyle-suppressions.xml 2006-09-11 18:38:39 UTC (rev 8055)
+++ trunk/foray/scripts/checkstyle-suppressions.xml 2006-09-11 18:56:41 UTC (rev 8056)
@@ -14,8 +14,6 @@
<suppress checks="MagicNumber"
files="org.foray.fotree.*"/>
<suppress checks="MagicNumber"
- files="org.foray.graphic.*"/>
- <suppress checks="MagicNumber"
files="org.foray.hyphenR.*"/>
<suppress checks="MagicNumber"
files="org.foray.pdf.*"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-14 00:45:48
|
Revision: 8091
http://svn.sourceforge.net/foray/?rev=8091&view=rev
Author: victormote
Date: 2006-09-13 17:45:36 -0700 (Wed, 13 Sep 2006)
Log Message:
-----------
Make bounding box constants more widely available, and make provision to unify them in the future.
Modified Paths:
--------------
trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java
Added Paths:
-----------
trunk/foray/foray-ps/src/java/org/foray/ps/BoundingBox.java
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java 2006-09-14 00:44:55 UTC (rev 8090)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java 2006-09-14 00:45:36 UTC (rev 8091)
@@ -44,10 +44,29 @@
public class EPSGraphic extends Graphic
implements org.axsl.graphicR.EPSGraphic {
+ /** Index to the array item for the lower-left X value in a PostScript
+ * bounding box. */
public static final byte BBOX_LOWER_LEFT_X_INDEX = 0;
+ /* TODO: Use aXSL version of this constant after org.foray.ps.BoundingBox
+ * is moved to aXSL. */
+
+ /** Index to the array item for the lower-left Y value in a PostScript
+ * bounding box. */
public static final byte BBOX_LOWER_LEFT_Y_INDEX = 1;
+ /* TODO: Use aXSL version of this constant after org.foray.ps.BoundingBox
+ * is moved to aXSL. */
+
+ /** Index to the array item for the upper-right X value in a PostScript
+ * bounding box. */
public static final byte BBOX_UPPER_RIGHT_X_INDEX = 2;
+ /* TODO: Use aXSL version of this constant after org.foray.ps.BoundingBox
+ * is moved to aXSL. */
+
+ /** Index to the array item for the upper-right X value in a PostScript
+ * bounding box. */
public static final byte BBOX_UPPER_RIGHT_Y_INDEX = 3;
+ /* TODO: Use aXSL version of this constant after org.foray.ps.BoundingBox
+ * is moved to aXSL. */
private static final int EPS_LOAD_SIZE = 20480;
Added: trunk/foray/foray-ps/src/java/org/foray/ps/BoundingBox.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/BoundingBox.java (rev 0)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/BoundingBox.java 2006-09-14 00:45:36 UTC (rev 8091)
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2006 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.ps;
+
+/**
+ * PostScript constants.
+ */
+public interface BoundingBox {
+ /* TODO: Move this to aXSL. */
+
+ /** Index to the array item for the lower-left X value in a PostScript
+ * bounding box. */
+ byte BBOX_LOWER_LEFT_X_INDEX = 0;
+
+ /** Index to the array item for the lower-left Y value in a PostScript
+ * bounding box. */
+ byte BBOX_LOWER_LEFT_Y_INDEX = 1;
+
+ /** Index to the array item for the upper-right X value in a PostScript
+ * bounding box. */
+ byte BBOX_UPPER_RIGHT_X_INDEX = 2;
+
+ /** Index to the array item for the upper-right X value in a PostScript
+ * bounding box. */
+ byte BBOX_UPPER_RIGHT_Y_INDEX = 3;
+
+}
Property changes on: trunk/foray/foray-ps/src/java/org/foray/ps/BoundingBox.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-14 01:17:25
|
Revision: 8092
http://svn.sourceforge.net/foray/?rev=8092&view=rev
Author: victormote
Date: 2006-09-13 18:17:14 -0700 (Wed, 13 Sep 2006)
Log Message:
-----------
Make instance variables private.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/format/TTFFont.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFMtxEntry.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableGLYF.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableHMTX.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableLOCA.java
trunk/foray/foray-ps/src/java/org/foray/ps/BoundingBox.java
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/TTFFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/TTFFont.java 2006-09-14 00:45:36 UTC (rev 8091)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/TTFFont.java 2006-09-14 01:17:14 UTC (rev 8092)
@@ -291,7 +291,7 @@
public short[] getWidths() {
final short[] wx = new short[this.hmtxTable.metrics.length];
for (int i = 0; i < wx.length; i++) {
- wx[i] = getTTFFunit(this.hmtxTable.metrics[i].wx);
+ wx[i] = getTTFFunit(this.hmtxTable.metrics[i].getWidth());
}
return wx;
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/TTFMtxEntry.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/TTFMtxEntry.java 2006-09-14 00:45:36 UTC (rev 8091)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/TTFMtxEntry.java 2006-09-14 01:17:14 UTC (rev 8092)
@@ -28,16 +28,18 @@
package org.foray.font.format;
+import org.foray.ps.BoundingBox;
+
/**
* A TTF Font Mtx entry.
*/
class TTFMtxEntry {
- int wx;
- int lsb;
- int[] bbox = new int[] {0, 0, 0, 0};
+ private int wx;
+ private int lsb;
+ private int[] bbox = new int[BoundingBox.BBOX_ENTRIES];
/** Obtained from the "loca" table. */
- long offset;
+ private long offset;
TTFMtxEntry() {
}
@@ -52,4 +54,44 @@
return this.bbox[3] - this.bbox[1];
}
+ public void setWidth(final int width) {
+ this.wx = width;
+ }
+
+ public int getWidth() {
+ return this.wx;
+ }
+
+ public long getOffset() {
+ return this.offset;
+ }
+
+ public void setOffset(final long offset) {
+ this.offset = offset;
+ }
+
+ public int getLeftSideBearing() {
+ return this.lsb;
+ }
+
+ public void setLeftSideBearing(final int leftSideBearing) {
+ this.lsb = leftSideBearing;
+ }
+
+ public int getBBoxValue(final int index) {
+ if (index < 0
+ || index > BoundingBox.BBOX_ENTRIES - 1) {
+ return Integer.MIN_VALUE;
+ }
+ return this.bbox[index];
+ }
+
+ public void setBBoxValue(final int index, final int value) {
+ if (index < 0
+ || index > BoundingBox.BBOX_ENTRIES - 1) {
+ return;
+ }
+ this.bbox[index] = value;
+ }
+
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java 2006-09-14 00:45:36 UTC (rev 8091)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java 2006-09-14 01:17:14 UTC (rev 8092)
@@ -376,7 +376,7 @@
final int origGlyphIndex = this.subset.decodeSubsetIndex(i);
final int glyphLength = computeGlyphLength(origGlyphIndex);
final int glyphOffset = (int) this.ttfFont.getTTFTableHMTX()
- .metrics[origGlyphIndex].offset;
+ .metrics[origGlyphIndex].getOffset();
final int fileOffset = entry.getOffset() + glyphOffset;
// Copy glyph
System.arraycopy(
@@ -406,11 +406,11 @@
nextOffset = (int) this.ttfFont.getTTFTableLOCA().lastLoca;
} else {
nextOffset = (int) this.ttfFont.getTTFTableHMTX()
- .metrics[origGlyphIndex + 1].offset;
+ .metrics[origGlyphIndex + 1].getOffset();
}
int glyphLength = 0;
glyphLength = nextOffset - (int) this.ttfFont.getTTFTableHMTX()
- .metrics[origGlyphIndex].offset;
+ .metrics[origGlyphIndex].getOffset();
return glyphLength;
}
@@ -430,10 +430,11 @@
final byte[] byteArray = createTableByteArray(arraySize);
for (int i = 0; i < this.subset.numGlyphsUsed(); i ++) {
final int originalIndex = this.subset.decodeSubsetIndex(i);
- writeUShort(byteArray, i * 4,
- this.ttfFont.getTTFTableHMTX().metrics[originalIndex].wx);
+ final TTFMtxEntry metricEntry
+ = this.ttfFont.getTTFTableHMTX().metrics[originalIndex];
+ writeUShort(byteArray, i * 4, metricEntry.getWidth());
writeUShort(byteArray, (i * 4) + 2,
- this.ttfFont.getTTFTableHMTX().metrics[originalIndex].lsb);
+ metricEntry.getLeftSideBearing());
}
return byteArray;
}
@@ -448,7 +449,7 @@
ret.add(glyphIdx);
int offset = glyphOffset
+ (int) this.ttfFont.getTTFTableHMTX()
- .metrics[glyphIdx.intValue()].offset
+ .metrics[glyphIdx.intValue()].getOffset()
+ 10;
Integer compositeIdx = null;
int flags = 0;
@@ -583,7 +584,7 @@
final Integer origIndex = new Integer(originalIndex);
final long glyphOffset =
this.ttfFont.getTTFTableHMTX().metrics[originalIndex]
- .offset;
+ .getOffset();
/*
* Save the current position so that we can go back to it after
* this test.
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableGLYF.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableGLYF.java 2006-09-14 00:45:36 UTC (rev 8091)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableGLYF.java 2006-09-14 01:17:14 UTC (rev 8092)
@@ -28,6 +28,8 @@
package org.foray.font.format;
+import org.foray.ps.BoundingBox;
+
import java.io.IOException;
/**
@@ -47,15 +49,19 @@
final TTFTableDirEntry dirTab = ttfFont.getTTFDirTabEntry("glyf");
final TTFMtxEntry[] metricsTable = ttfFont.getTTFTableHMTX().metrics;
for (int i = 0; i < (ttfFont.getTTFTableMAXP().numGlyphs - 1); i++) {
- if (metricsTable[i].offset != metricsTable[i + 1].offset) {
- getReader().seek(dirTab.getOffset() + metricsTable[i].offset);
+ if (metricsTable[i].getOffset()
+ != metricsTable[i + 1].getOffset()) {
+ getReader().seek(dirTab.getOffset()
+ + metricsTable[i].getOffset());
getReader().skipBytes(2);
- for (int j = 0; j < metricsTable[i].bbox.length; j++) {
- metricsTable[i].bbox[j] = getReader().readShort();
+ for (int j = 0; j < BoundingBox.BBOX_ENTRIES; j++) {
+ final int bboxValue = getReader().readShort();
+ metricsTable[i].setBBoxValue(j, bboxValue);
}
} else {
- for (int j = 0; j < metricsTable[i].bbox.length; j++) {
- metricsTable[i].bbox[j] = metricsTable[0].bbox[j];
+ for (int j = 0; j < BoundingBox.BBOX_ENTRIES; j++) {
+ final int bboxValue = metricsTable[0].getBBoxValue(j);
+ metricsTable[i].setBBoxValue(j, bboxValue);
}
}
}
@@ -63,15 +69,18 @@
final int n = dirTab.getOffset();
for (int i = 0; i < ttfFont.getTTFTableMAXP().numGlyphs; i++) {
if ((i + 1) >= metricsTable.length
- || metricsTable[i].offset != metricsTable[i + 1].offset) {
- getReader().seek(n + metricsTable[i].offset);
+ || metricsTable[i].getOffset()
+ != metricsTable[i + 1].getOffset()) {
+ getReader().seek(n + metricsTable[i].getOffset());
getReader().skipBytes(2);
- for (int j = 0; j < metricsTable[i].bbox.length; j++) {
- metricsTable[i].bbox[j] = getReader().readShort();
+ for (int j = 0; j < BoundingBox.BBOX_ENTRIES; j++) {
+ final int bboxValue = getReader().readShort();
+ metricsTable[i].setBBoxValue(j, bboxValue);
}
} else {
- for (int j = 0; j < metricsTable[i].bbox.length; j++) {
- metricsTable[i].bbox[j] = metricsTable[0].bbox[0];
+ for (int j = 0; j < BoundingBox.BBOX_ENTRIES; j++) {
+ final int bboxValue = metricsTable[0].getBBoxValue(0);
+ metricsTable[i].setBBoxValue(j, bboxValue);
}
}
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableHMTX.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableHMTX.java 2006-09-14 00:45:36 UTC (rev 8091)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableHMTX.java 2006-09-14 01:17:14 UTC (rev 8092)
@@ -62,20 +62,20 @@
this.metrics[i] = new TTFMtxEntry();
}
for (int i = 0; i < ttfFont.getTTFTableHHEA().numberOfHMetrics; i++) {
- this.metrics[i].wx = getReader().readUnsignedShort();
- this.metrics[i].lsb = getReader().readShort();
+ this.metrics[i].setWidth(getReader().readUnsignedShort());
+ this.metrics[i].setLeftSideBearing(getReader().readShort());
getLogger().debug(" width[" + i + "] = "
- + ttfFont.getTTFFunit(this.metrics[i].wx) + ";");
+ + ttfFont.getTTFFunit(this.metrics[i].getWidth()) + ";");
}
if (ttfFont.getTTFTableHHEA().numberOfHMetrics < metricsSize) {
// Fill in the missing widths
final int lastWidth = this.metrics[ttfFont.getTTFTableHHEA()
- .numberOfHMetrics - 1].wx;
+ .numberOfHMetrics - 1].getWidth();
for (int i = ttfFont.getTTFTableHHEA().numberOfHMetrics;
i < metricsSize; i++) {
- this.metrics[i].wx = lastWidth;
- this.metrics[i].lsb = getReader().readShort();
+ this.metrics[i].setWidth(lastWidth);
+ this.metrics[i].setLeftSideBearing(getReader().readShort());
}
}
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableLOCA.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableLOCA.java 2006-09-14 00:45:36 UTC (rev 8091)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableLOCA.java 2006-09-14 01:17:14 UTC (rev 8092)
@@ -47,11 +47,11 @@
protected void parseTable() throws IOException {
for (int i = 0; i < ttfFont.getTTFTableMAXP().numGlyphs; i++) {
if (ttfFont.getTTFTableHEAD().indexToLocFormat == 1) {
- ttfFont.getTTFTableHMTX().metrics[i].offset
- = getReader().readUnsignedInt();
+ ttfFont.getTTFTableHMTX().metrics[i].setOffset(
+ getReader().readUnsignedInt());
} else {
- ttfFont.getTTFTableHMTX().metrics[i].offset
- = getReader().readUnsignedShort() << 1;
+ ttfFont.getTTFTableHMTX().metrics[i].setOffset(
+ getReader().readUnsignedShort() << 1);
}
}
if (ttfFont.getTTFTableHEAD().indexToLocFormat == 1) {
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/BoundingBox.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/BoundingBox.java 2006-09-14 00:45:36 UTC (rev 8091)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/BoundingBox.java 2006-09-14 01:17:14 UTC (rev 8092)
@@ -34,6 +34,9 @@
public interface BoundingBox {
/* TODO: Move this to aXSL. */
+ /** The number of entries in a Bounding Box. */
+ byte BBOX_ENTRIES = 4;
+
/** Index to the array item for the lower-left X value in a PostScript
* bounding box. */
byte BBOX_LOWER_LEFT_X_INDEX = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-15 20:23:48
|
Revision: 8123
http://svn.sourceforge.net/foray/?rev=8123&view=rev
Author: victormote
Date: 2006-09-15 13:23:37 -0700 (Fri, 15 Sep 2006)
Log Message:
-----------
Add some javadoc.
Modified Paths:
--------------
trunk/foray/foray-common/src/java/org/foray/common/Configuration.java
trunk/foray/foray-common/src/java/org/foray/common/MUserAgent.java
trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java
trunk/foray/foray-common/src/java/org/foray/common/XMLCharacter.java
trunk/foray/foray-common/src/java/org/foray/common/XMLParser.java
trunk/foray/foray-common/src/java/org/foray/common/url/URLFactory.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/foray-common/src/java/org/foray/common/Configuration.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/Configuration.java 2006-09-15 19:57:53 UTC (rev 8122)
+++ trunk/foray/foray-common/src/java/org/foray/common/Configuration.java 2006-09-15 20:23:37 UTC (rev 8123)
@@ -93,8 +93,7 @@
protected abstract String getName();
/**
- * general access method
- *
+ * Accessor method for a generic property.
* @param key a string containing the key value for the configuration value
* @return Object containing the value; normally you would use one of the
* convenience methods, which return the correct form,
@@ -105,7 +104,7 @@
}
/**
- * convenience methods to access strings values in the configuration
+ * Convenience method to access strings values in the configuration.
* @param key a string containing the key value for the configuration value
* @return String a string containing the value,
* null if the key is not defined.
@@ -119,10 +118,9 @@
}
/**
- * convenience methods to access int values in the configuration
+ * Convenience methods to access int values in the configuration.
* @param key a string containing the key value for the configuration value
- * @return int a int containing the value,
- * -1 if the key is not defined.
+ * @return The int value, or -1 if the key is not defined.
*/
protected int getIntValue(final String key) {
final Object obj = getValue(key);
@@ -133,10 +131,9 @@
}
/**
- * convenience methods to access boolean values in the configuration
+ * Convenience method to access boolean values in the configuration.
* @param key a string containing the key value for the configuration value
- * @return Boolean true or false as value,
- * null if the key is not defined.
+ * @return The Boolean value, or null if the key is not defined.
*/
protected Boolean getBooleanValue(final String key) {
final Object obj = getValue(key);
@@ -150,10 +147,9 @@
}
/**
- * convenience methods to access list values in the configuration
+ * Convenience method to access list values in the configuration.
* @param key a string containing the key value for the configuration value
- * @return List a List containing the values,
- * null if the key is not defined.
+ * @return The List value, or null if the key is not defined.
*/
protected List getListValue(final String key) {
final Object obj = getValue(key);
Modified: trunk/foray/foray-common/src/java/org/foray/common/MUserAgent.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/MUserAgent.java 2006-09-15 19:57:53 UTC (rev 8122)
+++ trunk/foray/foray-common/src/java/org/foray/common/MUserAgent.java 2006-09-15 20:23:37 UTC (rev 8123)
@@ -40,7 +40,7 @@
import java.awt.geom.Dimension2D;
/**
- *
+ * An SVGUserAgent extension.
*/
public class MUserAgent extends SVGUserAgent {
Modified: trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java 2006-09-15 19:57:53 UTC (rev 8122)
+++ trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java 2006-09-15 20:23:37 UTC (rev 8123)
@@ -57,8 +57,9 @@
public static final String CHAR_ENCODE_UTF_16 = "UTF-16";
/**
- * The list of supported Java character encodings can be found at
- * java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc
+ * The list of supported Java character encodings.
+ * @see
+ * "java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc"
*/
public static final String[] SUPPORTED_CHAR_ENCODINGS = new String[] {
CHAR_ENCODE_US_ASCII,
@@ -550,7 +551,7 @@
private long offsetToContent = - 1;
/**
- * Constructor
+ * Constructor.
*/
ByteSearcher(final byte[] bytesToFind, final long startRange,
final long endRange, final boolean readBackward) {
Modified: trunk/foray/foray-common/src/java/org/foray/common/XMLCharacter.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/XMLCharacter.java 2006-09-15 19:57:53 UTC (rev 8122)
+++ trunk/foray/foray-common/src/java/org/foray/common/XMLCharacter.java 2006-09-15 20:23:37 UTC (rev 8123)
@@ -543,9 +543,10 @@
}
/**
+ * Indicates whether the input is one of the fiver predefined XML entity
+ * references.
* @param c The char to be tested.
- * @return True iff <code>c</code> is one of the five predefined entity
- * references in XML.
+ * @return True iff <code>c</code> is a predefined XML entity reference.
*/
public static boolean isEntityReference(final char c) {
switch (c) {
@@ -561,6 +562,8 @@
}
/**
+ * Takes an entity reference character and converts it to its expanded
+ * value. For example, "&" is converted to "&".
* @param c The char which should be converted to a predefined XML entity
* reference.
* @return A string containing the predefined XML entity reference for
Modified: trunk/foray/foray-common/src/java/org/foray/common/XMLParser.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/XMLParser.java 2006-09-15 19:57:53 UTC (rev 8122)
+++ trunk/foray/foray-common/src/java/org/foray/common/XMLParser.java 2006-09-15 20:23:37 UTC (rev 8123)
@@ -34,7 +34,7 @@
import javax.xml.parsers.SAXParserFactory;
/**
- *
+ * Utility class that provides information about an XML Parser.
*/
public final class XMLParser {
Modified: trunk/foray/foray-common/src/java/org/foray/common/url/URLFactory.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/url/URLFactory.java 2006-09-15 19:57:53 UTC (rev 8122)
+++ trunk/foray/foray-common/src/java/org/foray/common/url/URLFactory.java 2006-09-15 20:23:37 UTC (rev 8123)
@@ -57,6 +57,7 @@
private URLFactory() { }
/**
+ * Creates a URL instance.
* @see URL#URL(java.lang.String) which this method mimics.
*/
public static URL createURL(final String spec)
@@ -66,6 +67,7 @@
}
/**
+ * Creates a URL instance.
* @see URL#URL(java.lang.String, java.lang.String, int, java.lang.String)
* which this method mimics.
*/
@@ -76,6 +78,7 @@
}
/**
+ * Creates a URL instance.
* @see URL#URL(java.lang.String, java.lang.String, int, java.lang.String,
* java.net.URLStreamHandler) which this method mimics.
*/
@@ -91,6 +94,7 @@
}
/**
+ * Creates a URL instance.
* @see URL#URL(java.lang.String, java.lang.String, java.lang.String)
* which this method mimics.
*/
@@ -101,6 +105,7 @@
}
/**
+ * Creates a URL instance.
* @see URL#URL(java.net.URL, java.lang.String) which this method mimics.
*/
public static URL createURL(final URL context, final String spec)
@@ -110,6 +115,7 @@
}
/**
+ * Creates a URL instance.
* @see URL#URL(java.net.URL, java.lang.String, java.net.URLStreamHandler)
* which this method mimics.
*/
Modified: trunk/foray/scripts/checkstyle-suppressions.xml
===================================================================
--- trunk/foray/scripts/checkstyle-suppressions.xml 2006-09-15 19:57:53 UTC (rev 8122)
+++ trunk/foray/scripts/checkstyle-suppressions.xml 2006-09-15 20:23:37 UTC (rev 8123)
@@ -26,7 +26,7 @@
files="org.foray.demo.*"/>
<suppress checks="Javadoc[MVS].*"
files="org.foray.area.*"/>
- <suppress checks="Javadoc[MVS].*"
+ <suppress checks="Javadoc[MV].*"
files="org.foray.common.*"/>
<suppress checks="Javadoc[MVS].*"
files="org.foray.core.*"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-15 21:37:43
|
Revision: 8124
http://svn.sourceforge.net/foray/?rev=8124&view=rev
Author: victormote
Date: 2006-09-15 14:37:20 -0700 (Fri, 15 Sep 2006)
Log Message:
-----------
Add some javadoc.
Modified Paths:
--------------
trunk/foray/foray-common/src/java/org/foray/common/ClassService.java
trunk/foray/foray-common/src/java/org/foray/common/ColorSpaceCMYK.java
trunk/foray/foray-common/src/java/org/foray/common/Configuration.java
trunk/foray/foray-common/src/java/org/foray/common/ISO3166.java
trunk/foray/foray-common/src/java/org/foray/common/ISO639.java
trunk/foray/foray-common/src/java/org/foray/common/OrderedTreeNode.java
trunk/foray/foray-common/src/java/org/foray/common/RandomInput.java
trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java
trunk/foray/foray-common/src/java/org/foray/common/RandomReaderArray.java
trunk/foray/foray-common/src/java/org/foray/common/RandomReaderRAFile.java
trunk/foray/foray-common/src/java/org/foray/common/RandomReaderURL.java
trunk/foray/foray-common/src/java/org/foray/common/SVGUserAgent.java
trunk/foray/foray-common/src/java/org/foray/common/StringUtil.java
trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java
trunk/foray/foray-common/src/java/org/foray/common/XMLCharacter.java
trunk/foray/foray-common/src/java/org/foray/common/sax/DocumentInputSource.java
trunk/foray/foray-common/src/java/org/foray/common/sax/DocumentReader.java
trunk/foray/foray-common/src/java/org/foray/common/url/FOrayURLStreamHandlerFactory.java
trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationBroker.java
trunk/foray/foray-common/src/java/org/foray/common/url/URLFactory.java
trunk/foray/foray-common/src/java/org/foray/common/url/classpath/Handler.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/JPEGGraphic.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/foray-common/src/java/org/foray/common/ClassService.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/ClassService.java 2006-09-15 20:23:37 UTC (rev 8123)
+++ trunk/foray/foray-common/src/java/org/foray/common/ClassService.java 2006-09-15 21:37:20 UTC (rev 8124)
@@ -45,7 +45,8 @@
*/
public final class ClassService {
- static HashMap providerMap = new HashMap();
+ /** Map of the services. */
+ private static HashMap providerMap = new HashMap();
/**
* Private Constructor. This is a utility class and should never be
Modified: trunk/foray/foray-common/src/java/org/foray/common/ColorSpaceCMYK.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/ColorSpaceCMYK.java 2006-09-15 20:23:37 UTC (rev 8123)
+++ trunk/foray/foray-common/src/java/org/foray/common/ColorSpaceCMYK.java 2006-09-15 21:37:20 UTC (rev 8124)
@@ -34,22 +34,43 @@
/**
* A {@link ColorSpace} implementation for CMYK.
*/
-public class ColorSpaceCMYK extends ColorSpace {
+public final class ColorSpaceCMYK extends ColorSpace {
+ /** Constant indicating the number of channels in a CMYK image, that is,
+ * 4. */
public static final byte QTY_CMYK_COMPONENTS = 4;
+
+ /** Constant indicating the index for the cyan component of the image. */
public static final byte CYAN_COMPONENT_INDEX = 0;
+
+ /** Constant indicating the index for the magenta component of the image. */
public static final byte MAGENTA_COMPONENT_INDEX = 1;
+
+ /** Constant indicating the index for the yellow component of the image. */
public static final byte YELLOW_COMPONENT_INDEX = 2;
+
+ /** Constant indicating the index for the key (black) component of the
+ * image. */
public static final byte KEY_COMPONENT_INDEX = 3;
- protected static final float BLACK_FACTOR = 2.0f; // could be 3.0 as well.
+ /** A magic number used in the conversion of CMYK to RGB. We do not know the
+ * origin of the value. */
+ protected static final float BLACK_FACTOR = 2.0f;
+
+ /** Constant indicating the minimum number of channels in an RGB color. */
protected static final int MINIMUM_RGB_COMPONENTS = 3;
+ /** Constant needed for serialization. */
static final long serialVersionUID = 34959014422981446L;
+ /** The singleton instance of this class. */
private static ColorSpaceCMYK theInstance;
- public ColorSpaceCMYK() {
+ /**
+ * Private constructor. This is a singleton class.
+ * Use {@link #theInstance()} to obtain the instance.
+ */
+ private ColorSpaceCMYK() {
super(ColorSpace.TYPE_CMYK, QTY_CMYK_COMPONENTS);
}
Modified: trunk/foray/foray-common/src/java/org/foray/common/Configuration.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/Configuration.java 2006-09-15 20:23:37 UTC (rev 8123)
+++ trunk/foray/foray-common/src/java/org/foray/common/Configuration.java 2006-09-15 21:37:20 UTC (rev 8124)
@@ -56,11 +56,19 @@
*/
public abstract class Configuration {
+ /** Constant indicating the lowest precedence, that of the default
+ * values. */
public static final byte PRECEDENCE_DEFAULT = 0;
+
+ /** Constant indicating the middle-level precedence, that of an item in the
+ * configuration file. */
public static final byte PRECEDENCE_CONFIG_FILE = 20;
+
+ /** Constant indicating the highest-level precedence, that of an item set on
+ * the command-line. */
public static final byte PRECEDENCE_COMMAND_LINE = 40;
- private static final byte DEFAULT_INITIAL_MAP_SIZE = 30;
+ /** The logger. */
protected Log logger;
/**
@@ -68,7 +76,7 @@
* value. Every member of options should have a corresponding item in
* {@link #precedence} with the same key.
*/
- private Map options = new HashMap(DEFAULT_INITIAL_MAP_SIZE);
+ private Map options = new HashMap();
/**
* Map whose key is the option name, and whose value is an Integer that
@@ -76,7 +84,7 @@
* {@link #options}. Every member of precedence should have a corresponding
* item in {@link #options} with the same key.
*/
- private Map precedence = new HashMap(DEFAULT_INITIAL_MAP_SIZE);
+ private Map precedence = new HashMap();
protected Configuration(final Log logger) {
this.logger = logger;
Modified: trunk/foray/foray-common/src/java/org/foray/common/ISO3166.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/ISO3166.java 2006-09-15 20:23:37 UTC (rev 8123)
+++ trunk/foray/foray-common/src/java/org/foray/common/ISO3166.java 2006-09-15 21:37:20 UTC (rev 8124)
@@ -284,7 +284,10 @@
{"ZIMBABWE", "ZW", "ZWE", "716"},
};
+ /** The valid 3-letter country codes. */
private static String[] codes3Letter;
+
+ /** The valid 2-letter country codes. */
private static String[] codes2Letter;
static {
Modified: trunk/foray/foray-common/src/java/org/foray/common/ISO639.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/ISO639.java 2006-09-15 20:23:37 UTC (rev 8123)
+++ trunk/foray/foray-common/src/java/org/foray/common/ISO639.java 2006-09-15 21:37:20 UTC (rev 8124)
@@ -591,7 +591,10 @@
"pas de contenu linguistique"},
};
+ /** The valid 3-letter language codes. */
private static String[] codes3Letter;
+
+ /** The valid 2-letter language codes. */
private static String[] codes2Letter;
static {
Modified: trunk/foray/foray-common/src/java/org/foray/common/OrderedTreeNode.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/OrderedTreeNode.java 2006-09-15 20:23:37 UTC (rev 8123)
+++ trunk/foray/foray-common/src/java/org/foray/common/OrderedTreeNode.java 2006-09-15 21:37:20 UTC (rev 8124)
@@ -65,7 +65,11 @@
* of an OrderedTreeNode.
*/
private class ListEnumeration implements Enumeration {
+
+ /** The list of children. */
List children;
+
+ /** Index of the "nextElement". */
int nextIndex = 0;
ListEnumeration(final List children) {
@@ -90,6 +94,7 @@
}
} // End inner class ListEnumeration
+ /** The parent of this node. */
private OrderedTreeNode parent;
public OrderedTreeNode(final OrderedTreeNode parent) {
Modified: trunk/foray/foray-common/src/java/org/foray/common/RandomInput.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/RandomInput.java 2006-09-15 20:23:37 UTC (rev 8123)
+++ trunk/foray/foray-common/src/java/org/foray/common/RandomInput.java 2006-09-15 21:37:20 UTC (rev 8124)
@@ -45,13 +45,6 @@
*/
public interface RandomInput extends DataInput {
- byte BITS_PER_BYTE = 8;
- byte SHIFT_1_BYTE = BITS_PER_BYTE;
- byte SHIFT_2_BYTES = BITS_PER_BYTE * 2;
- byte SHIFT_3_BYTES = BITS_PER_BYTE * 3;
- byte SHIFT_4_BYTES = BITS_PER_BYTE * 4;
- int BITS_ON_32 = 0xFFFFFFFF;
-
/**
* Same function as {@link RandomAccessFile#seek(long)}.
*/
Modified: trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java 2006-09-15 20:23:37 UTC (rev 8123)
+++ trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java 2006-09-15 21:37:20 UTC (rev 8124)
@@ -49,11 +49,22 @@
*/
public class RandomReader implements RandomInput {
+ /** Constant indicating the U.S. ASCII character set. */
public static final String CHAR_ENCODE_US_ASCII = "US-ASCII";
+
+ /** Constant indicating the ISO-8859-1 character set. */
public static final String CHAR_ENCODE_ISO_8859_1 = "ISO-8859-1";
+
+ /** Constant indicating the UTF-8 character set. */
public static final String CHAR_ENCODE_UTF_8 = "UTF-8";
+
+ /** Constant indicating the UTF-16, big-endian character set. */
public static final String CHAR_ENCODE_UTF_16BE = "UTF-16BE";
+
+ /** Constant indicating the UTF-16, little-endian character set. */
public static final String CHAR_ENCODE_UTF_16LE = "UTF-16LE";
+
+ /** Constant indicating the UTF-16 character set. */
public static final String CHAR_ENCODE_UTF_16 = "UTF-16";
/**
@@ -255,9 +266,9 @@
*/
public final long readUnsignedInt() throws IOException {
long ret = readUnsignedByte();
- ret = (ret << SHIFT_1_BYTE) + readUnsignedByte();
- ret = (ret << SHIFT_1_BYTE) + readUnsignedByte();
- ret = (ret << SHIFT_1_BYTE) + readUnsignedByte();
+ ret = (ret << WKConstants.SHIFT_1_BYTE) + readUnsignedByte();
+ ret = (ret << WKConstants.SHIFT_1_BYTE) + readUnsignedByte();
+ ret = (ret << WKConstants.SHIFT_1_BYTE) + readUnsignedByte();
return ret;
}
@@ -272,9 +283,9 @@
final int byte2 = readUnsignedByte();
final int byte3 = readUnsignedByte();
final int byte4 = readUnsignedByte();
- return (byte4 << SHIFT_3_BYTES)
- + (byte3 << SHIFT_2_BYTES)
- + (byte2 << SHIFT_1_BYTE)
+ return (byte4 << WKConstants.SHIFT_3_BYTES)
+ + (byte3 << WKConstants.SHIFT_2_BYTES)
+ + (byte2 << WKConstants.SHIFT_1_BYTE)
+ byte1;
}
@@ -288,7 +299,7 @@
public int readUnsignedShortLoHi() throws IOException {
final int byte1 = readUnsignedByte();
final int byte2 = readUnsignedByte();
- return (byte2 << SHIFT_1_BYTE) + byte1;
+ return (byte2 << WKConstants.SHIFT_1_BYTE) + byte1;
}
/**
@@ -486,11 +497,20 @@
* two readSize chunks. */
private static final int VIEWBOX_SIZE = IDEAL_READ_SIZE * 2;
+ /** The bytes we are looking for in the file. */
private final byte[] bytesToFind;
+
+ /** Index to the first byte to be read. */
private final long startRange;
+
+ /** Index to the last byte to be read. */
private final long endRange;
+
+ /** Set to true if the next read should go backward instead of
+ * forward.*/
private final boolean readBackward;
+ /** The contents of the current viewbox. */
private byte[] viewbox = new byte[VIEWBOX_SIZE];
/**
@@ -499,55 +519,49 @@
* @see #readStart
*/
private long lastReadStart = -1;
+
/**
* After reading a chunk, this value should be updated with the value
* of readEnd that was used.
* @see #readEnd
*/
private long lastReadEnd = -1;
- /**
- * After reading a chunk, this value should be updated with the value
- * of workTarget that was used.
- */
+
+ /** After reading a chunk, this value should be updated with the value
+ * of workTarget that was used. */
private int lastViewboxTarget = - 1;
- /**
- * The file offset of the beginning of the range that should be read.
- * This should be computed before reading takes place.
- */
+
+ /** The file offset of the beginning of the range that should be read.
+ * This should be computed before reading takes place. */
private long readStart = 0;
- /**
- * The file offset of the end of the range that should be read.
- * This should be computed before reading takes place.
- */
+
+ /** The file offset of the end of the range that should be read.
+ * This should be computed before reading takes place. */
private long readEnd = 0;
+
+ /** The number of bytes to be read. */
private int actualReadSize = 0;
- /**
- * Stores the workArray index into which the reader should read the
+ /** Stores the workArray index into which the reader should read the
* input file. In other words, this marks the location in the array
- * where reading should take place.
- */
+ * where reading should take place. */
private int viewboxTarget = -1;
- /**
- * Stores the start of the active (searchable) portion of workArray.
- */
+
+ /** The start of the active (searchable) portion of workArray. */
private int viewboxStart = 0;
- /**
- * Stores the end of the active (searchable) portion of workArray.
- */
+
+ /** The end of the active (searchable) portion of workArray. */
private int viewboxEnd = 0;
+ /** The index to the current location in the viewbox. */
private int viewboxPointer;
- /**
- * Set to true of the end of the file has been reached and no more
- * reading should be done.
- */
+ /** Set to true of the end of the file has been reached and no more
+ * reading should be done. */
private boolean endOfFile = false;
- /**
- * Stores the location of the content in the file. This is the value
- * that should be returned by searchBytes().
- */
+
+ /** Stores the location of the content in the file. This is the value
+ * that should be returned by searchBytes(). */
private long offsetToContent = - 1;
/**
Modified: trunk/foray/foray-common/src/java/org/foray/common/RandomReaderArray.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/RandomReaderArray.java 2006-09-15 20:23:37 UTC (rev 8123)
+++ trunk/foray/foray-common/src/java/org/foray/common/RandomReaderArray.java 2006-09-15 21:37:20 UTC (rev 8124)
@@ -39,8 +39,13 @@
*/
class RandomReaderArray implements RandomInput {
+ /** The description of this array, used for user messages. */
private String description;
+
+ /** The array of bytes that have been read. */
private byte[] byteArray;
+
+ /** The current index into {@link #byteArray}. */
private int arrayIndex = 0;
/**
@@ -106,7 +111,7 @@
public final short readShort() throws IOException {
final int byte1 = readUnsignedByte();
final int byte2 = readUnsignedByte();
- return (short) ((byte1 << SHIFT_1_BYTE) + byte2);
+ return (short) ((byte1 << WKConstants.SHIFT_1_BYTE) + byte2);
}
/**
@@ -115,7 +120,7 @@
public final int readUnsignedShort() throws IOException {
final int byte1 = readUnsignedByte();
final int byte2 = readUnsignedByte();
- return (byte1 << SHIFT_1_BYTE) + byte2;
+ return (byte1 << WKConstants.SHIFT_1_BYTE) + byte2;
}
/**
@@ -161,8 +166,8 @@
* {@inheritDoc}
*/
public final long readLong() throws IOException {
- final long int1 = (long) (readInt()) << SHIFT_4_BYTES;
- final long int2 = readInt() & BITS_ON_32;
+ final long int1 = (long) (readInt()) << WKConstants.SHIFT_4_BYTES;
+ final long int2 = readInt() & WKConstants.MAX_32_BIT_UNSIGNED_INT;
return int1 + int2;
}
@@ -179,7 +184,7 @@
public final char readChar() throws IOException {
final int byte1 = this.readUnsignedByte();
final int byte2 = this.readUnsignedByte();
- return (char) ((byte1 << SHIFT_1_BYTE) + byte2);
+ return (char) ((byte1 << WKConstants.SHIFT_1_BYTE) + byte2);
}
/**
@@ -197,9 +202,9 @@
final int byte2 = this.readUnsignedByte();
final int byte3 = this.readUnsignedByte();
final int byte4 = this.readUnsignedByte();
- return (byte1 << SHIFT_3_BYTES)
- + (byte2 << SHIFT_2_BYTES)
- + (byte3 << SHIFT_1_BYTE)
+ return (byte1 << WKConstants.SHIFT_3_BYTES)
+ + (byte2 << WKConstants.SHIFT_2_BYTES)
+ + (byte3 << WKConstants.SHIFT_1_BYTE)
+ (byte4 << 0);
}
Modified: trunk/foray/foray-common/src/java/org/foray/common/RandomReaderRAFile.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/RandomReaderRAFile.java 2006-09-15 20:23:37 UTC (rev 8123)
+++ trunk/foray/foray-common/src/java/org/foray/common/RandomReaderRAFile.java 2006-09-15 21:37:20 UTC (rev 8124)
@@ -41,7 +41,10 @@
*/
class RandomReaderRAFile implements RandomInput {
+ /** The file to be read. */
private File file = null;
+
+ /** The random access file wrapping {@link #file}. */
private RandomAccessFile raFile = null;
/**
Modified: trunk/foray/foray-common/src/java/org/foray/common/RandomReaderURL.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/RandomReaderURL.java 2006-09-15 20:23:37 UTC (rev 8123)
+++ trunk/foray/foray-common/src/java/org/foray/common/RandomReaderURL.java 2006-09-15 21:37:20 UTC (rev 8124)
@@ -42,8 +42,10 @@
*/
class RandomReaderURL implements RandomInput {
+ /** The encapsulated URL. */
private URL url;
+ /** The array. */
private RandomReaderArray array;
/**
Modified: trunk/foray/foray-common/src/java/org/foray/common/SVGUserAgent.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/SVGUserAgent.java 2006-09-15 20:23:37 UTC (rev 8123)
+++ trunk/foray/foray-common/src/java/org/foray/common/SVGUserAgent.java 2006-09-15 21:37:20 UTC (rev 8124)
@@ -40,14 +40,22 @@
*/
public class SVGUserAgent extends UserAgentAdapter {
- public static final float FACTOR_INCHES_TO_MM = 25.4f;
+ /** The default number of pixels per inch. */
protected static final int DEFAULT_PIXELS_PER_INCH = 72;
+
+ /** The default viewport width, in pixels. */
protected static final int DEFAULT_VIEWPORT_WIDTH = 100;
+
+ /** The default viewport height, in pixels. */
protected static final int DEFAULT_VIEWPORT_HEIGHT = 100;
+ /** The current AffineTransform. */
AffineTransform currentTransform = null;
+
+ /** The logger. */
Log log;
+ /** The resolution, in pixels per inch. */
int pixelsPerInch = DEFAULT_PIXELS_PER_INCH;
/**
@@ -94,8 +102,10 @@
public float getPixelUnitToMillimeter() {
// Length of one pixel in inches.
float temp = 1f / this.pixelsPerInch;
- // Apply factor converting inches to millimeters
- temp *= FACTOR_INCHES_TO_MM;
+ /* Apply factor converting inches to centimeters */
+ temp *= WKConstants.CM_PER_INCH;
+ /* Apply factor converting centimeters to millimeters. */
+ temp *= WKConstants.MM_PER_CM;
return temp;
}
Modified: trunk/foray/foray-common/src/java/org/foray/common/StringUtil.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/StringUtil.java 2006-09-15 20:23:37 UTC (rev 8123)
+++ trunk/foray/foray-common/src/java/org/foray/common/StringUtil.java 2006-09-15 21:37:20 UTC (rev 8124)
@@ -34,8 +34,9 @@
*/
public final class StringUtil {
+ /** The lowest integer value that cannot be expressed with one base-10
+ * digit. */
private static final int FIRST_HEX_NOT_DECIMAL = 10;
- private static final int NIBBLE_BITS = 4;
/**
* Private constructor (should never be instantiated).
@@ -96,7 +97,8 @@
return -1;
}
// Convert the high-order byte and shift it into the high position.
- final byte convert1 = (byte) (asciiHexByteToHex(byte1) << NIBBLE_BITS);
+ final byte convert1 = (byte) (asciiHexByteToHex(byte1)
+ << WKConstants.BITS_PER_NIBBLE);
// Convert the low-order byte.
final byte convert2 = asciiHexByteToHex(byte2);
// "Or" the two half-bytes together and return it.
Modified: trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java 2006-09-15 20:23:37 UTC (rev 8123)
+++ trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java 2006-09-15 21:37:20 UTC (rev 8124)
@@ -39,6 +39,9 @@
/** The maximum unsigned 8-bit value, cast as an int. */
public static final int MAX_8_BIT_UNSIGNED_INT = 0xFF;
+ /** The maximum unsigned 32-bit value, cast as an int. */
+ public static final int MAX_32_BIT_UNSIGNED_INT = 0xFFFFFFFF;
+
/** The maximum number of values that can be stored in 8 bits, that is,
* 256. */
public static final short MAX_8_BIT_UNSIGNED_VALUES = 256;
@@ -55,6 +58,9 @@
/** The number of bits in a byte, that is, 8. */
public static final byte BITS_PER_BYTE = 8;
+ /** The number of bits in a nibble, that is, 4. */
+ public static final byte BITS_PER_NIBBLE = 4;
+
/** The number of bits to shift for a one-byte shift. */
public static final byte SHIFT_1_BYTE = BITS_PER_BYTE * 1;
@@ -64,6 +70,9 @@
/** The number of bits to shift for a three-byte shift. */
public static final byte SHIFT_3_BYTES = BITS_PER_BYTE * 3;
+ /** The number of bits to shift for a four-byte shift. */
+ public static final byte SHIFT_4_BYTES = BITS_PER_BYTE * 4;
+
/** The number of centimeters per inch. */
public static final float CM_PER_INCH = (float) 2.54;
@@ -75,17 +84,23 @@
* text space units. */
public static final int POINTS_PER_INCH = 72;
- /** The number of millipoints per point, that is 1000. */
+ /** The number of millipoints per point, that is, 1000. */
public static final int MILLIPOINTS_PER_POINT = 1000;
+ /** The carriage-return character, cast as a byte. */
public static final byte CARRIAGE_RETURN = 0x0D;
+ /** The linefeed character, cast as a byte. */
public static final byte LINEFEED = 0x0A;
+ /** The number of bytes per kilobyte, that is, 1024. */
public static final short BYTES_PER_KILOBYTE = 1024;
+ /** The number of kilobytes per megabytes, that is, 1024. */
public static final short KILOBYTES_PER_MEGABYTE = 1024;
+ /** The conversion factor between a percentage value and its decimal
+ * equivalent, that is, 100. */
public static final byte PERCENT_CONVERSION = 100;
/**
Modified: trunk/foray/foray-common/src/java/org/foray/common/XMLCharacter.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/XMLCharacter.java 2006-09-15 20:23:37 UTC (rev 8123)
+++ trunk/foray/foray-common/src/java/org/foray/common/XMLCharacter.java 2006-09-15 21:37:20 UTC (rev 8124)
@@ -35,15 +35,12 @@
*/
public final class XMLCharacter {
- public static final char CHAR_SPACE = 0x0020;
- public static final char CHAR_TAB = 0x0009;
- public static final char CHAR_CARRIAGE_RETURN = 0x000d;
- public static final char CHAR_LINEFEED = 0x000a;
-
- /**
- * As with all other character arrays in this class, elements are in pairs.
+ /**
+ * Ranges of XML base characters.
+ * The elements in this array are in pairs.
* The even-numbered (0, 2, etc.) elements are the beginning of a range, and
* the odd-numbered elements are the end of the range.
+ * @see "XML 1.0 Standard, Appendix B"
*/
private static final char[] BASE_CHAR = {
0x0041, 0x005A,
@@ -250,12 +247,26 @@
0xAC00, 0xD7A3,
};
+ /**
+ * Ranges of XML ideographic characters.
+ * The elements in this array are in pairs.
+ * The even-numbered (0, 2, etc.) elements are the beginning of a range, and
+ * the odd-numbered elements are the end of the range.
+ * @see "XML 1.0 Standard, Appendix B"
+ */
private static final char[] IDEOGRAPHIC = {
0x4E00, 0x9FA5,
0x3007, 0x3007,
0x3021, 0x3029,
};
+ /**
+ * Ranges of XML combining characters.
+ * The elements in this array are in pairs.
+ * The even-numbered (0, 2, etc.) elements are the beginning of a range, and
+ * the odd-numbered elements are the end of the range.
+ * @see "XML 1.0 Standard, Appendix B"
+ */
private static final char[] COMBINING_CHAR = {
0x0300, 0x0345,
0x0360, 0x0361,
@@ -354,6 +365,13 @@
0x309A, 0x309A,
};
+ /**
+ * Ranges of XML digit characters.
+ * The elements in this array are in pairs.
+ * The even-numbered (0, 2, etc.) elements are the beginning of a range, and
+ * the odd-numbered elements are the end of the range.
+ * @see "XML 1.0 Standard, Appendix B"
+ */
private static final char[] DIGIT = {
0x0030, 0x0039,
0x0660, 0x0669,
@@ -372,6 +390,13 @@
0x0F20, 0x0F29,
};
+ /**
+ * Ranges of XML extender characters.
+ * The elements in this array are in pairs.
+ * The even-numbered (0, 2, etc.) elements are the beginning of a range, and
+ * the odd-numbered elements are the end of the range.
+ * @see "XML 1.0 Standard, Appendix B"
+ */
private static final char[] EXTENDER = {
0x00B7, 0x00B7,
0x02D0, 0x02D0,
@@ -486,10 +511,10 @@
*/
public static boolean isXMLWhitespace(final char c) {
switch (c) {
- case CHAR_SPACE:
- case CHAR_TAB:
- case CHAR_CARRIAGE_RETURN:
- case CHAR_LINEFEED: {
+ case ' ':
+ case '\t':
+ case '\r':
+ case '\n': {
return true;
}
default: {
Modified: trunk/foray/foray-common/src/java/org/foray/common/sax/DocumentInputSource.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/sax/DocumentInputSource.java 2006-09-15 20:23:37 UTC (rev 8123)
+++ trunk/foray/foray-common/src/java/org/foray/common/sax/DocumentInputSource.java 2006-09-15 21:37:20 UTC (rev 8124)
@@ -39,6 +39,8 @@
*/
public class DocumentInputSource extends InputSource {
+
+ /** The DOM document being read. */
private Document document;
public DocumentInputSource() {
Modified: trunk/foray/foray-common/src/java/org/foray/common/sax/DocumentReader.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/sax/DocumentReader.java 2006-09-15 20:23:37 UTC (rev 8123)
+++ trunk/foray/foray-common/src/java/org/foray/common/sax/DocumentReader.java 2006-09-15 21:37:20 UTC (rev 8124)
@@ -61,12 +61,18 @@
/** Configuration variable. */
private boolean namespacePrefixes = true;
+ /** The entity resolver for this SAX reader. */
private EntityResolver entityResolver = null;
+
+ /** The DTD handler for this SAX reader. */
private DTDHandler dtdHandler = null;
+
+ /** The content handler for this SAX reader. */
private ContentHandler contentHandler = null;
+
+ /** The error handler for this SAX reader. */
private ErrorHandler errorHandler = null;
-
// //////////////////////////////////////////////////////////////////
// Configuration.
// //////////////////////////////////////////////////////////////////
Modified: trunk/foray/foray-common/src/java/org/foray/common/url/FOrayURLStreamHandlerFactory.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/url/FOrayURLStreamHandlerFactory.java 2006-09-15 20:23:37 UTC (rev 8123)
+++ trunk/foray/foray-common/src/java/org/foray/common/url/FOrayURLStreamHandlerFactory.java 2006-09-15 21:37:20 UTC (rev 8124)
@@ -47,6 +47,8 @@
/** The singleton instance of this class. */
private static FOrayURLStreamHandlerFactory urlSHFactory;
+ /** Indicates whether registration of this factory has been ...
[truncated message content] |
|
From: <vic...@us...> - 2006-09-16 00:20:08
|
Revision: 8130
http://svn.sourceforge.net/foray/?rev=8130&view=rev
Author: victormote
Date: 2006-09-15 17:20:00 -0700 (Fri, 15 Sep 2006)
Log Message:
-----------
Add some javadoc.
Modified Paths:
--------------
trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java 2006-09-15 23:52:41 UTC (rev 8129)
+++ trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java 2006-09-16 00:20:00 UTC (rev 8130)
@@ -277,8 +277,11 @@
}
/**
- * Read 4 unsigned bytes. Returns a long because int is signed,
- * and therefore can't hold 32 unsigned bits.
+ * Read 4 unsigned bytes.
+ * @return A long containing the unsigned 32-bit value.
+ * Returns a long because int is signed, and therefore can't hold 32
+ * unsigned bits.
+ * @throws IOException For I/O error.
*/
public final long readUnsignedInt() throws IOException {
long ret = readUnsignedByte();
@@ -293,6 +296,7 @@
* lowest-order byte first and the highest-order byte last.
*
* @return The unsigned integral.
+ * @throws IOException For I/O error.
*/
public long readUnsignedIntLoHi() throws IOException {
final int byte1 = readUnsignedByte();
@@ -309,8 +313,8 @@
/**
* Read an unsigned 2-byte short, and reverse the byte order, making the
* low-order byte first and the high-order byte last.
- *
* @return The unsigned integral.
+ * @throws IOException For I/O error.
*/
public int readUnsignedShortLoHi() throws IOException {
final int byte1 = readUnsignedByte();
@@ -322,6 +326,7 @@
* Read a signed 2-byte short in little-endian order, that is, making the
* first byte the low-order byte and the second byte the high-order byte.
* @return The unsigned integral.
+ * @throws IOException For I/O error.
*/
public int readShortLoHi() throws IOException {
final short beShort = readShort();
@@ -333,6 +338,8 @@
* @param stringSize The length, in bytes, of the String to be read.
* @param charEncoding The encoding scheme to be used for interpreting the
* characters in the string.
+ * @return The read String.
+ * @throws IOException For I/O error.
*/
public String readString(final int stringSize, String charEncoding)
throws IOException {
@@ -351,8 +358,12 @@
/**
* Reads a string terminated by a specific character, usually the null
* character, 0x00.
- *
+ * @param terminatingChar The value to be used as the terminator for the
+ * read String.
+ * @param charEncoding The name of the character encoding to use when
+ * converting the read bytes to chars.
* @return The string read.
+ * @throws IOException For I/O error.
*/
public String readTerminatedString(final byte terminatingChar,
final String charEncoding) throws IOException {
@@ -372,6 +383,11 @@
return readString(stringSize, charEncoding);
}
+ /**
+ * Reads a null-terminated String.
+ * @return The read String.
+ * @throws IOException For I/O error.
+ */
public String readNullTerminatedString() throws IOException {
return readTerminatedString((byte) 0x00, CHAR_ENCODE_ISO_8859_1);
}
@@ -582,6 +598,11 @@
/**
* Constructor.
+ * @param bytesToFind The bytes which are sought in the input.
+ * @param startRange Index to the first byte which should be searched.
+ * @param endRange Index to the last byte which should be searched.
+ * @param readBackward True if we are searching backward, false if we
+ * are searching forward.
*/
ByteSearcher(final byte[] bytesToFind, final long startRange,
final long endRange, final boolean readBackward) {
@@ -591,6 +612,12 @@
this.readBackward = readBackward;
}
+ /**
+ * Searches the content for the sought byte sequence.
+ * @return The index to the beginning of the sought byte sequence, or
+ * -1 if the sought byte sequence is not in the input.
+ * @throws IOException For I/O error.
+ */
private long searchBytes() throws IOException {
if (! isInputValid()) {
return -1;
@@ -609,7 +636,8 @@
readNextChunk();
readNextChunk();
- while (offsetToContent < 0 && ! endOfFile) {
+ while (offsetToContent < 0
+ && ! endOfFile) {
searchForMatch();
if (endOfFile) {
return -1;
@@ -619,6 +647,9 @@
return offsetToContent;
}
+ /**
+ * Searches the current viewbox for the sought byte sequence.
+ */
private void searchForMatch() {
if (readBackward) {
while (viewboxPointer >= IDEAL_READ_SIZE) {
@@ -641,10 +672,18 @@
}
}
+ /**
+ * Computes the offset to the sought content.
+ * @param i The current viewbox index.
+ */
private void computeOffsetToContent(final int i) {
offsetToContent = lastReadStart - lastViewboxTarget + i;
}
+ /**
+ * Reads another chunk of the input for processing.
+ * @throws IOException For I/O error.
+ */
private void readNextChunk() throws IOException {
if (endOfFile) {
return;
@@ -699,6 +738,10 @@
lastViewboxTarget = viewboxTarget;
}
+ /**
+ * Computes the read start value.
+ * @return The read start value.
+ */
private long computeReadStart() {
long value;
if (lastReadStart == -1) {
@@ -720,6 +763,10 @@
return value;
}
+ /**
+ * Computes the read end value.
+ * @return The read end value.
+ */
private long computeReadEnd() {
long value;
if (lastReadStart == -1) {
@@ -741,6 +788,10 @@
return value;
}
+ /**
+ * Computes the viewbox target.
+ * @return The new viewbox target.
+ */
private int computeViewboxTarget() {
if (readBackward) {
return 0;
@@ -748,6 +799,11 @@
return VIEWBOX_SIZE - actualReadSize;
}
+ /**
+ * Indicates whether the input is valid.
+ * @return True iff the input is valid.
+ * @throws IOException For I/O error.
+ */
private boolean isInputValid() throws IOException {
if (startRange < 0) {
return false;
Modified: trunk/foray/scripts/checkstyle-suppressions.xml
===================================================================
--- trunk/foray/scripts/checkstyle-suppressions.xml 2006-09-15 23:52:41 UTC (rev 8129)
+++ trunk/foray/scripts/checkstyle-suppressions.xml 2006-09-16 00:20:00 UTC (rev 8130)
@@ -26,8 +26,6 @@
files="org.foray.demo.*"/>
<suppress checks="Javadoc[MVS].*"
files="org.foray.area.*"/>
- <suppress checks="Javadoc[M].*"
- files="org.foray.common.*"/>
<suppress checks="Javadoc[MVS].*"
files="org.foray.core.*"/>
<suppress checks="Javadoc[MVS].*"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-26 14:46:50
|
Revision: 8231
http://svn.sourceforge.net/foray/?rev=8231&view=rev
Author: victormote
Date: 2006-09-26 07:46:22 -0700 (Tue, 26 Sep 2006)
Log Message:
-----------
Improvements to the build.
Modified Paths:
--------------
trunk/foray/foray-app/scripts/build.xml
trunk/foray/foray-areatree/scripts/build.xml
trunk/foray/foray-common/scripts/build.xml
trunk/foray/foray-core/scripts/build.xml
trunk/foray/foray-font/scripts/build.xml
trunk/foray/foray-fotree/scripts/build.xml
trunk/foray/foray-graphic/scripts/build.xml
trunk/foray/foray-hyphen-r/scripts/build.xml
trunk/foray/foray-layout/scripts/build.xml
trunk/foray/foray-mif/scripts/build.xml
trunk/foray/foray-output/scripts/build.xml
trunk/foray/foray-pdf/scripts/build.xml
trunk/foray/foray-pioneer/scripts/build.xml
trunk/foray/foray-pretty/scripts/build.xml
trunk/foray/foray-ps/scripts/build.xml
trunk/foray/foray-render/scripts/build.xml
trunk/foray/foray-text/scripts/build.xml
trunk/foray/scripts/build-common.xml
trunk/foray/scripts/build.xml
Modified: trunk/foray/foray-app/scripts/build.xml
===================================================================
--- trunk/foray/foray-app/scripts/build.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/foray-app/scripts/build.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -14,6 +14,8 @@
<property name="src.dir" value="${module.dir}/src"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="jar.file"
+ location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
@@ -102,12 +104,12 @@
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
- <echo message="Creating the jar file ${build.dir}/${name}.jar"/>
+ <echo message="Creating the jar file ${jar.file}"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
- <jar jarfile="${build.dir}/${name}-${module}.jar"
+ <jar jarfile="${jar.file}"
basedir="${classes.dir}"
>
<manifest>
@@ -166,6 +168,7 @@
<fileset dir="${src.dir}" includes="**/*.java"/>
<classpath>
<path refid="libs-build-classpath"/>
+ <path location="${jar.file}"/>
</classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-areatree/scripts/build.xml
===================================================================
--- trunk/foray/foray-areatree/scripts/build.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/foray-areatree/scripts/build.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -14,6 +14,8 @@
<property name="src.dir" value="${module.dir}/src"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="jar.file"
+ location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
@@ -65,12 +67,12 @@
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
- <echo message="Creating the jar file ${build.dir}/${name}.jar"/>
+ <echo message="Creating the jar file ${jar.file}"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
- <jar jarfile="${build.dir}/${name}-${module}.jar"
+ <jar jarfile="${jar.file}"
basedir="${classes.dir}"
>
<manifest>
@@ -134,9 +136,7 @@
<fileset dir="${src.dir}" includes="**/*.java"/>
<classpath>
<path refid="libs-build-classpath"/>
- <fileset dir="${build.dir}">
- <include name="${name}-${module}.jar"/>
- </fileset>
+ <path location="${jar.file}"/>
</classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-common/scripts/build.xml
===================================================================
--- trunk/foray/foray-common/scripts/build.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/foray-common/scripts/build.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -14,6 +14,8 @@
<property name="src.dir" value="${module.dir}/src"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="jar.file"
+ location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
@@ -65,12 +67,12 @@
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
- <echo message="Creating the jar file ${build.dir}/${name}.jar"/>
+ <echo message="Creating the jar file ${jar.file}"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
- <jar jarfile="${build.dir}/${name}-${module}.jar"
+ <jar jarfile="${jar.file}"
basedir="${classes.dir}"
>
<manifest>
@@ -132,6 +134,10 @@
</taskdef>
<checkstyle config="../../scripts/checkstyle-config.xml">
<fileset dir="${src.dir}" includes="**/*.java"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <path location="${jar.file}"/>
+ </classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-core/scripts/build.xml
===================================================================
--- trunk/foray/foray-core/scripts/build.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/foray-core/scripts/build.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -14,6 +14,8 @@
<property name="src.dir" value="${module.dir}/src"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="jar.file"
+ location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
@@ -65,12 +67,12 @@
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
- <echo message="Creating the jar file ${build.dir}/${name}.jar"/>
+ <echo message="Creating the jar file ${jar.file}"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
- <jar jarfile="${build.dir}/${name}-${module}.jar"
+ <jar jarfile="${jar.file}"
basedir="${classes.dir}"
>
<manifest>
@@ -134,9 +136,7 @@
<fileset dir="${src.dir}" includes="**/*.java"/>
<classpath>
<path refid="libs-build-classpath"/>
- <fileset dir="${build.dir}">
- <include name="${name}-${module}.jar"/>
- </fileset>
+ <path location="${jar.file}"/>
</classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-font/scripts/build.xml
===================================================================
--- trunk/foray/foray-font/scripts/build.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/foray-font/scripts/build.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -14,6 +14,8 @@
<property name="src.dir" value="${module.dir}/src"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="jar.file"
+ location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
@@ -75,12 +77,12 @@
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
- <echo message="Creating the jar file ${build.dir}/${name}.jar"/>
+ <echo message="Creating the jar file ${jar.file}"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
- <jar jarfile="${build.dir}/${name}-${module}.jar"
+ <jar jarfile="${jar.file}"
basedir="${classes.dir}"
>
<manifest>
@@ -144,9 +146,7 @@
<fileset dir="${src.dir}" includes="**/*.java"/>
<classpath>
<path refid="libs-build-classpath"/>
- <fileset dir="${build.dir}">
- <include name="${name}-${module}.jar"/>
- </fileset>
+ <path location="${jar.file}"/>
</classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-fotree/scripts/build.xml
===================================================================
--- trunk/foray/foray-fotree/scripts/build.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/foray-fotree/scripts/build.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -14,6 +14,8 @@
<property name="src.dir" value="${module.dir}/src"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="jar.file"
+ location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
@@ -73,12 +75,12 @@
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
- <echo message="Creating the jar file ${build.dir}/${name}.jar"/>
+ <echo message="Creating the jar file ${jar.file}"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
- <jar jarfile="${build.dir}/${name}-${module}.jar"
+ <jar jarfile="${jar.file}"
basedir="${classes.dir}"
>
<manifest>
@@ -142,9 +144,7 @@
<fileset dir="${src.dir}" includes="**/*.java"/>
<classpath>
<path refid="libs-build-classpath"/>
- <fileset dir="${build.dir}">
- <include name="${name}-${module}.jar"/>
- </fileset>
+ <path location="${jar.file}"/>
</classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-graphic/scripts/build.xml
===================================================================
--- trunk/foray/foray-graphic/scripts/build.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/foray-graphic/scripts/build.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -14,6 +14,8 @@
<property name="src.dir" value="${module.dir}/src"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="jar.file"
+ location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
@@ -116,12 +118,12 @@
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
- <echo message="Creating the jar file ${build.dir}/${name}.jar"/>
+ <echo message="Creating the jar file ${jar.file}"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
- <jar jarfile="${build.dir}/${name}-${module}.jar"
+ <jar jarfile="${jar.file}"
basedir="${classes.dir}"
>
<manifest>
@@ -185,9 +187,7 @@
<fileset dir="${src.dir}" includes="**/*.java"/>
<classpath>
<path refid="libs-build-classpath"/>
- <fileset dir="${build.dir}">
- <include name="${name}-${module}.jar"/>
- </fileset>
+ <path location="${jar.file}"/>
</classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-hyphen-r/scripts/build.xml
===================================================================
--- trunk/foray/foray-hyphen-r/scripts/build.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/foray-hyphen-r/scripts/build.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -168,9 +168,7 @@
<fileset dir="${src.dir}" includes="**/*.java"/>
<classpath>
<path refid="libs-build-classpath"/>
- <fileset dir="${build.dir}">
- <include name="${name}-${module}.jar"/>
- </fileset>
+ <path location="${jar.file}"/>
</classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-layout/scripts/build.xml
===================================================================
--- trunk/foray/foray-layout/scripts/build.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/foray-layout/scripts/build.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -14,6 +14,8 @@
<property name="src.dir" value="${module.dir}/src"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="jar.file"
+ location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
@@ -61,12 +63,12 @@
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
- <echo message="Creating the jar file ${build.dir}/${name}.jar"/>
+ <echo message="Creating the jar file ${jar.file}"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
- <jar jarfile="${build.dir}/${name}-${module}.jar"
+ <jar jarfile="${jar.file}"
basedir="${classes.dir}"
>
<manifest>
@@ -130,9 +132,7 @@
<fileset dir="${src.dir}" includes="**/*.java"/>
<classpath>
<path refid="libs-build-classpath"/>
- <fileset dir="${build.dir}">
- <include name="${name}-${module}.jar"/>
- </fileset>
+ <path location="${jar.file}"/>
</classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-mif/scripts/build.xml
===================================================================
--- trunk/foray/foray-mif/scripts/build.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/foray-mif/scripts/build.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -14,6 +14,8 @@
<property name="src.dir" value="${module.dir}/src"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="jar.file"
+ location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
@@ -61,12 +63,12 @@
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
- <echo message="Creating the jar file ${build.dir}/${name}.jar"/>
+ <echo message="Creating the jar file ${jar.file}"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
- <jar jarfile="${build.dir}/${name}-${module}.jar"
+ <jar jarfile="${jar.file}"
basedir="${classes.dir}"
>
<manifest>
@@ -128,6 +130,10 @@
</taskdef>
<checkstyle config="../../scripts/checkstyle-config.xml">
<fileset dir="${src.dir}" includes="**/*.java"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <path location="${jar.file}"/>
+ </classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-output/scripts/build.xml
===================================================================
--- trunk/foray/foray-output/scripts/build.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/foray-output/scripts/build.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -14,6 +14,8 @@
<property name="src.dir" value="${module.dir}/src"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="jar.file"
+ location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
@@ -74,12 +76,12 @@
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
- <echo message="Creating the jar file ${build.dir}/${name}.jar"/>
+ <echo message="Creating the jar file ${jar.file}"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
- <jar jarfile="${build.dir}/${name}-${module}.jar"
+ <jar jarfile="${jar.file}"
basedir="${classes.dir}"
>
<manifest>
@@ -141,6 +143,10 @@
</taskdef>
<checkstyle config="../../scripts/checkstyle-config.xml">
<fileset dir="${src.dir}" includes="**/*.java"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <path location="${jar.file}"/>
+ </classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-pdf/scripts/build.xml
===================================================================
--- trunk/foray/foray-pdf/scripts/build.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/foray-pdf/scripts/build.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -17,6 +17,8 @@
<property name="src.dir" value="${module.dir}/src"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="jar.file"
+ location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
@@ -68,12 +70,12 @@
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
- <echo message="Creating the jar file ${build.dir}/${name}.jar"/>
+ <echo message="Creating the jar file ${jar.file}"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
- <jar jarfile="${build.dir}/${name}-${module}.jar"
+ <jar jarfile="${jar.file}"
basedir="${classes.dir}"
>
<manifest>
@@ -137,9 +139,7 @@
<fileset dir="${src.dir}" includes="**/*.java"/>
<classpath>
<path refid="libs-build-classpath"/>
- <fileset dir="${build.dir}">
- <include name="${name}-${module}.jar"/>
- </fileset>
+ <path location="${jar.file}"/>
</classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-pioneer/scripts/build.xml
===================================================================
--- trunk/foray/foray-pioneer/scripts/build.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/foray-pioneer/scripts/build.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -14,6 +14,8 @@
<property name="src.dir" value="${module.dir}/src"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="jar.file"
+ location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
@@ -68,12 +70,12 @@
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
- <echo message="Creating the jar file ${build.dir}/${name}.jar"/>
+ <echo message="Creating the jar file ${jar.file}"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
- <jar jarfile="${build.dir}/${name}-${module}.jar"
+ <jar jarfile="${jar.file}"
basedir="${classes.dir}"
>
<manifest>
@@ -137,9 +139,7 @@
<fileset dir="${src.dir}" includes="**/*.java"/>
<classpath>
<path refid="libs-build-classpath"/>
- <fileset dir="${build.dir}">
- <include name="${name}-${module}.jar"/>
- </fileset>
+ <path location="${jar.file}"/>
</classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-pretty/scripts/build.xml
===================================================================
--- trunk/foray/foray-pretty/scripts/build.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/foray-pretty/scripts/build.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -14,6 +14,8 @@
<property name="src.dir" value="${module.dir}/src"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="jar.file"
+ location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
@@ -65,12 +67,12 @@
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
- <echo message="Creating the jar file ${build.dir}/${name}.jar"/>
+ <echo message="Creating the jar file ${jar.file}"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
- <jar jarfile="${build.dir}/${name}-${module}.jar"
+ <jar jarfile="${jar.file}"
basedir="${classes.dir}"
>
<manifest>
@@ -134,6 +136,7 @@
<fileset dir="${src.dir}" includes="**/*.java"/>
<classpath>
<path refid="libs-build-classpath"/>
+ <path location="${jar.file}"/>
</classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-ps/scripts/build.xml
===================================================================
--- trunk/foray/foray-ps/scripts/build.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/foray-ps/scripts/build.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -14,6 +14,8 @@
<property name="src.dir" value="${module.dir}/src"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="jar.file"
+ location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
@@ -40,17 +42,11 @@
<mkdir dir="${classes.dir}"/>
</target>
- <!-- =================================================================== -->
- <!-- Prepares the source code -->
- <!-- =================================================================== -->
- <target name="prepare-src"
- depends="prepare">
- </target>
<!-- =================================================================== -->
<!-- Compiles the source directory -->
<!-- =================================================================== -->
- <target name="compile" depends="prepare-src">
+ <target name="compile" depends="prepare">
<echo message="Compiling the sources in ${src.dir}"/>
<javac destdir="${classes.dir}"
debug="${debug}"
@@ -68,12 +64,12 @@
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
- <echo message="Creating the jar file ${build.dir}/${name}.jar"/>
+ <echo message="Creating the jar file ${jar.file}"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
- <jar jarfile="${build.dir}/${name}-${module}.jar"
+ <jar jarfile="${jar.file}"
basedir="${classes.dir}"
>
<manifest>
@@ -141,9 +137,7 @@
</fileset>
<classpath>
<path refid="libs-build-classpath"/>
- <fileset dir="${build.dir}">
- <include name="${name}-${module}.jar"/>
- </fileset>
+ <path location="${jar.file}"/>
</classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-render/scripts/build.xml
===================================================================
--- trunk/foray/foray-render/scripts/build.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/foray-render/scripts/build.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -14,6 +14,8 @@
<property name="src.dir" value="${module.dir}/src"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="jar.file"
+ location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
<property name="viewer.resources.src.dir"
value="${src.dir}/java/org/foray/render/awt/viewer/resources"/>
<property name="viewer.images.src.dir"
@@ -89,12 +91,12 @@
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
- <echo message="Creating the jar file ${build.dir}/${name}.jar"/>
+ <echo message="Creating the jar file ${jar.file}"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
- <jar jarfile="${build.dir}/${name}-${module}.jar"
+ <jar jarfile="${jar.file}"
basedir="${classes.dir}"
>
<manifest>
@@ -158,9 +160,7 @@
<fileset dir="${src.dir}" includes="**/*.java"/>
<classpath>
<path refid="libs-build-classpath"/>
- <fileset dir="${build.dir}">
- <include name="${name}-${module}.jar"/>
- </fileset>
+ <path location="${jar.file}"/>
</classpath>
</checkstyle>
</target>
Modified: trunk/foray/foray-text/scripts/build.xml
===================================================================
--- trunk/foray/foray-text/scripts/build.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/foray-text/scripts/build.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -14,6 +14,8 @@
<property name="src.dir" value="${module.dir}/src"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="jar.file"
+ location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
@@ -68,7 +70,7 @@
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
- <echo message="Creating the jar file ${build.dir}/${name}.jar"/>
+ <echo message="Creating the jar file ${jar.file}"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
@@ -81,7 +83,7 @@
dir="${foray.home}/foray-text/build/ant">
<include name="hyph/**"/>
</fileset>
- <jar jarfile="${build.dir}/${name}-${module}.jar">
+ <jar jarfile="${jar.file}">
<fileset refid="foray-text-classes"/>
<fileset refid="foray-text-resources"/>
<manifest>
@@ -145,9 +147,7 @@
<fileset dir="${src.dir}" includes="**/*.java"/>
<classpath>
<path refid="libs-build-classpath"/>
- <fileset dir="${build.dir}">
- <include name="${name}-${module}.jar"/>
- </fileset>
+ <path location="${jar.file}"/>
</classpath>
</checkstyle>
</target>
Modified: trunk/foray/scripts/build-common.xml
===================================================================
--- trunk/foray/scripts/build-common.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/scripts/build-common.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -33,7 +33,8 @@
</target>
<target name="common-init">
- <property name="name" value="foray"/>
+ <property name="name" value="FOray"/>
+ <property name="name.lowercase" value="foray"/>
<property name="contact.info"
value="The FOray project http://www.foray.org"/>
<property name="version" value="0.2"/>
Modified: trunk/foray/scripts/build.xml
===================================================================
--- trunk/foray/scripts/build.xml 2006-09-26 00:36:26 UTC (rev 8230)
+++ trunk/foray/scripts/build.xml 2006-09-26 14:46:22 UTC (rev 8231)
@@ -3,53 +3,21 @@
<project default="package-all" basedir=".">
- <!-- Set up a prefix to designate environment variables. -->
- <property environment="env"/>
+ <import file="./build-common.xml"/>
- <target name="env">
- <!-- If the environment variable FORAY_CONFIG is set, use it. -->
- <condition property="foray.config" value="${env.FORAY_CONFIG}">
- <and>
- <isset property="env.FORAY_CONFIG"/>
- <available file="${env.FORAY_CONFIG}"/>
- </and>
- </condition>
- <!-- Otherwise, set it to the FOray scripts directory. -->
- <property name="foray.config" location="."/>
- <echo>foray.config: ${foray.config}</echo>
-
- <!-- Retrieve externally-configured properties. -->
- <property file="${foray.config}/foray-build.properties"/>
-
- <!-- Get a default for {foray.home}. -->
- <property name="foray.home" location=".."/>
- <echo>foray.home: ${foray.home}</echo>
-
- <!-- Set up dependent properties. -->
- <property name="lib.dir" location="${foray.home}/lib"/>
- <property name="axsl.build" location="${lib.dir}"/>
-
- <!-- Set defaults for other properties. -->
- <property name="jai.libs" location="${lib.dir}"/>
-
- </target>
-
<!-- =================================================================== -->
<!-- Initialization target -->
<!-- =================================================================== -->
- <target name="init" depends="env">
- <tstamp/>
-
- <property name="name" value="FOray"/>
- <property name="name.lowercase" value="foray"/>
- <property nam...
[truncated message content] |