[FOray-commit] SF.net SVN: foray: [7907] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-09-05 02:09:44
|
Revision: 7907
http://svn.sourceforge.net/foray/?rev=7907&view=rev
Author: victormote
Date: 2006-09-04 19:09:16 -0700 (Mon, 04 Sep 2006)
Log Message:
-----------
Fix variable visibility problems caught by checkstyle.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
trunk/foray/foray-app/src/java/org/foray/app/FOray.java
trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFFileCollection.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableColumn.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AlignmentAdjust.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BaselineShift.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Enumerated.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Extent.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Indent.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/InitialPageNumber.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LineHeight.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TextDecoration.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/WritingMode.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnFromParent.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnInheritedProp.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnNearestSpecProp.java
trunk/foray/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-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -68,7 +68,7 @@
URL xmlInput = null;
/** The output file. */
- public File outfile = null;
+ private File outfile = null;
/** The input mode. */
int inputmode = INPUT_NOT_SET;
Modified: trunk/foray/foray-app/src/java/org/foray/app/FOray.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/FOray.java 2006-09-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-app/src/java/org/foray/app/FOray.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -51,8 +51,8 @@
if (sessionConfig.optionVerbosity().equals("debug")) {
e.printStackTrace();
}
- if (options.outfile != null) {
- options.outfile.delete();
+ if (options.getOutputFile() != null) {
+ options.getOutputFile().delete();
}
}
System.exit(2);
@@ -63,8 +63,8 @@
if (sessionConfig.optionVerbosity().equals("debug")) {
e.printStackTrace();
}
- if (options.outfile != null) {
- options.outfile.delete();
+ if (options.getOutputFile() != null) {
+ options.getOutputFile().delete();
}
}
System.exit(1);
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-09-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -61,7 +61,7 @@
* PageSequence, it can also be used to get an ordered list of PageSequence
* objects.
*/
- public ArrayList pageCollectionsProcessed = new ArrayList();
+ private ArrayList pageCollectionsProcessed = new ArrayList();
/**
* Collection of objects that have registered to be notified about
@@ -248,4 +248,11 @@
visitor.render(this);
}
+ /**
+ * @return Returns the pageCollectionsProcessed.
+ */
+ public ArrayList getPageCollectionsProcessed() {
+ return this.pageCollectionsProcessed;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2006-09-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -103,7 +103,7 @@
* -1 if this PageCollection is not found.
*/
public int sequence() {
- return getAreaTree().pageCollectionsProcessed.indexOf(this);
+ return getAreaTree().getPageCollectionsProcessed().indexOf(this);
}
/**
@@ -114,8 +114,8 @@
public PageCollection previousPageCollection() {
final int sequence = sequence();
if (sequence > 0) {
- return (PageCollection) getAreaTree().pageCollectionsProcessed.get
- (sequence - 1);
+ return (PageCollection) getAreaTree().getPageCollectionsProcessed()
+ .get(sequence - 1);
}
return null;
}
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-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/TTFFileCollection.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -36,7 +36,7 @@
/**
* The TTCHeader instance that represents this files TTC Header table.
*/
- public TTCTableHeader ttcHeader = null;
+ private TTCTableHeader ttcHeader = null;
/** Collection of TTFTableDirectory entries. There should be one entry for
* each logical font in the TTC file. */
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -54,7 +54,7 @@
* then convert to array when parsing is complete.)*/
protected ArrayList children = new ArrayList();
- public PropertyList propertyList;
+ private PropertyList propertyList;
protected String systemId;
protected int line;
protected int column;
@@ -2566,4 +2566,11 @@
viewportWidth);
}
+ /**
+ * @return Returns the propertyList.
+ */
+ public PropertyList getPropertyList() {
+ return this.propertyList;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableColumn.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableColumn.java 2006-09-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableColumn.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -147,7 +147,7 @@
* {@inheritDoc}
*/
public double traitColumnWidthTableUnits() {
- return propertyList.getColumnWidthTableUnits();
+ return getPropertyList().getColumnWidthTableUnits();
}
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AlignmentAdjust.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AlignmentAdjust.java 2006-09-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AlignmentAdjust.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -121,7 +121,7 @@
if (fobj instanceof Character) {
base = fobj.traitFontSize(context);
}
- base = fobj.propertyList.getLineHeight(context, OPTIMUM);
+ base = fobj.getPropertyList().getLineHeight(context, OPTIMUM);
return (int) ((DtPercentage) this.value).getValue() * base;
}
return traitValueAmountNoInstance();
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BaselineShift.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BaselineShift.java 2006-09-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BaselineShift.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -108,7 +108,7 @@
if (this.value instanceof DtPercentage) {
/* TODO: This base value is almost certainly wrong. */
final int base = fobj.effectiveParent(context)
- .propertyList.getLineHeight(context, OPTIMUM);
+ .getPropertyList().getLineHeight(context, OPTIMUM);
return Math.round(((DtPercentage) this.value).getValue() * base);
}
return traitValueNoInstance();
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Enumerated.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Enumerated.java 2006-09-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Enumerated.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -167,7 +167,7 @@
}
case Constants.FOPROP_WHITE_SPACE: {
if (parent != null) {
- return parent.propertyList.traitWhiteSpace(context);
+ return parent.getPropertyList().traitWhiteSpace(context);
}
return Constants.FOVAL_NORMAL;
}
@@ -191,7 +191,7 @@
}
case Constants.FOPROP_PAGE_BREAK_INSIDE: {
if (parent != null) {
- return parent.propertyList.traitPageBreakInside(context);
+ return parent.getPropertyList().traitPageBreakInside(context);
}
return Constants.FOVAL_AUTO;
}
@@ -399,10 +399,10 @@
return fobj.traitOverflow(context);
}
case Constants.FOPROP_PAGE_POSITION: {
- return fobj.propertyList.getPagePosition();
+ return fobj.getPropertyList().getPagePosition();
}
case Constants.FOPROP_POSITION: {
- return fobj.propertyList.getPosition(context);
+ return fobj.getPropertyList().getPosition(context);
}
case Constants.FOPROP_RELATIVE_ALIGN: {
return fobj.traitRelativeAlign(context);
@@ -429,7 +429,7 @@
return fobj.traitUnicodeBidi(context);
}
case Constants.FOPROP_WHITE_SPACE: {
- return fobj.propertyList.traitWhiteSpace(context);
+ return fobj.getPropertyList().traitWhiteSpace(context);
}
case Constants.FOPROP_WHITE_SPACE_TREATMENT: {
return fobj.traitWhiteSpaceTreatment(context);
@@ -447,13 +447,13 @@
return fobj.traitFloat(context);
}
case Constants.FOPROP_PAGE_BREAK_AFTER: {
- return fobj.propertyList.traitPageBreakAfter(context);
+ return fobj.getPropertyList().traitPageBreakAfter(context);
}
case Constants.FOPROP_PAGE_BREAK_BEFORE: {
- return fobj.propertyList.traitPageBreakBefore(context);
+ return fobj.getPropertyList().traitPageBreakBefore(context);
}
case Constants.FOPROP_PAGE_BREAK_INSIDE: {
- return fobj.propertyList.traitPageBreakInside(context);
+ return fobj.getPropertyList().traitPageBreakInside(context);
}
case Constants.FOPROP_REFERENCE_ORIENTATION: {
return fobj.traitReferenceOrientation(context);
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Extent.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Extent.java 2006-09-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Extent.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -103,7 +103,7 @@
}
private int computeBase(final FOContext context, final FObj fobj) {
- final DtWritingMode writingMode = fobj.propertyList.getWritingMode(
+ final DtWritingMode writingMode = fobj.getPropertyList().getWritingMode(
context);
byte absoluteAxis = -1;
if (fobj instanceof RegionBefore || fobj instanceof RegionAfter) {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Indent.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Indent.java 2006-09-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Indent.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -128,8 +128,8 @@
if (parent == null) {
return 0;
}
- return fobj.effectiveParent(context).propertyList.getIndent(context,
- direction, ipdContainingRA);
+ return fobj.effectiveParent(context).getPropertyList().getIndent(
+ context, direction, ipdContainingRA);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/InitialPageNumber.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/InitialPageNumber.java 2006-09-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/InitialPageNumber.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -77,7 +77,7 @@
final FObj parent = fobj.effectiveParent(context);
if (parent != null) {
final InitialPageNumber property = (InitialPageNumber)
- parent.propertyList.getProperty
+ parent.getPropertyList().getProperty
(Constants.FOPROP_INITIAL_PAGE_NUMBER);
return property.getValue(context, parent,
lastPageNumberUsed);
@@ -113,7 +113,7 @@
if (keyword == Constants.FOVAL_INHERIT) {
final FObj parent = fobj.realParent();
if (parent != null) {
- final PropertyList propertyList = parent.propertyList;
+ final PropertyList propertyList = parent.getPropertyList();
return propertyList.getRawInitialPageNumber();
}
return getRawValueNoInstance();
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LineHeight.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LineHeight.java 2006-09-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LineHeight.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -124,7 +124,7 @@
}
case Constants.FOVAL_INHERIT: {
final float multiplier =
- fobj.effectiveParent(context).propertyList
+ fobj.effectiveParent(context).getPropertyList()
.getLineHeightMultiplier(context);
return Math.round(multiplier * fobj.traitFontSize(context));
}
@@ -169,7 +169,7 @@
return getValueMultiplierNoInstance(context, fobj);
}
case Constants.FOVAL_INHERIT: {
- return fobj.effectiveParent(context).propertyList
+ return fobj.effectiveParent(context).getPropertyList()
.getLineHeightMultiplier(context);
}
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TextDecoration.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TextDecoration.java 2006-09-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TextDecoration.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -152,7 +152,7 @@
if (nearestBlock == null) {
return null;
}
- return nearestBlock.propertyList.getTextDecoration(context);
+ return nearestBlock.getPropertyList().getTextDecoration(context);
}
return null;
}
@@ -165,7 +165,7 @@
if (fobjParent == null) {
return null;
}
- return fobjParent.propertyList.getTextDecoration(context);
+ return fobjParent.getPropertyList().getTextDecoration(context);
}
}
if (this.value instanceof DtTextDeco) {
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-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/WritingMode.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -62,7 +62,7 @@
if (fobj instanceof Root) {
return DtWritingMode.obtainWritingMode("lr-tb");
}
- return fobj.effectiveParent(context).propertyList.getWritingMode(
+ return fobj.effectiveParent(context).getPropertyList().getWritingMode(
context);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnFromParent.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnFromParent.java 2006-09-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnFromParent.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -93,7 +93,7 @@
* TODO: This is not right. It needs to return the PropertyValue
* regardless of whether the Property was explicitly set or not.
*/
- final Property ps = parent.propertyList.getProperty(propertyType);
+ final Property ps = parent.getPropertyList().getProperty(propertyType);
if (ps == null) {
throw new PropertyException("Invalid operand: 'from-parent' "
+ "function");
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnInheritedProp.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnInheritedProp.java 2006-09-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnInheritedProp.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -84,7 +84,7 @@
* TODO: This is not right. It needs to return the inherited value
* regardless of whether the Property was explicitly set or not.
*/
- final Property ps = parent.propertyList.getProperty(propertyType);
+ final Property ps = parent.getPropertyList().getProperty(propertyType);
if (ps == null) {
throw new PropertyException("Invalid operand: "
+ "'inherited-property-value' function");
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnNearestSpecProp.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnNearestSpecProp.java 2006-09-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnNearestSpecProp.java 2006-09-05 02:09:16 UTC (rev 7907)
@@ -82,7 +82,7 @@
while (parent != null && ps == null) {
final short propertyType = PropertyMakerFO.enumeratePropertyName
(propertySought);
- ps = parent.propertyList.getProperty(propertyType);
+ ps = parent.getPropertyList().getProperty(propertyType);
/* TODO: Provide the right context. */
parent = fobj.effectiveParent(null);
}
Modified: trunk/foray/scripts/checkstyle-config.xml
===================================================================
--- trunk/foray/scripts/checkstyle-config.xml 2006-09-05 01:53:58 UTC (rev 7906)
+++ trunk/foray/scripts/checkstyle-config.xml 2006-09-05 02:09:16 UTC (rev 7907)
@@ -50,14 +50,23 @@
<module name="JavadocType"/>
<!-- Avoid magic numbers. -->
- <!--<module name="MagicNumber"/>-->
+ <module name="MagicNumber">
+ <property name="severity" value="ignore"/>
+ </module>
<!-- Avoid redundant and unused imports. -->
<module name="RedundantImport"/>
- <!--<module name="UnusedImports"/>-->
+ <module name="UnusedImports">
+ <!--Ignore this for now because it doesn't handle javadoc correctly.-->
+ <property name="severity" value="ignore"/>
+ </module>
- <!-- Don't allow non-private instance variables. -->
- <!--<module name="VisibilityModifier"/>-->
+ <!-- Don't allow public instance variables. -->
+ <module name="VisibilityModifier">
+ <property name="packageAllowed" value="true"/>
+ <property name="protectedAllowed" value="true"/>
+ <property name="severity" value="error"/>
+ </module>
<!-- Check the order and redundancy of modifiers. -->
<module name="ModifierOrder"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|