Revision: 7825
Author: victormote
Date: 2006-07-23 14:15:10 -0700 (Sun, 23 Jul 2006)
ViewCVS: http://svn.sourceforge.net/foray/?rev=7825&view=rev
Log Message:
-----------
Implement standard use of final modifier on local variable and method parameters.
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/BlockContainerPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/CharacterPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ExternalGraphicPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.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/FlowPL.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/InstreamForeignObjectPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/LeaderPL.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/MarkerPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/NoLayoutPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PageNumberCitationPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PageNumberPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerFactory.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RetrieveMarkerPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RowCellArray.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/TableBodyPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableFooterPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableHeaderPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableRowPL.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-07-23 20:51:25 UTC (rev 7824)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractFlowPL.java 2006-07-23 21:15:10 UTC (rev 7825)
@@ -44,7 +44,8 @@
/** ArrayList to store snapshot. */
private ArrayList progressSnapshot;
- public AbstractFlowPL(AbstractFlow abstractFlow, PioneerLS layout) {
+ public AbstractFlowPL(final AbstractFlow abstractFlow,
+ final PioneerLS layout) {
super(abstractFlow, layout);
}
@@ -61,7 +62,7 @@
/**
* @param _status The _status to set.
*/
- public void set_status(int _status) {
+ public void set_status(final int _status) {
this._status = _status;
}
@@ -75,11 +76,11 @@
/**
* @param progressSnapshot The progressSnapshot to be saved.
*/
- public void setProgressSnapshot(ArrayList progressSnapshot) {
+ public void setProgressSnapshot(final ArrayList progressSnapshot) {
this.progressSnapshot = progressSnapshot;
}
- public int layout(Area area, RetrieveMarker retrieveMarker)
+ public int layout(final Area area, final RetrieveMarker retrieveMarker)
throws AreaWException {
return layout(area, null, retrieveMarker);
}
@@ -88,19 +89,19 @@
return (AbstractFlow) this.getFONode();
}
- public int layout(Area area, Region region, RetrieveMarker retrieveMarker)
- throws AreaWException {
+ public int layout(final Area area, final Region region,
+ final RetrieveMarker retrieveMarker) throws AreaWException {
if (getProgress() == FONodePL.START) {
setProgress(0);
}
// flow is *always* laid out into a BodyAreaContainer
- RegionRABody bac = (RegionRABody)area;
+ final RegionRABody bac = (RegionRABody)area;
boolean prevChildMustKeepWithNext = false;
- int numChildren = getFO().getChildren().size();
+ final int numChildren = getFO().getChildren().size();
for (int i = getProgress(); i < numChildren; i++) {
- FObj fo = (FObj) getFO().getChildren().get(i);
+ final FObj fo = (FObj) getFO().getChildren().get(i);
if (bac.getWritableMainRA().isBalancingRequired(fo)) {
// reset the the just-done span area in preparation
@@ -113,7 +114,8 @@
continue;
}
// current column area
- Area currentArea = bac.getWritableMainRA().getNextWritableArea(fo);
+ final Area currentArea = bac.getWritableMainRA()
+ .getNextWritableArea(fo);
if (bac.getWritableMainRA().isNewSpanArea()) {
setProgress(i);
setProgressSnapshot(getProgressSnapshot(new
@@ -126,9 +128,10 @@
if ((prevChildMustKeepWithNext)
&& (Status.laidOutNone(get_status()))) {
setProgress(i - 1);
- FObj prevChild =
+ final FObj prevChild =
(FObj) getFO().getChildren().get(getProgress());
- FObjPL prevChildPL = (FObjPL) getLayoutProxy(prevChild);
+ final FObjPL prevChildPL = (FObjPL) getLayoutProxy(
+ prevChild);
prevChildPL.resetProgress();
set_status(Status.AREA_FULL_SOME);
return get_status();
@@ -151,9 +154,9 @@
return get_status();
}
// I don't much like exposing this. (AHS 001217)
- NormalFlowRA column = (NormalFlowRA)currentArea;
+ final NormalFlowRA column = (NormalFlowRA)currentArea;
// Cast verified at construction.
- SpanRA span = (SpanRA) column.getWritableParent();
+ final SpanRA span = (SpanRA) column.getWritableParent();
span.setCurrentColumn(span.getCurrentColumn() + 1);
i--;
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java 2006-07-23 20:51:25 UTC (rev 7824)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java 2006-07-23 21:15:10 UTC (rev 7825)
@@ -54,11 +54,12 @@
// manage information about spanning rows
public RowSpanMgr rowSpanMgr;
- public AbstractTableBodyPL(AbstractTableBody tableBody, PioneerLS layout) {
+ public AbstractTableBodyPL(final AbstractTableBody tableBody,
+ final PioneerLS layout) {
super(tableBody, layout);
}
- public void setYPosition(int value) {
+ public void setYPosition(final int value) {
((GenericContainer)areaContainerRef.get()).setYPosition(value);
}
@@ -66,13 +67,13 @@
return ((GenericContainer)areaContainerRef.get()).getYPosition();
}
- public int getHeight(FOContext context) {
+ public int getHeight(final FOContext context) {
return ((GenericContainer)areaContainerRef.get()).crBPD()
+ getReal().traitSpaceBeforeOptimum(context)
+ getReal().traitSpaceAfterOptimum(context);
}
- public void removeLayout(Area area) {
+ public void removeLayout(final Area area) {
if (areaContainerRef != null) {
area.removeChild((GenericContainer)areaContainerRef.get());
}
@@ -112,11 +113,11 @@
return (AbstractTableBody) this.getFONode();
}
- public int layout(Area area, RetrieveMarker retrieveMarker)
+ public int layout(final Area area, final RetrieveMarker retrieveMarker)
throws AreaWException {
- AbstractTableBody node = getReal();
- TableArea tableArea = (TableArea) area;
- Table table = node.getNearestTable(area);
+ final AbstractTableBody node = getReal();
+ final TableArea tableArea = (TableArea) area;
+ final Table table = node.getNearestTable(area);
if (getProgress() == FONodePL.BREAK_AFTER) {
return Status.OK;
}
@@ -164,13 +165,14 @@
areaContainerRef = new WeakReference(areaContainer);
ArrayList keepWith = new ArrayList();
- int numChildren = node.childrenFO().size();
+ final int numChildren = node.childrenFO().size();
TableRow lastRow = null;
boolean endKeepGroup = true;
for (int i = getProgress(); i < numChildren; i++) {
- Object child = node.childrenFO().get(i);
+ final Object child = node.childrenFO().get(i);
if (child instanceof Marker) {
- MarkerPL markerPL = (MarkerPL) getLayoutProxy((FONode) child);
+ final MarkerPL markerPL = (MarkerPL) getLayoutProxy(
+ (FONode) child);
markerPL.layout(area, retrieveMarker);
continue;
}
@@ -178,8 +180,8 @@
throw new AreaWException("Currently only Table Rows are "
+ "supported in table body, header and footer");
}
- TableRow row = (TableRow)child;
- TableRowPL rowPL = (TableRowPL) getLayoutProxy(row);
+ final TableRow row = (TableRow)child;
+ final TableRowPL rowPL = (TableRowPL) getLayoutProxy(row);
rowPL.setRowSpanMgr(rowSpanMgr);
if (row.traitKeepWithPreviousWithinColumn(area) > 0
@@ -235,7 +237,7 @@
// FIXME!!! Handle rows spans!!!
removeTableRowLayout(row, areaContainer);
for (int j = 0; j < keepWith.size(); j++) {
- TableRow tr = (TableRow)keepWith.get(j);
+ final TableRow tr = (TableRow)keepWith.get(j);
removeTableRowLayout(tr, areaContainer);
i--;
}
@@ -281,8 +283,8 @@
return Status.OK;
}
- public void removeTableRowLayout(TableRow tr, Area area) {
- TableRowPL rowPL = (TableRowPL) this.getLayoutProxy(tr);
+ public void removeTableRowLayout(final TableRow tr, final Area area) {
+ final TableRowPL rowPL = (TableRowPL) this.getLayoutProxy(tr);
rowPL.resetProgress();
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java 2006-07-23 20:51:25 UTC (rev 7824)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java 2006-07-23 21:15:10 UTC (rev 7825)
@@ -36,7 +36,8 @@
*/
public class BlockContainerPL extends FObjPL {
- public BlockContainerPL(BlockContainer container, PioneerLS layout) {
+ public BlockContainerPL(final BlockContainer container,
+ final PioneerLS layout) {
super(container, layout);
}
@@ -44,19 +45,19 @@
return (BlockContainer) this.getFONode();
}
- public int layout(Area area, RetrieveMarker retrieveMarker)
+ public int layout(final Area area, final RetrieveMarker retrieveMarker)
throws AreaWException {
- BlockContainer node = getFO();
+ final BlockContainer node = getFO();
if (getProgress() == FONodePL.START) {
setProgress(0);
}
- BlockContainerRA blockContainer = area.makeBlockContainerArea(node,
- retrieveMarker);
+ final BlockContainerRA blockContainer = area.makeBlockContainerArea(
+ node, retrieveMarker);
for (int i = this.getProgress(); i < node.getChildCount(); i++) {
- FONode fo = node.getFONodeChildAt(i);
- FObjPL fobjPL = (FObjPL) getLayoutProxy(fo);
+ final FONode fo = node.getFONodeChildAt(i);
+ final FObjPL fobjPL = (FObjPL) getLayoutProxy(fo);
fobjPL.layout(blockContainer, retrieveMarker);
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2006-07-23 20:51:25 UTC (rev 7824)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2006-07-23 21:15:10 UTC (rev 7825)
@@ -49,7 +49,7 @@
public LineArea currentLineArea;
- public BlockPL(FObj realFObj, PioneerLS layout) {
+ public BlockPL(final FObj realFObj, final PioneerLS layout) {
super(realFObj, layout);
}
@@ -62,14 +62,14 @@
return (Block) this.getFONode();
}
- public int layout(Area area, RetrieveMarker retrieveMarker)
+ public int layout(final Area area, final RetrieveMarker retrieveMarker)
throws AreaWException {
- Block node = this.getFO();
+ final Block node = this.getFO();
if (! breakStatusBeforeChecked) {
breakStatusBeforeChecked = true;
// no break if first in area tree, or leading in context
// area
- int breakBeforeStatus = layout.checkBreakBefore(node, area);
+ final int breakBeforeStatus = layout.checkBreakBefore(node, area);
if (breakBeforeStatus != Status.OK) {
return breakBeforeStatus;
}
@@ -103,9 +103,9 @@
blockArea = area.makeNormalBlockArea(node, retrieveMarker);
for (int i = getProgress(); i < node.getChildCount(); i++) {
- FONode fo = node.getFONodeChildAt(i);
- FONodePL nodePL = this.getLayoutProxy(fo);
- int status = nodePL.layout(blockArea, retrieveMarker);
+ final FONode fo = node.getFONodeChildAt(i);
+ final FONodePL nodePL = this.getLayoutProxy(fo);
+ final int status = nodePL.layout(blockArea, retrieveMarker);
if (Status.isIncomplete(status)) {
setProgress(i);
if (status == Status.AREA_FULL_NONE) {
@@ -130,7 +130,7 @@
// no break if last in area tree, or trailing in context
// area
- int breakAfterStatus = Status.checkBreakAfter(
+ final int breakAfterStatus = Status.checkBreakAfter(
node.traitBreakAfter(area));
if (breakAfterStatus != Status.OK) {
setProgress(FONodePL.BREAK_AFTER);
@@ -157,7 +157,7 @@
*
* @return the line area to be used to add inline objects
*/
- public LineArea getCurrentLineArea(NormalBlockArea blockArea)
+ public LineArea getCurrentLineArea(final NormalBlockArea blockArea)
throws AreaWException {
if (this.currentLineArea == null) {
this.currentLineArea = blockArea.createNextLineArea(false);
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/CharacterPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/CharacterPL.java 2006-07-23 20:51:25 UTC (rev 7824)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/CharacterPL.java 2006-07-23 21:15:10 UTC (rev 7825)
@@ -35,7 +35,7 @@
*/
public class CharacterPL extends FObjPL {
- public CharacterPL(Character realFObj, PioneerLS layout) {
+ public CharacterPL(final Character realFObj, final PioneerLS layout) {
super(realFObj, layout);
}
@@ -43,7 +43,7 @@
return (Character) this.getFONode();
}
- public int layout(Area area, RetrieveMarker retrieveMarker)
+ public int layout(final Area area, final RetrieveMarker retrieveMarker)
throws AreaWException {
return layoutChildren(area, retrieveMarker);
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java 2006-07-23 20:51:25 UTC (rev 7824)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java 2006-07-23 21:15:10 UTC (rev 7825)
@@ -36,7 +36,8 @@
*/
public class ContinuedLabelPL extends FObjPL {
- public ContinuedLabelPL(ContinuedLabel inline, PioneerLS layout) {
+ public ContinuedLabelPL(final ContinuedLabel inline,
+ final PioneerLS layout) {
super(inline, layout);
}
@@ -52,19 +53,19 @@
* @return Value indicating where all, some or none of the content
* was placed in the current parent area.
*/
- public int layout(Area area, RetrieveMarker retrieveMarker)
+ public int layout(final Area area, final RetrieveMarker retrieveMarker)
throws AreaWException {
- ContinuedLabel label = getFO();
+ final ContinuedLabel label = getFO();
if (getProgress() == FONodePL.START) {
setProgress(0);
}
// See if ancestor table has generated any areas yet.
- TableArea tableArea = area.ancestorTableArea();
+ final TableArea tableArea = area.ancestorTableArea();
if (tableArea != null && tableArea.getPreviousSibling() != null) {
- int numChildren = label.getChildren().size();
+ final int numChildren = label.getChildren().size();
for (int i = getProgress(); i < numChildren; i++) {
- 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/ExternalGraphicPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ExternalGraphicPL.java 2006-07-23 20:51:25 UTC (rev 7824)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ExternalGraphicPL.java 2006-07-23 21:15:10 UTC (rev 7825)
@@ -36,7 +36,8 @@
*/
public class ExternalGraphicPL extends FObjPL {
- public ExternalGraphicPL(ExternalGraphic graphic, PioneerLS layout) {
+ public ExternalGraphicPL(final ExternalGraphic graphic,
+ final PioneerLS layout) {
super(graphic, layout);
}
@@ -44,22 +45,22 @@
return (ExternalGraphic) this.getFONode();
}
- public int layout(Area area, RetrieveMarker retrieveMarker)
+ public int layout(final Area area, final RetrieveMarker retrieveMarker)
throws AreaWException {
- ExternalGraphic node = getFO();
+ final ExternalGraphic node = getFO();
if (getProgress() == FONodePL.START) {
setProgress(0);
}
- org.axsl.areaW.Area parentForDimensions =
+ final org.axsl.areaW.Area parentForDimensions =
area.nearestGeneratedByBlockLevelFO();
- int height = node.viewportBPD(area, parentForDimensions.crBPD());
+ final int height = node.viewportBPD(area, parentForDimensions.crBPD());
if (area.progressionDimensionAvailable()
< (height + node.traitSpaceBeforeOptimum(area))) {
return Status.AREA_FULL_NONE;
}
- LineArea lineArea = activeLineArea(area);
+ final LineArea lineArea = activeLineArea(area);
if (lineArea == null) {
// Not enough room on the page for this.
return Status.AREA_FULL_NONE;
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-07-23 20:51:25 UTC (rev 7824)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-07-23 21:15:10 UTC (rev 7825)
@@ -66,7 +66,7 @@
protected PioneerLS layout;
- public FONodePL(FONode realFObj, PioneerLS layout) {
+ public FONodePL(final FONode realFObj, final PioneerLS layout) {
this.realFONode = realFObj;
realFObj.setProxy(this);
this.layout = layout;
@@ -83,7 +83,7 @@
* @param snapshot a ArrayList of progress indicators (Integer)
* @return the updated ArrayList of progress indicators (Integers)
*/
- public ArrayList getProgressSnapshot(ArrayList snapshot) {
+ public ArrayList getProgressSnapshot(final ArrayList snapshot) {
snapshot.add(new Integer(this.progress));
return snapshot;
}
@@ -94,7 +94,7 @@
* and restored using this method.
* @param snapshot the ArrayList of saved progress indicators (Integers)
*/
- public void rollback(ArrayList snapshot) {
+ public void rollback(final ArrayList snapshot) {
this.progress = ((Integer)snapshot.get(0)).intValue();
snapshot.remove(0);
if (this.progress == START) {
@@ -114,11 +114,11 @@
* Sets the progress indicator.
* @param progress The progress indicator to be stored.
*/
- public void setProgress(int progress) {
+ public void setProgress(final int progress) {
this.progress = progress;
}
- protected FONodePL getLayoutProxy(FONode node) {
+ protected FONodePL getLayoutProxy(final FONode node) {
return this.layout.getLayoutProxy(node);
}
@@ -154,21 +154,22 @@
* @return The index into the text (char []) to the first character that
* was <em>not</em> successfully added to the line.
*/
- protected int addTextItemToLine(LineArea lineArea, FOLineText lineText,
- int start, int end, RetrieveMarker retrieveMarker)
- throws AreaWException {
+ protected int addTextItemToLine(final LineArea lineArea,
+ final FOLineText lineText, final int start, final int end,
+ final RetrieveMarker retrieveMarker) throws AreaWException {
EagerLineBreaker lb = layout.getLineBreaker();
if (lb == null) {
lb = lineArea.getTextServer().provideEagerLineBreaker(null, layout,
lineArea.getFontConsumer());
}
int status = 0;
- FOLineText contextAware = lineText.getContextWrapper(retrieveMarker);
+ final FOLineText contextAware = lineText.getContextWrapper(
+ retrieveMarker);
try {
status = lb.processLineContent(contextAware, start, end,
lineArea.asLineOutput());
- } catch (TextException e) {
- FObj generatedBy = lineArea.traitGeneratedBy();
+ } catch (final TextException e) {
+ final FObj generatedBy = lineArea.traitGeneratedBy();
throw new AreaWException("Error in text layout:\n"
+ generatedBy.getContextMessage(), e);
}
@@ -183,8 +184,8 @@
* @return For non-text items, returns 1 for success or 0 if the item did
* not fit onto the current line.
*/
- protected int addNonTextItemToLine(LineArea lineArea, FOLineNonText nonText,
- RetrieveMarker retrieveMarker)
+ protected int addNonTextItemToLine(final LineArea lineArea,
+ final FOLineNonText nonText, final RetrieveMarker retrieveMarker)
throws AreaWException {
EagerLineBreaker lb = layout.getLineBreaker();
if (lb == null) {
@@ -192,12 +193,13 @@
lineArea.getFontConsumer());
}
int status = 0;
- FOLineNonText contextAware = nonText.getContextWrapper(retrieveMarker);
+ final FOLineNonText contextAware = nonText.getContextWrapper(
+ retrieveMarker);
try {
status = lb.processLineContent(contextAware, -1, -1,
lineArea.asLineOutput());
- } catch (TextException e) {
- FObj generatedBy = lineArea.traitGeneratedBy();
+ } catch (final TextException e) {
+ final FObj generatedBy = lineArea.traitGeneratedBy();
throw new AreaWException("Error in non-text layout:\n"
+ generatedBy.getContextMessage());
}
@@ -205,13 +207,12 @@
return status;
}
- protected int layoutInlineContent(FObj node, LineArea lineArea,
- RetrieveMarker retrieveMarker)
- throws AreaWException {
+ protected int layoutInlineContent(final FObj node, LineArea lineArea,
+ final RetrieveMarker retrieveMarker) throws AreaWException {
if (! (node instanceof FOLineNonText)) {
return -1000;
}
- FOLineNonText nonText = (FOLineNonText) node;
+ final FOLineNonText nonText = (FOLineNonText) node;
// this should start a new page
if (lineArea == null) {
return Status.AREA_FULL_SOME;
@@ -221,10 +222,10 @@
return Status.OK;
}
// It did not fit on the line. Create new line & try again.
- NormalBlockArea blockArea
+ final NormalBlockArea blockArea
= (NormalBlockArea) lineArea.getWritableParentArea();
lineArea = blockArea.createNextLineArea(false);
- BlockPL blockPL = this.layout.getBlockPL(blockArea);
+ final BlockPL blockPL = this.layout.getBlockPL(blockArea);
blockPL.currentLineArea = lineArea;
if (lineArea == null) {
@@ -244,7 +245,7 @@
* @param area The area whose LineArea is being sought.
* @return The current LineArea of the block that area is in.
*/
- protected LineArea activeLineArea(Area area) throws AreaWException {
+ protected LineArea activeLineArea(final Area area) throws AreaWException {
if (area instanceof LineArea) {
return (LineArea) area;
}
@@ -255,11 +256,11 @@
blockArea = area.ancestorWritableNormalBlockArea();
}
if (blockArea == null) {
- FONode foNode = this.realFONode;
+ final FONode foNode = this.realFONode;
throw new AreaWException("Layout of inline objects must be inside "
+ "a block:\n" + foNode.getContextMessage());
}
- BlockPL blockPL = this.layout.getBlockPL(blockArea);
+ final BlockPL blockPL = this.layout.getBlockPL(blockArea);
return blockPL.getCurrentLineArea(blockArea);
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2006-07-23 20:51:25 UTC (rev 7824)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2006-07-23 21:15:10 UTC (rev 7825)
@@ -37,7 +37,7 @@
*/
public class FOTextPL extends FONodePL {
- public FOTextPL(FOText text, PioneerLS layout) {
+ public FOTextPL(final FOText text, final PioneerLS layout) {
super(text, layout);
}
@@ -45,14 +45,14 @@
return (FOText) this.getFONode();
}
- public int layout(Area area, RetrieveMarker retrieveMarker)
+ public int layout(final Area area, final RetrieveMarker retrieveMarker)
throws AreaWException {
- FOText node = this.getFO();
+ final FOText node = this.getFO();
if (getProgress() == FONodePL.START) {
setProgress(0);
}
- int progressAtStart = getProgress();
- int progressAtEnd = addText(node, area, progressAtStart,
+ final int progressAtStart = getProgress();
+ final int progressAtEnd = addText(node, area, progressAtStart,
retrieveMarker);
setProgress(progressAtEnd);
if (progressAtEnd == -1) {
@@ -70,17 +70,18 @@
* laid out. If the first six characters have been laid out (indices 0-5),
* then 6 should be returned.
*/
- private int addText(FOLineText lineText, Area area, int start,
- RetrieveMarker retrieveMarker) throws AreaWException {
- int end = lineText.inlineText().length;
+ private int addText(final FOLineText lineText, final Area area,
+ int start, final RetrieveMarker retrieveMarker)
+ throws AreaWException {
+ final int end = lineText.inlineText().length;
LineArea la = this.activeLineArea(area);
if (la == null) {
return start;
}
- NormalBlockArea ba = la.ancestorWritableNormalBlockArea();
+ final NormalBlockArea ba = la.ancestorWritableNormalBlockArea();
start = addTextItemToLine(la, lineText, start, end, retrieveMarker);
while (start != -1) {
- BlockPL blockPL = this.layout.getBlockPL(ba);
+ final BlockPL blockPL = this.layout.getBlockPL(ba);
la = ba.createNextLineArea(false);
blockPL.currentLineArea = la;
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjMixedPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer...
[truncated message content] |