Revision: 7819
Author: victormote
Date: 2006-07-23 12:39:14 -0700 (Sun, 23 Jul 2006)
ViewCVS: http://svn.sourceforge.net/foray/?rev=7819&view=rev
Log Message:
-----------
Implement standard use of final modifier on local variable and method parameters.
Modified Paths:
--------------
trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
Modified: trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
===================================================================
--- trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2006-07-23 19:36:26 UTC (rev 7818)
+++ trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2006-07-23 19:39:14 UTC (rev 7819)
@@ -66,14 +66,14 @@
/**
* Constructor.
*/
- public LayoutStrategy(Log logger) {
+ public LayoutStrategy(final Log logger) {
this.logger = logger;
}
/**
* {@inheritDoc}
*/
- public void formatPageSequence(PageCollection pageCollection)
+ public void formatPageSequence(final PageCollection pageCollection)
throws AreaWException {
if (areaTree == null) {
areaTree = pageCollection.getWritableAreaTree();
@@ -98,22 +98,22 @@
public abstract void layoutStaticContent(PageSequence pageSequence,
Region region, RegionArea area) throws AreaWException;
- public void handleLineBreakText(LineOutput lineOutput, LineText text,
- int startOffset, int sizeInChars, int sizeInline,
- boolean hasDiscretionaryHyphen, boolean hasFauxSmallCaps,
- boolean isLastItemOnLine)
+ public void handleLineBreakText(final LineOutput lineOutput,
+ LineText text, final int startOffset, final int sizeInChars,
+ final int sizeInline, final boolean hasDiscretionaryHyphen,
+ final boolean hasFauxSmallCaps, final boolean isLastItemOnLine)
throws TextException {
checkLayoutTarget(lineOutput);
- LineArea lineArea = (LineArea) lineOutput;
+ final LineArea lineArea = (LineArea) lineOutput;
RetrieveMarker retrieveMarker = null;
if (text instanceof org.axsl.foR.FOLineText) {
- FOLineText foLineText = (FOLineText) text;
+ final FOLineText foLineText = (FOLineText) text;
retrieveMarker = foLineText.getRetrieveMarker();
text = foLineText.getWrapped();
}
if (text instanceof FOText) {
- FOText foText = (FOText) text;
+ final FOText foText = (FOText) text;
lineArea.makeTextArea(foText, sizeInline, startOffset, sizeInChars,
hasDiscretionaryHyphen, hasFauxSmallCaps, isLastItemOnLine,
retrieveMarker);
@@ -122,39 +122,39 @@
}
}
- public void handleLineBreakNonText(LineOutput lineOutput,
- LineNonText nonText, int sizeInline)
+ public void handleLineBreakNonText(final LineOutput lineOutput,
+ LineNonText nonText, final int sizeInline)
throws TextException {
checkLayoutTarget(lineOutput);
- LineArea lineArea = (LineArea) lineOutput;
+ final LineArea lineArea = (LineArea) lineOutput;
RetrieveMarker retrieveMarker = null;
if (nonText instanceof org.axsl.foR.FOLineNonText) {
- FOLineNonText foLineNonText = (FOLineNonText) nonText;
+ final FOLineNonText foLineNonText = (FOLineNonText) nonText;
retrieveMarker = foLineNonText.getRetrieveMarker();
nonText = foLineNonText.getWrapped();
}
if (nonText instanceof InstreamForeignObject) {
- InstreamForeignObject ifo = (InstreamForeignObject) nonText;
+ final InstreamForeignObject ifo = (InstreamForeignObject) nonText;
lineArea.makeForeignObjectArea(ifo, sizeInline, retrieveMarker);
} else if (nonText instanceof ExternalGraphic) {
- ExternalGraphic graphic = (ExternalGraphic) nonText;
+ final ExternalGraphic graphic = (ExternalGraphic) nonText;
lineArea.makeExternalGraphicArea(graphic, sizeInline,
retrieveMarker);
} else if (nonText instanceof Leader) {
- Leader leader = (Leader) nonText;
+ final Leader leader = (Leader) nonText;
lineArea.makeLeaderArea(leader, sizeInline, retrieveMarker);
} else if (nonText instanceof PageNumberCitation) {
- PageNumberCitation citation = (PageNumberCitation) nonText;
+ final PageNumberCitation citation = (PageNumberCitation) nonText;
lineArea.makePageNumberCitationArea(citation, sizeInline,
retrieveMarker);
} else if (nonText instanceof PageNumber) {
- PageNumber pageNumber = (PageNumber) nonText;
+ final PageNumber pageNumber = (PageNumber) nonText;
lineArea.makePageNumberArea(pageNumber, sizeInline, retrieveMarker);
}
}
- private void checkLayoutTarget(LineOutput lineOutput)
+ private void checkLayoutTarget(final LineOutput lineOutput)
throws TextException {
if (! (lineOutput instanceof LineArea)) {
throw new TextException("Line-breaking layout target must be "
@@ -169,11 +169,11 @@
/**
* Formats the static content of the current page.
*/
- public void formatStaticContent(PageArea pageArea)
+ public void formatStaticContent(final PageArea pageArea)
throws AreaWException {
- PageCollection areaTree = pageArea.getWritablePageCollection();
- PageSequence pageSeq = areaTree.getPageSequence();
- SimplePageMaster simpleMaster = pageArea.getPageMaster();
+ final PageCollection areaTree = pageArea.getWritablePageCollection();
+ final PageSequence pageSeq = areaTree.getPageSequence();
+ final SimplePageMaster simpleMaster = pageArea.getPageMaster();
// region-before
layoutStaticContent(pageSeq, simpleMaster.getRegionBefore(),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|