You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by vh...@apache.org on 2008/07/24 11:37:16 UTC
svn commit: r679326 [16/33] - in /xmlgraphics/fop/trunk:
examples/embedding/java/embedding/ examples/embedding/java/embedding/events/
examples/embedding/java/embedding/intermediate/
examples/embedding/java/embedding/model/ examples/embedding/java/embed...
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/KnuthPenalty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/KnuthPenalty.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/KnuthPenalty.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/KnuthPenalty.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -24,15 +24,15 @@
/**
* An instance of this class represents information about a feasible
* breaking point; it does not represent any piece of content.
- *
+ *
* A KnuthPenalty is a feasible breaking point unless its value is infinity;
* a KnuthPenalty whose value is -infinity represents a forced break.
- *
+ *
* A KnuthPenalty is suppressed, and its width is ignored, if it is not a
* chosen breaking point; for example, a KnuthPenalty representing a
* hyphenation point has a width (the "-" width), which must be ignored if
* that point is not chosen as a breaking point.
- *
+ *
* Besides the inherited methods and attributes, this class has two more
* attributes and the methods used to get them: the penalty value, which is
* a kind of "aesthetic cost" (the higher the value, the more unsightly the
@@ -45,7 +45,7 @@
public static final int FLAGGED_PENALTY = 50;
private int penalty;
- private boolean bFlagged;
+ private boolean bFlagged;
private int breakClass = -1;
/**
@@ -65,7 +65,7 @@
/**
* Create a new KnuthPenalty.
- *
+ *
* @param w the width of this penalty
* @param p the penalty value of this penalty
* @param f is this penalty flagged?
@@ -102,7 +102,7 @@
public void setP(int p) {
this.penalty = p;
}
-
+
/** @return true is this penalty is a flagged one. */
public boolean isFlagged() {
return bFlagged;
@@ -112,7 +112,7 @@
public boolean isForcedBreak() {
return penalty == -KnuthElement.INFINITE;
}
-
+
/**
* @return the break class of this penalty (EN_AUTO, EN_COLUMN, EN_PAGE, EN_EVEN_PAGE,
* EN_ODD_PAGE)
@@ -120,7 +120,7 @@
public int getBreakClass() {
return breakClass;
}
-
+
/**
* Sets the break class for this penalty.
* @param cl the break class (EN_AUTO, EN_COLUMN, EN_PAGE, EN_EVEN_PAGE, EN_ODD_PAGE)
@@ -128,7 +128,7 @@
public void setBreakClass(int cl) {
this.breakClass = cl;
}
-
+
/** {@inheritDoc} */
public String toString() {
StringBuffer sb = new StringBuffer(64);
@@ -171,5 +171,5 @@
}
return sb.toString();
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/KnuthPossPosIter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/KnuthPossPosIter.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/KnuthPossPosIter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/KnuthPossPosIter.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -35,7 +35,7 @@
super(elementList.listIterator(startPos));
iterCount = endPos - startPos;
}
-
+
/**
* Auxiliary constructor
* @param elementList List of Knuth elements
@@ -45,7 +45,7 @@
}
// Check position < endPos
-
+
/**
* {@inheritDoc}
*/
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/KnuthSequence.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/KnuthSequence.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/KnuthSequence.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/KnuthSequence.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,7 +27,7 @@
* Represents a list of Knuth elements.
*/
/**
- *
+ *
*/
public abstract class KnuthSequence extends ArrayList {
/**
@@ -68,19 +68,19 @@
* Append sequence to this sequence if it can be appended.
* @param sequence The sequence that is to be appended.
* @param keepTogether Whether the two sequences must be kept together.
- * @param breakElement The BreakElement that may be inserted between the two sequences.
+ * @param breakElement The BreakElement that may be inserted between the two sequences.
* @return whether the sequence was succesfully appended to this sequence.
*/
public abstract boolean appendSequence(KnuthSequence sequence, boolean keepTogether,
BreakElement breakElement);
-
+
/**
* Append sequence to this sequence if it can be appended.
* @param sequence The sequence that is to be appended.
* @return whether the sequence was succesfully appended to this sequence.
*/
public abstract boolean appendSequence(KnuthSequence sequence);
-
+
/**
* Append sequence to this sequence if it can be appended.
* If that is not possible, close this sequence.
@@ -95,13 +95,13 @@
return true;
}
}
-
+
/**
* Append sequence to this sequence if it can be appended.
* If that is not possible, close this sequence.
* @param sequence The sequence that is to be appended.
* @param keepTogether Whether the two sequences must be kept together.
- * @param breakElement The BreakElement that may be inserted between the two sequences.
+ * @param breakElement The BreakElement that may be inserted between the two sequences.
* @return whether the sequence was succesfully appended to this sequence.
*/
public boolean appendSequenceOrClose(KnuthSequence sequence, boolean keepTogether,
@@ -113,7 +113,7 @@
return true;
}
}
-
+
/**
* Wrap the Positions of the elements of this sequence in a Position for LayoutManager lm.
* @param lm The LayoutManager for the Positions that will be created.
@@ -127,14 +127,14 @@
(lm.notifyPos(new NonLeafPosition(lm, element.getPosition())));
}
}
-
+
/**
* @return the last element of this sequence.
*/
public ListElement getLast() {
int idx = size();
if (idx == 0) {
- return null;
+ return null;
}
return (ListElement) get(idx - 1);
}
@@ -146,7 +146,7 @@
public ListElement removeLast() {
int idx = size();
if (idx == 0) {
- return null;
+ return null;
}
return (ListElement) remove(idx - 1);
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LMiter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LMiter.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LMiter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LMiter.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutContext.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutContext.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutContext.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -106,15 +106,15 @@
/** Current pending space-before or space-start from ancestor areas */
private SpaceSpecifier leadingSpace;
-
+
/**
- * A list of pending marks (border and padding) on the after edge when a page break occurs.
+ * A list of pending marks (border and padding) on the after edge when a page break occurs.
* May be null.
*/
private List pendingAfterMarks;
-
+
/**
- * A list of pending marks (border and padding) on the before edge when a page break occurs.
+ * A list of pending marks (border and padding) on the before edge when a page break occurs.
* May be null.
*/
private List pendingBeforeMarks;
@@ -124,7 +124,7 @@
/** Alignment in BP direction */
private int bpAlignment = Constants.EN_START;
-
+
/** Stretch or shrink value when making areas. */
private double ipdAdjust = 0.0;
@@ -132,12 +132,12 @@
private double dSpaceAdjust = 0.0;
private AlignmentContext alignmentContext = null;
-
+
/** Amount of space before / start */
private int spaceBefore = 0;
/** Amount of space after / end */
private int spaceAfter = 0;
-
+
/** Amount of space to reserve at the beginning of each line */
private int lineStartBorderAndPaddingWidth = 0;
/** Amount of space to reserve at the end of each line */
@@ -146,9 +146,9 @@
private int breakBefore;
private int breakAfter;
- private int pendingKeepWithNext = BlockLevelLayoutManager.KEEP_AUTO;
- private int pendingKeepWithPrevious = BlockLevelLayoutManager.KEEP_AUTO;
-
+ private int pendingKeepWithNext = BlockLevelLayoutManager.KEEP_AUTO;
+ private int pendingKeepWithPrevious = BlockLevelLayoutManager.KEEP_AUTO;
+
/**
* Copy constructor for creating child layout contexts.
* @param parentLC the parent layout context to copy from
@@ -188,13 +188,13 @@
public void copyPendingMarksFrom(LayoutContext source) {
if (source.pendingAfterMarks != null) {
- this.pendingAfterMarks = new java.util.ArrayList(source.pendingAfterMarks);
+ this.pendingAfterMarks = new java.util.ArrayList(source.pendingAfterMarks);
}
if (source.pendingBeforeMarks != null) {
- this.pendingBeforeMarks = new java.util.ArrayList(source.pendingBeforeMarks);
+ this.pendingBeforeMarks = new java.util.ArrayList(source.pendingBeforeMarks);
}
}
-
+
public void setFlags(int flags) {
setFlags(flags, true);
}
@@ -238,7 +238,7 @@
public int getKeepWithNextPending() {
return this.pendingKeepWithNext;
}
-
+
/**
* Returns the strength of a keep-with-previous currently pending.
* @return the keep-with-previous strength
@@ -246,7 +246,7 @@
public int getKeepWithPreviousPending() {
return this.pendingKeepWithPrevious;
}
-
+
/**
* Clears any pending keep-with-next strength.
*/
@@ -260,7 +260,7 @@
public void clearKeepWithPreviousPending() {
this.pendingKeepWithPrevious = BlockLevelLayoutManager.KEEP_AUTO;
}
-
+
/**
* Clears both keep-with-previous and keep-with-next strengths.
*/
@@ -292,7 +292,7 @@
public boolean isKeepWithNextPending() {
return getKeepWithNextPending() != BlockLevelLayoutManager.KEEP_AUTO;
}
-
+
/**
* Indicates whether a keep-with-previous constraint is pending.
* @return true if a keep-with-previous constraint is pending
@@ -300,7 +300,7 @@
public boolean isKeepWithPreviousPending() {
return getKeepWithPreviousPending() != BlockLevelLayoutManager.KEEP_AUTO;
}
-
+
public void setLeadingSpace(SpaceSpecifier space) {
leadingSpace = space;
}
@@ -333,7 +333,7 @@
}
this.pendingAfterMarks.add(element);
}
-
+
/**
* @return the pending border and padding elements at the after edge
* @see #addPendingAfterMark(UnresolvedListElementWithLength)
@@ -345,7 +345,7 @@
return null;
}
}
-
+
/**
* Clears all pending marks on the LayoutContext.
*/
@@ -353,7 +353,7 @@
this.pendingBeforeMarks = null;
this.pendingAfterMarks = null;
}
-
+
/**
* Adds a border or padding element to the pending list which will be used to generate
* the right element list for break possibilities. Conditionality resolution will be done
@@ -366,7 +366,7 @@
}
this.pendingBeforeMarks.add(element);
}
-
+
/**
* @return the pending border and padding elements at the before edge
* @see #addPendingBeforeMark(UnresolvedListElementWithLength)
@@ -378,7 +378,7 @@
return null;
}
}
-
+
/**
* Sets the stack limit in block-progression-dimension.
* @param limit the stack limit
@@ -419,7 +419,7 @@
setStackLimitBP(context.getStackLimitBP());
setStackLimitIP(context.getStackLimitIP());
}
-
+
/**
* Sets the inline-progression-dimension of the nearest ancestor reference area.
*/
@@ -429,7 +429,7 @@
/**
* Returns the inline-progression-dimension of the nearest ancestor reference area.
- *
+ *
* @return the inline-progression-dimension of the nearest ancestor reference area
*/
public int getRefIPD() {
@@ -455,12 +455,12 @@
public void setBPAlignment(int alignment) {
this.bpAlignment = alignment;
}
-
+
/** @return the currently applicable alignment in BP direction (EN_START, EN_JUSTIFY...) */
public int getBPAlignment() {
return this.bpAlignment;
}
-
+
public void setSpaceAdjust(double adjust) {
dSpaceAdjust = adjust;
}
@@ -480,7 +480,7 @@
public void setAlignmentContext(AlignmentContext alignmentContext) {
this.alignmentContext = alignmentContext;
}
-
+
public AlignmentContext getAlignmentContext() {
return this.alignmentContext;
}
@@ -490,7 +490,7 @@
this.alignmentContext = this.alignmentContext.getParentAlignmentContext();
}
}
-
+
/**
* Get the width to be reserved for border and padding at the start of the line.
* @return the width to be reserved
@@ -498,7 +498,7 @@
public int getLineStartBorderAndPaddingWidth() {
return lineStartBorderAndPaddingWidth;
}
-
+
/**
* Set the width to be reserved for border and padding at the start of the line.
* @param lineStartBorderAndPaddingWidth the width to be reserved
@@ -506,7 +506,7 @@
public void setLineStartBorderAndPaddingWidth(int lineStartBorderAndPaddingWidth) {
this.lineStartBorderAndPaddingWidth = lineStartBorderAndPaddingWidth;
}
-
+
/**
* Get the width to be reserved for border and padding at the end of the line.
* @return the width to be reserved
@@ -514,7 +514,7 @@
public int getLineEndBorderAndPaddingWidth() {
return lineEndBorderAndPaddingWidth;
}
-
+
/**
* Set the width to be reserved for border and padding at the end of the line.
* @param lineEndBorderAndPaddingWidth the width to be reserved
@@ -522,7 +522,7 @@
public void setLineEndBorderAndPaddingWidth(int lineEndBorderAndPaddingWidth) {
this.lineEndBorderAndPaddingWidth = lineEndBorderAndPaddingWidth;
}
-
+
/**
* @return true if the current element list ends early because of a span change
* in multi-column layout.
@@ -530,7 +530,7 @@
public int getNextSpan() {
return nextSpan;
}
-
+
/**
* Used to signal the PSLM that the element list ends early because of a span change in
* multi-column layout.
@@ -544,8 +544,8 @@
+ span);
}
}
-
- /**
+
+ /**
* Get the writing mode of the relevant reference area.
* @return the applicable writing mode
*/
@@ -553,7 +553,7 @@
return writingMode;
}
- /**
+ /**
* Set the writing mode.
* @param writingMode the writing mode
*/
@@ -597,7 +597,7 @@
* Returns the value of the break before the element whose
* {@link LayoutManager#getNextKnuthElements(LayoutContext, int)} method has just been
* called.
- *
+ *
* @return one of {@link Constants#EN_AUTO}, {@link Constants#EN_COLUMN},
* {@link Constants#EN_PAGE}, {@link Constants#EN_EVEN_PAGE}, or
* {@link Constants#EN_ODD_PAGE}
@@ -608,7 +608,7 @@
/**
* Sets the value of the break before the current element.
- *
+ *
* @param breakBefore the value of the break-before
* @see #getBreakBefore()
*/
@@ -620,7 +620,7 @@
* Returns the value of the break after the element whose
* {@link LayoutManager#getNextKnuthElements(LayoutContext, int)} method has just been
* called.
- *
+ *
* @return one of {@link Constants#EN_AUTO}, {@link Constants#EN_COLUMN},
* {@link Constants#EN_PAGE}, {@link Constants#EN_EVEN_PAGE}, or
* {@link Constants#EN_ODD_PAGE}
@@ -632,7 +632,7 @@
/**
* Sets the value of the break after the current element.
- *
+ *
* @param breakAfter the value of the break-after
* @see #getBreakAfter()
*/
@@ -650,7 +650,7 @@
+ "\nTrailing Space: \t"
+ (getTrailingSpace() == null ? "null" : getTrailingSpace().toString())
+ "\nLeading Space: \t"
- + (getLeadingSpace() == null ? "null" : getLeadingSpace().toString())
+ + (getLeadingSpace() == null ? "null" : getLeadingSpace().toString())
+ "\nReference IPD: \t" + getRefIPD()
+ "\nSpace Adjust: \t" + getSpaceAdjust()
+ "\nIPD Adjust: \t" + getIPDAdjust()
@@ -663,7 +663,7 @@
+ "\nKeeps: \t[keep-with-next=" + KeepUtil.keepStrengthToString(getKeepWithNextPending())
+ "][keep-with-previous="
+ KeepUtil.keepStrengthToString(getKeepWithPreviousPending()) + "] pending"
- + "\nBreaks: \tforced [" + (breakBefore != Constants.EN_AUTO ? "break-before" : "") + "]["
+ + "\nBreaks: \tforced [" + (breakBefore != Constants.EN_AUTO ? "break-before" : "") + "]["
+ (breakAfter != Constants.EN_AUTO ? "break-after" : "") + "]";
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutException.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutException.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutException.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutException.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,13 +28,13 @@
/**
* Exception thrown by FOP if an unrecoverable layout error occurs. An example: An area overflows
* a viewport that has overflow="error-if-overflow".
- *
+ *
* @todo Discuss if this should become a checked exception.
*/
public class LayoutException extends RuntimeException {
private static final long serialVersionUID = 5157080040923740433L;
-
+
private String localizedMessage;
private LayoutManager layoutManager;
@@ -80,7 +80,7 @@
public LayoutManager getLayoutManager() {
return this.layoutManager;
}
-
+
/** Exception factory for {@link LayoutException}. */
public static class LayoutExceptionFactory implements ExceptionFactory {
@@ -95,11 +95,11 @@
}
return ex;
}
-
+
/** {@inheritDoc} */
public Class getExceptionClass() {
return LayoutException.class;
}
-
- }
+
+ }
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutManager.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.layoutmgr;
import java.util.List;
@@ -45,11 +45,11 @@
LayoutManager getParent();
/**
- * initialize the layout manager. Allows each layout manager
+ * initialize the layout manager. Allows each layout manager
* to calculate often used values.
*/
void initialize();
-
+
/**
* Get the active PageSequenceLayoutManager instance for this
* layout process.
@@ -130,9 +130,9 @@
void addChildLMs(List newLMs);
/**
- * Get a sequence of KnuthElements representing the content
+ * Get a sequence of KnuthElements representing the content
* of the node assigned to the LM
- *
+ *
* @param context the LayoutContext used to store layout information
* @param alignment the desired text alignment
* @return the list of KnuthElements
@@ -140,54 +140,54 @@
List getNextKnuthElements(LayoutContext context, int alignment);
/**
- * Get a sequence of KnuthElements representing the content
+ * Get a sequence of KnuthElements representing the content
* of the node assigned to the LM, after changes have been applied
*
* In the context of line breaking, this method is called after hyphenation has
- * been performed, in order to receive the sequence of elements representing the
+ * been performed, in order to receive the sequence of elements representing the
* text together with all possible hyphenation points.
* For example, if the text "representation" originates a single box element
* when getNextKnuthElements() is called, it will be now split in syllables
* (rep-re-sen-ta-tion) each one originating a box and divided by additional
* elements allowing a line break.
- *
+ *
* In the context of page breaking, this method is called only if the pages need
* to be "vertically justified" modifying (also) the quantity of lines created by
* the paragraphs, and after a first page breaking has been performed.
* According to the result of the first page breaking, each paragraph now knows
- * how many lines it must create (among the existing layout possibilities) and
+ * how many lines it must create (among the existing layout possibilities) and
* has to create a sequence of elements representing this layout; in particular,
* each box, representing a line, will contain a LineBreakPositions that will be
* used in the addAreas() phase.
- *
+ *
* LMs having children look at the old list of elements in order to know which
* ones they must get the new elements from, as break conditions of preserved
- * linefeeds can divide children into smaller groups (page sequences or
+ * linefeeds can divide children into smaller groups (page sequences or
* paragraphs).
* LMs having no children can simply return the old elements if they have nothing
* to change.
*
* Inline LMs need to know the text alignment because it affects the elements
* representing feasible breaks between syllables.
- *
+ *
* @param oldList the elements to replace
* @param alignment the desired text alignment
* @return the updated list of KnuthElements
*/
List getChangedKnuthElements(List oldList, int alignment);
-
+
/**
* Returns the IPD of the content area
* @return the IPD of the content area
*/
int getContentAreaIPD();
-
+
/**
* Returns the BPD of the content area
* @return the BPD of the content area
*/
int getContentAreaBPD();
-
+
/**
* Returns an indication if the layout manager generates a reference area.
* @return True if the layout manager generates a reference area
@@ -205,13 +205,13 @@
* @return True if the layout manager generates a line area
*/
boolean getGeneratesLineArea();
-
+
/**
* Returns the fo this layout manager is associated with.
* @return The fo for this layout manager or null.
*/
FObj getFObj();
-
+
/**
* Adds a Position to the Position participating in the first|last determination by assigning
* it a unique position index.
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutManagerMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutManagerMaker.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutManagerMaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutManagerMaker.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,7 +34,7 @@
* The interface for all LayoutManager makers
*/
public interface LayoutManagerMaker {
-
+
/**
* Make LayoutManagers for the node and add them to the list lms.
* @param node the FO node for which the LayoutManagers are made
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -145,7 +145,7 @@
}
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public void makeLayoutManagers(FONode node, List lms) {
Maker maker = (Maker) makers.get(node.getClass());
@@ -175,7 +175,7 @@
} else if (lms.size() > 1) {
throw new IllegalStateException("Duplicate LayoutManagers for class "
+ node.getClass()
- + " found, only one may be declared.");
+ + " found, only one may be declared.");
}
return (LayoutManager) lms.get(0);
}
@@ -186,7 +186,7 @@
}
/*
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public FlowLayoutManager makeFlowLayoutManager(
PageSequenceLayoutManager pslm, Flow flow) {
@@ -194,21 +194,21 @@
}
/*
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public ContentLayoutManager makeContentLayoutManager(PageSequenceLayoutManager pslm,
Title title) {
return new ContentLayoutManager(pslm, title);
}
-
+
/*
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public StaticContentLayoutManager makeStaticContentLayoutManager(
PageSequenceLayoutManager pslm, StaticContent sc, SideRegion reg) {
return new StaticContentLayoutManager(pslm, sc, reg);
}
-
+
/** {@inheritDoc} */
public StaticContentLayoutManager makeStaticContentLayoutManager(
PageSequenceLayoutManager pslm, StaticContent sc, org.apache.fop.area.Block block) {
@@ -321,7 +321,7 @@
public static class ListItemLayoutManagerMaker extends Maker {
public void make(FONode node, List lms) {
lms.add(new ListItemLayoutManager((ListItem) node));
- }
+ }
}
public static class ListBlockLayoutManagerMaker extends Maker {
@@ -353,7 +353,7 @@
lms.add(new PageNumberCitationLastLayoutManager((PageNumberCitationLast) node));
}
}
-
+
public static class TableLayoutManagerMaker extends Maker {
public void make(FONode node, List lms) {
Table table = (Table) node;
@@ -361,7 +361,7 @@
lms.add(tlm);
}
}
-
+
public class RetrieveMarkerLayoutManagerMaker extends Maker {
public void make(FONode node, List lms) {
Iterator baseIter;
@@ -373,7 +373,7 @@
FONode child = (FONode) baseIter.next();
makeLayoutManagers(child, lms);
}
- }
+ }
}
public class WrapperLayoutManagerMaker extends Maker {
@@ -390,7 +390,7 @@
FONode child = (FONode) baseIter.next();
makeLayoutManagers(child, lms);
}
- }
+ }
}
public ExternalDocumentLayoutManager makeExternalDocumentLayoutManager(
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LeafPosition.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LeafPosition.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LeafPosition.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LeafPosition.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.layoutmgr;
public class LeafPosition extends Position {
@@ -31,11 +31,11 @@
public int getLeafPos() {
return iLeafPos;
}
-
+
public boolean generatesAreas() {
return getLM() != null;
}
-
+
/** {@inheritDoc} */
public String toString() {
StringBuffer sb = new StringBuffer();
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/ListElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/ListElement.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/ListElement.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/ListElement.java Thu Jul 24 02:35:34 2008
@@ -23,12 +23,12 @@
* This class is the base class for all kinds of elements that are added to element lists. There
* are basically two kinds of list elements: Knuth elements and unresolved elements like spaces,
* border and padding elements which are converted to Knuth elements prior to the breaking
- * process.
+ * process.
*/
public abstract class ListElement {
private Position position;
-
+
/**
* Main constructor
* @param position the Position instance needed by the addAreas stage of the LMs.
@@ -36,14 +36,14 @@
public ListElement(Position position) {
this.position = position;
}
-
+
/**
* @return the Position instance for this element.
*/
public Position getPosition() {
return this.position;
}
-
+
/**
* Change the Position stored in this element.
* @param position the Position instance
@@ -78,14 +78,14 @@
return false;
}
- /** @return true if the element is a penalty and represents a forced break. */
+ /** @return true if the element is a penalty and represents a forced break. */
public boolean isForcedBreak() {
return false;
}
- /** @return true if the element is an unresolved element such as a space or a border. */
+ /** @return true if the element is an unresolved element such as a space or a border. */
public boolean isUnresolvedElement() {
return true;
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java Thu Jul 24 02:35:34 2008
@@ -35,7 +35,7 @@
* @param lr restricting source
* @param context Percentage evaluation context
*/
- public static void restrict(MinOptMax mom, LengthRangeProperty lr,
+ public static void restrict(MinOptMax mom, LengthRangeProperty lr,
PercentBaseContext context) {
if (lr.getEnum() != Constants.EN_AUTO) {
if (lr.getMinimum(context).getEnum() != Constants.EN_AUTO) {
@@ -70,7 +70,7 @@
/**
* Extends the minimum length to the given length if necessary, and adjusts opt and
* max accordingly.
- *
+ *
* @param mom the min/opt/max trait
* @param len the new minimum length
*/
@@ -81,7 +81,7 @@
mom.max = Math.max(mom.opt, mom.max);
}
}
-
+
/**
* After a calculation on a MinOptMax, this can be called to set opt to
* a new effective value.
@@ -95,7 +95,7 @@
}
}
}
-
+
/**
* Converts a LengthRangeProperty to a MinOptMax.
* @param prop LengthRangeProperty
@@ -104,14 +104,14 @@
*/
public static MinOptMax toMinOptMax(LengthRangeProperty prop, PercentBaseContext context) {
MinOptMax mom = new MinOptMax(
- (prop.getMinimum(context).isAuto()
+ (prop.getMinimum(context).isAuto()
? 0 : prop.getMinimum(context).getLength().getValue(context)),
- (prop.getOptimum(context).isAuto()
+ (prop.getOptimum(context).isAuto()
? 0 : prop.getOptimum(context).getLength().getValue(context)),
- (prop.getMaximum(context).isAuto()
- ? Integer.MAX_VALUE
+ (prop.getMaximum(context).isAuto()
+ ? Integer.MAX_VALUE
: prop.getMaximum(context).getLength().getValue(context)));
return mom;
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/NonLeafPosition.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/NonLeafPosition.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/NonLeafPosition.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/NonLeafPosition.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.layoutmgr;
public class NonLeafPosition extends Position {
@@ -31,11 +31,11 @@
public Position getPosition() {
return subPos;
}
-
+
public boolean generatesAreas() {
return (subPos != null ? subPos.generatesAreas() : false);
}
-
+
/** {@inheritDoc} */
public String toString() {
StringBuffer sb = new StringBuffer();
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PaddingElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PaddingElement.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PaddingElement.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PaddingElement.java Thu Jul 24 02:35:34 2008
@@ -42,10 +42,10 @@
boolean isFirst, boolean isLast, PercentBaseContext context) {
super(position, condLength, side, isFirst, isLast, context);
}
-
+
/** {@inheritDoc} */
public void notifyLayoutManager(MinOptMax effectiveLength) {
- LayoutManager lm = getOriginatingLayoutManager();
+ LayoutManager lm = getOriginatingLayoutManager();
if (lm instanceof ConditionalElementListener) {
((ConditionalElementListener)lm).notifyPadding(
getSide(), effectiveLength);
@@ -62,5 +62,5 @@
sb.append("]");
return sb.toString();
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/Page.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/Page.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/Page.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/Page.java Thu Jul 24 02:35:34 2008
@@ -34,39 +34,39 @@
private SimplePageMaster spm;
private PageViewport pageViewport;
-
+
/**
* Main constructor
* @param spm the simple-page-master used for this page
* @param pageNumber the page number (as an int)
- * @param pageNumberStr the page number (as a String)
+ * @param pageNumberStr the page number (as a String)
* @param blank true if this is a blank page
*/
public Page(SimplePageMaster spm, int pageNumber, String pageNumberStr, boolean blank) {
this.spm = spm;
this.pageViewport = new PageViewport(spm, pageNumber, pageNumberStr, blank);
}
-
+
/**
* Auxiliary constructor used when there's no SimplePageMaster.
* @param viewArea the view area of the page
* @param pageNumber the page number (as an int)
- * @param pageNumberStr the page number (as a String)
+ * @param pageNumberStr the page number (as a String)
* @param blank true if this is a blank page
*/
public Page(Rectangle2D viewArea, int pageNumber, String pageNumberStr, boolean blank) {
this.spm = null;
this.pageViewport = new PageViewport(viewArea, pageNumber, pageNumberStr, null, blank);
}
-
+
/** @return the simple-page-master that created this page */
public SimplePageMaster getSimplePageMaster() {
return this.spm;
}
-
+
/** @return the page viewport representing this page in the area tree */
public PageViewport getPageViewport() {
return this.pageViewport;
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreaker.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreaker.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -39,14 +39,14 @@
* Handles the breaking of pages in an fo:flow
*/
public class PageBreaker extends AbstractBreaker {
-
+
private PageSequenceLayoutManager pslm;
private boolean firstPart = true;
private boolean pageBreakHandled;
private boolean needColumnBalancing;
private PageProvider pageProvider;
private Block separatorArea;
-
+
/**
* The FlowLayoutManager object, which processes
* the single fo:flow of the fo:page-sequence
@@ -61,23 +61,23 @@
this.childFLM = pslm.getLayoutManagerMaker().makeFlowLayoutManager(
pslm, pslm.getPageSequence().getMainFlow());
}
-
+
/** {@inheritDoc} */
protected void updateLayoutContext(LayoutContext context) {
int flowIPD = pslm.getCurrentPV().getCurrentSpan().getColumnWidth();
context.setRefIPD(flowIPD);
}
-
+
/** {@inheritDoc} */
protected LayoutManager getTopLevelLM() {
return pslm;
}
-
+
/** {@inheritDoc} */
protected PageProvider getPageProvider() {
return pslm.getPageProvider();
}
-
+
/** {@inheritDoc} */
protected PageBreakingLayoutListener createLayoutListener() {
return new PageBreakingLayoutListener() {
@@ -98,7 +98,7 @@
amount, needClip, canRecover,
body.getLocator());
}
-
+
};
}
@@ -118,7 +118,7 @@
}
/** {@inheritDoc} */
- protected int getNextBlockList(LayoutContext childLC,
+ protected int getNextBlockList(LayoutContext childLC,
int nextSequenceStartsOn) {
if (!firstPart) {
// if this is the first page that will be created by
@@ -129,15 +129,15 @@
}
firstPart = false;
pageBreakHandled = true;
- pageProvider.setStartOfNextElementList(pslm.getCurrentPageNum(),
+ pageProvider.setStartOfNextElementList(pslm.getCurrentPageNum(),
pslm.getCurrentPV().getCurrentSpan().getCurrentFlowIndex());
return super.getNextBlockList(childLC, nextSequenceStartsOn);
}
-
+
/** {@inheritDoc} */
protected List getNextKnuthElements(LayoutContext context, int alignment) {
List contentList = null;
-
+
while (!childFLM.isFinished() && contentList == null) {
contentList = childFLM.getNextKnuthElements(context, alignment);
}
@@ -161,7 +161,7 @@
// store the lists of elements representing the footnote bodies
// in the box representing the line containing their references
while (footnoteBodyIterator.hasNext()) {
- FootnoteBodyLayoutManager fblm
+ FootnoteBodyLayoutManager fblm
= (FootnoteBodyLayoutManager) footnoteBodyIterator.next();
fblm.setParent(childFLM);
fblm.initialize();
@@ -178,7 +178,7 @@
footnoteSeparator = pslm.getPageSequence().getStaticContent("xsl-footnote-separator");
if (footnoteSeparator != null) {
// the footnote separator can contain page-dependent content such as
- // page numbers or retrieve markers, so its areas cannot simply be
+ // page numbers or retrieve markers, so its areas cannot simply be
// obtained now and repeated in each page;
// we need to know in advance the separator bpd: the actual separator
// could be different from page to page, but its bpd would likely be
@@ -199,7 +199,7 @@
}
return contentList;
}
-
+
/**
* @return current display alignment
*/
@@ -207,14 +207,14 @@
return pslm.getCurrentPage().getSimplePageMaster().getRegion(
Constants.FO_REGION_BODY).getDisplayAlign();
}
-
+
/**
* @return whether or not this flow has more page break opportunities
*/
protected boolean hasMoreContent() {
return !childFLM.isFinished();
}
-
+
/**
* Adds an area to the flow layout manager
* @param posIter the position iterator
@@ -235,18 +235,18 @@
footnoteSeparatorLM.doLayout();
}
- childFLM.addAreas(posIter, context);
+ childFLM.addAreas(posIter, context);
}
-
+
/**
* Performs phase 3 operation
- *
+ *
* @param alg page breaking algorithm
* @param partCount part count
* @param originalList the block sequence original list
* @param effectiveList the block sequence effective list
*/
- protected void doPhase3(PageBreakingAlgorithm alg, int partCount,
+ protected void doPhase3(PageBreakingAlgorithm alg, int partCount,
BlockSequence originalList, BlockSequence effectiveList) {
if (needColumnBalancing) {
doPhase3WithColumnBalancing(alg, partCount, originalList, effectiveList);
@@ -261,7 +261,7 @@
}
}
- private void doPhase3WithLastPage(PageBreakingAlgorithm alg, int partCount,
+ private void doPhase3WithLastPage(PageBreakingAlgorithm alg, int partCount,
BlockSequence originalList, BlockSequence effectiveList) {
int newStartPos;
int restartPoint = pageProvider.getStartingPartIndexForLastPage(partCount);
@@ -281,13 +281,13 @@
}
AbstractBreaker.log.debug("Last page handling now!!!");
AbstractBreaker.log.debug("===================================================");
- AbstractBreaker.log.debug("Restarting at " + restartPoint
+ AbstractBreaker.log.debug("Restarting at " + restartPoint
+ ", new start position: " + newStartPos);
pageBreakHandled = true;
//Update so the available BPD is reported correctly
int currentPageNum = pslm.getCurrentPageNum();
- pageProvider.setStartOfNextElementList(currentPageNum,
+ pageProvider.setStartOfNextElementList(currentPageNum,
pslm.getCurrentPV().getCurrentSpan().getCurrentFlowIndex());
pageProvider.setLastPageIndex(currentPageNum);
@@ -295,7 +295,7 @@
PageBreakingAlgorithm algRestart = new PageBreakingAlgorithm(
getTopLevelLM(),
getPageProvider(), createLayoutListener(),
- alg.getAlignment(), alg.getAlignmentLast(),
+ alg.getAlignment(), alg.getAlignmentLast(),
footnoteSeparatorLength,
isPartOverflowRecoveryActivated(), false, false);
//alg.setConstantLineWidth(flowBPD);
@@ -304,8 +304,8 @@
1, true, BreakingAlgorithm.ALL_BREAKS);
AbstractBreaker.log.debug("restart: iOptPageCount= " + iOptPageCount
+ " pageBreaks.size()= " + algRestart.getPageBreaks().size());
- boolean replaceLastPage
- = iOptPageCount <= pslm.getCurrentPV().getBodyRegion().getColumnCount();
+ boolean replaceLastPage
+ = iOptPageCount <= pslm.getCurrentPV().getBodyRegion().getColumnCount();
if (replaceLastPage) {
//Replace last page
pslm.setCurrentPage(pageProvider.getPage(false, currentPageNum));
@@ -322,7 +322,7 @@
AbstractBreaker.log.debug("===================================================");
}
- private void doPhase3WithColumnBalancing(PageBreakingAlgorithm alg, int partCount,
+ private void doPhase3WithColumnBalancing(PageBreakingAlgorithm alg, int partCount,
BlockSequence originalList, BlockSequence effectiveList) {
AbstractBreaker.log.debug("Column balancing now!!!");
AbstractBreaker.log.debug("===================================================");
@@ -342,12 +342,12 @@
} else {
newStartPos = 0;
}
- AbstractBreaker.log.debug("Restarting at " + restartPoint
+ AbstractBreaker.log.debug("Restarting at " + restartPoint
+ ", new start position: " + newStartPos);
pageBreakHandled = true;
//Update so the available BPD is reported correctly
- pageProvider.setStartOfNextElementList(pslm.getCurrentPageNum(),
+ pageProvider.setStartOfNextElementList(pslm.getCurrentPageNum(),
pslm.getCurrentPV().getCurrentSpan().getCurrentFlowIndex());
//Restart last page
@@ -376,15 +376,15 @@
addAreas(algRestart, iOptPageCount, originalList, effectiveList);
AbstractBreaker.log.debug("===================================================");
}
-
+
protected void startPart(BlockSequence list, int breakClass) {
AbstractBreaker.log.debug("startPart() breakClass=" + breakClass);
if (pslm.getCurrentPage() == null) {
throw new IllegalStateException("curPage must not be null");
}
if (!pageBreakHandled) {
-
- //firstPart is necessary because we need the first page before we start the
+
+ //firstPart is necessary because we need the first page before we start the
//algorithm so we have a BPD and IPD. This may subject to change later when we
//start handling more complex cases.
if (!firstPart) {
@@ -394,7 +394,7 @@
// otherwise, we may simply need a new page
handleBreakTrait(breakClass);
}
- pageProvider.setStartOfNextElementList(pslm.getCurrentPageNum(),
+ pageProvider.setStartOfNextElementList(pslm.getCurrentPageNum(),
pslm.getCurrentPV().getCurrentSpan().getCurrentFlowIndex());
}
pageBreakHandled = false;
@@ -402,12 +402,12 @@
// finish page and add to area tree
firstPart = false;
}
-
+
/** {@inheritDoc} */
protected void handleEmptyContent() {
pslm.getCurrentPV().getPage().fakeNonEmpty();
}
-
+
protected void finishPart(PageBreakingAlgorithm alg, PageBreakPosition pbp) {
// add footnote areas
if (pbp.footnoteFirstListIndex < pbp.footnoteLastListIndex
@@ -415,16 +415,16 @@
// call addAreas() for each FootnoteBodyLM
for (int i = pbp.footnoteFirstListIndex; i <= pbp.footnoteLastListIndex; i++) {
LinkedList elementList = alg.getFootnoteList(i);
- int firstIndex = (i == pbp.footnoteFirstListIndex
+ int firstIndex = (i == pbp.footnoteFirstListIndex
? pbp.footnoteFirstElementIndex : 0);
- int lastIndex = (i == pbp.footnoteLastListIndex
+ int lastIndex = (i == pbp.footnoteLastListIndex
? pbp.footnoteLastElementIndex : elementList.size() - 1);
- SpaceResolver.performConditionalsNotification(elementList,
+ SpaceResolver.performConditionalsNotification(elementList,
firstIndex, lastIndex, -1);
LayoutContext childLC = new LayoutContext(0);
- AreaAdditionUtil.addAreas(null,
- new KnuthPossPosIter(elementList, firstIndex, lastIndex + 1),
+ AreaAdditionUtil.addAreas(null,
+ new KnuthPossPosIter(elementList, firstIndex, lastIndex + 1),
childLC);
}
// set the offset from the top margin
@@ -438,20 +438,20 @@
}
pslm.getCurrentPV().getCurrentSpan().notifyFlowsFinished();
}
-
+
/**
* @return the current child flow layout manager
*/
protected LayoutManager getCurrentChildLM() {
return childFLM;
}
-
+
/** {@inheritDoc} */
protected void observeElementList(List elementList) {
- ElementListObserver.observe(elementList, "breaker",
+ ElementListObserver.observe(elementList, "breaker",
((PageSequence)pslm.getFObj()).getId());
}
-
+
/**
* Depending on the kind of break condition, move to next column
* or page. May need to make an empty page if next page would
@@ -471,17 +471,17 @@
|| breakVal <= 0
|| breakVal == Constants.EN_AUTO) {
PageViewport pv = curPage.getPageViewport();
-
+
//Check if previous page was spanned
boolean forceNewPageWithSpan = false;
RegionBody rb = (RegionBody)curPage.getSimplePageMaster().getRegion(
Constants.FO_REGION_BODY);
- if (breakVal < 0
- && rb.getColumnCount() > 1
+ if (breakVal < 0
+ && rb.getColumnCount() > 1
&& pv.getCurrentSpan().getColumnCount() == 1) {
forceNewPageWithSpan = true;
}
-
+
if (forceNewPageWithSpan) {
curPage = pslm.makeNewPage(false, false);
curPage.getPageViewport().createSpan(true);
@@ -492,7 +492,7 @@
}
return;
}
- log.debug("handling break-before after page " + pslm.getCurrentPageNum()
+ log.debug("handling break-before after page " + pslm.getCurrentPageNum()
+ " breakVal=" + breakVal);
if (needBlankPageBeforeNew(breakVal)) {
curPage = pslm.makeNewPage(true, false);
@@ -501,7 +501,7 @@
curPage = pslm.makeNewPage(false, false);
}
}
-
+
/**
* Check if a blank page is needed to accomodate
* desired even or odd page number.
@@ -520,7 +520,7 @@
}
}
}
-
+
/**
* See if need to generate a new page
* @param breakVal - value of break-before or break-after trait.
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java Thu Jul 24 02:35:34 2008
@@ -73,13 +73,13 @@
/** Index of the last element of the last footnote inserted on the current page. */
private int footnoteElementIndex = -1;
- // demerits for a page break that splits a footnote
+ // demerits for a page break that splits a footnote
private int splitFootnoteDemerits = 5000;
- // demerits for a page break that defers a whole footnote to the following page
+ // demerits for a page break that defers a whole footnote to the following page
private int deferredFootnoteDemerits = 10000;
private MinOptMax footnoteSeparatorLength = null;
- // the method noBreakBetween(int, int) uses these variables
+ // the method noBreakBetween(int, int) uses these variables
// to store parameters and result of the last call, in order
// to reuse them and take less time
private int storedPrevBreakIndex = -1;
@@ -88,10 +88,10 @@
//Controls whether overflows should be warned about or not
private boolean autoHeight = false;
-
+
//Controls whether a single part should be forced if possible (ex. block-container)
private boolean favorSinglePart = false;
-
+
public PageBreakingAlgorithm(LayoutManager topLevelLM,
PageProvider pageProvider,
PageBreakingLayoutListener layoutListener,
@@ -202,7 +202,7 @@
totalWidth, totalStretch, totalShrink,
((BestPageRecords) best).getFootnotesLength(fitness),
((BestPageRecords) best).getFootnoteListIndex(fitness),
- ((BestPageRecords) best).getFootnoteElementIndex(fitness),
+ ((BestPageRecords) best).getFootnoteElementIndex(fitness),
best.getAdjust(fitness), best.getAvailableShrink(fitness),
best.getAvailableStretch(fitness), best.getDifference(fitness),
best.getDemerits(fitness), best.getNode(fitness));
@@ -247,11 +247,11 @@
ListIterator elementListsIterator = elementLists.listIterator();
while (elementListsIterator.hasNext()) {
LinkedList noteList = (LinkedList) elementListsIterator.next();
-
- //Space resolution (Note: this does not respect possible stacking constraints
+
+ //Space resolution (Note: this does not respect possible stacking constraints
//between footnotes!)
SpaceResolver.resolveElementList(noteList);
-
+
int noteLength = 0;
footnotesList.add(noteList);
ListIterator noteListIterator = noteList.listIterator();
@@ -261,8 +261,8 @@
noteLength += element.getW();
}
}
- int prevLength = (lengthList.size() == 0
- ? 0
+ int prevLength = (lengthList.size() == 0
+ ? 0
: ((Integer) lengthList.get(lengthList.size() - 1)).intValue());
lengthList.add(new Integer(prevLength + noteLength));
totalFootnotesLength += noteLength;
@@ -423,7 +423,7 @@
index < breakIndex;
index++) {
if (par.getElement(index).isGlue() && par.getElement(index - 1).isBox()
- || par.getElement(index).isPenalty()
+ || par.getElement(index).isPenalty()
&& ((KnuthElement) par.getElement(index)).getP() < KnuthElement.INFINITE) {
// break found
break;
@@ -520,7 +520,7 @@
}
// as this method is called only if it is not possible to insert
// all footnotes, at this point listIndex and elementIndex points to
- // an existing element, the next one we will try to insert
+ // an existing element, the next one we will try to insert
}
// try adding a split of the next note
@@ -582,7 +582,7 @@
// prevIndex is -1 if we have added only some whole footnotes
footnoteListIndex = (prevIndex != -1) ? listIndex : listIndex - 1;
footnoteElementIndex = (prevIndex != -1)
- ? prevIndex
+ ? prevIndex
: ((LinkedList) footnotesList.get(footnoteListIndex)).size() - 1;
}
return prevSplitLength;
@@ -618,7 +618,7 @@
}
}
- protected double computeDemerits(KnuthNode activeNode, KnuthElement element,
+ protected double computeDemerits(KnuthNode activeNode, KnuthElement element,
int fitnessClass, double r) {
double demerits = 0;
// compute demerits
@@ -649,11 +649,11 @@
if (footnotesPending) {
if (footnoteListIndex < footnotesList.size() - 1) {
// add demerits for the deferred footnotes
- demerits += (footnotesList.size() - 1 - footnoteListIndex)
+ demerits += (footnotesList.size() - 1 - footnoteListIndex)
* deferredFootnoteDemerits;
}
if (footnoteListIndex < footnotesList.size()) {
- if (footnoteElementIndex
+ if (footnoteElementIndex
< ((LinkedList) footnotesList.get(footnoteListIndex)).size() - 1) {
// add demerits for the footnote split between pages
demerits += splitFootnoteDemerits;
@@ -710,7 +710,7 @@
// cannot add any content: create a new node and start again
KnuthPageNode node = (KnuthPageNode)
createNode(lastNode.position, prevNode.line + 1, 1,
- insertedFootnotesLength - prevNode.totalFootnotes,
+ insertedFootnotesLength - prevNode.totalFootnotes,
0, 0,
0, 0, 0,
0, 0, prevNode);
@@ -744,7 +744,7 @@
}
pageBreaks.addFirst(pageBreak);
}
-
+
/**
* Removes all page breaks from the result list. This is used by block-containers and
* static-content when it is only desired to know where there is an overflow but later the
@@ -758,14 +758,14 @@
pageBreaks.removeFirst();
}
}
-
+
public void updateData1(int total, double demerits) {
}
public void updateData2(KnuthNode bestActiveNode,
KnuthSequence sequence,
int total) {
- //int difference = (bestActiveNode.line < total)
+ //int difference = (bestActiveNode.line < total)
// ? bestActiveNode.difference : bestActiveNode.difference + fillerMinWidth;
int difference = bestActiveNode.difference;
if (difference + bestActiveNode.availableShrink < 0) {
@@ -818,10 +818,10 @@
// add nodes at the beginning of the list, as they are found
// backwards, from the last one to the first one
if (log.isDebugEnabled()) {
- log.debug("BBA> difference=" + difference + " ratio=" + ratio
+ log.debug("BBA> difference=" + difference + " ratio=" + ratio
+ " position=" + bestActiveNode.position);
}
- insertPageBreakAsFirst(new PageBreakPosition(this.topLevelLM,
+ insertPageBreakAsFirst(new PageBreakPosition(this.topLevelLM,
bestActiveNode.position,
firstListIndex, firstElementIndex,
((KnuthPageNode) bestActiveNode).footnoteListIndex,
@@ -834,8 +834,8 @@
KnuthNode bestActiveNode = null;
for (int i = startLine; i < endLine; i++) {
for (KnuthNode node = getNode(i); node != null; node = node.next) {
- if (favorSinglePart
- && node.line > 1
+ if (favorSinglePart
+ && node.line > 1
&& bestActiveNode != null
&& Math.abs(bestActiveNode.difference) < bestActiveNode.availableShrink) {
//favor current best node, so just skip the current node because it would
@@ -854,12 +854,12 @@
public LinkedList getFootnoteList(int index) {
return (LinkedList) footnotesList.get(index);
}
-
+
/** @return the associated top-level formatting object. */
public FObj getFObj() {
return topLevelLM.getFObj();
}
-
+
/** {@inheritDoc} */
protected int getLineWidth(int line) {
int bpd;
@@ -873,7 +873,7 @@
}
return bpd;
}
-
+
/**
* Interface to notify about layout events during page breaking.
*/
@@ -886,7 +886,7 @@
* @param obj the root FO object where this happens
*/
void notifyOverflow(int part, int amount, FObj obj);
-
+
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageProvider.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageProvider.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageProvider.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageProvider.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -35,38 +35,38 @@
* </p>
* <p>Additional functionality makes sure that surplus instances that are requested by the
* page breaker are properly discarded, especially in situations where hard breaks cause
- * blank pages. The reason for that: The page breaker sometimes needs to preallocate
+ * blank pages. The reason for that: The page breaker sometimes needs to preallocate
* additional pages since it doesn't know exactly until the end how many pages it really needs.
* </p>
*/
public class PageProvider implements Constants {
-
+
private Log log = LogFactory.getLog(PageProvider.class);
/** Indices are evaluated relative to the first page in the page-sequence. */
public static final int RELTO_PAGE_SEQUENCE = 0;
/** Indices are evaluated relative to the first page in the current element list. */
public static final int RELTO_CURRENT_ELEMENT_LIST = 1;
-
+
private int startPageOfPageSequence;
private int startPageOfCurrentElementList;
private int startColumnOfCurrentElementList;
private List cachedPages = new java.util.ArrayList();
-
+
private int lastPageIndex = -1;
private int indexOfCachedLastPage = -1;
-
+
//Cache to optimize getAvailableBPD() calls
private int lastRequestedIndex = -1;
private int lastReportedBPD = -1;
- /**
+ /**
* AreaTreeHandler which activates the PSLM and controls
* the rendering of its pages.
*/
private AreaTreeHandler areaTreeHandler;
- /**
+ /**
* fo:page-sequence formatting object being
* processed by this class
*/
@@ -82,12 +82,12 @@
this.pageSeq = ps;
this.startPageOfPageSequence = ps.getStartingPageNumber();
}
-
+
/**
* The page breaker notifies the provider about the page number an element list starts
* on so it can later retrieve PageViewports relative to this first page.
* @param startPage the number of the first page for the element list.
- * @param startColumn the starting column number for the element list.
+ * @param startColumn the starting column number for the element list.
*/
public void setStartOfNextElementList(int startPage, int startColumn) {
log.debug("start of the next element list is:"
@@ -98,7 +98,7 @@
this.lastRequestedIndex = -1;
this.lastReportedBPD = -1;
}
-
+
/**
* Sets the index of the last page. This is done as soon as the position of the last page
* is known or assumed.
@@ -107,7 +107,7 @@
public void setLastPageIndex(int index) {
this.lastPageIndex = index;
}
-
+
/**
* Returns the available BPD for the part/page indicated by the index parameter.
* The index is the part/page relative to the start of the current element list.
@@ -145,9 +145,9 @@
}
return this.lastReportedBPD;
}
-
+
/**
- * Returns the part index (0<x<partCount) which denotes the first part on the last page
+ * Returns the part index (0<x<partCount) which denotes the first part on the last page
* generated by the current element list.
* @param partCount Number of parts determined by the breaking algorithm
* @return the requested part index
@@ -177,7 +177,7 @@
* Returns a Page.
* @param isBlank true if this page is supposed to be blank.
* @param index Index of the page (see relativeTo)
- * @param relativeTo Defines which value the index parameter should be evaluated relative
+ * @param relativeTo Defines which value the index parameter should be evaluated relative
* to. (One of PageProvider.RELTO_*)
* @return the requested Page
*/
@@ -193,7 +193,7 @@
"Illegal value for relativeTo: " + relativeTo);
}
}
-
+
/**
* Returns a Page.
* @param isBlank true if the Page should be a blank one
@@ -203,7 +203,7 @@
protected Page getPage(boolean isBlank, int index) {
boolean isLastPage = (lastPageIndex >= 0) && (index == lastPageIndex);
if (log.isTraceEnabled()) {
- log.trace("getPage(" + index + " " + (isBlank ? "blank" : "non-blank")
+ log.trace("getPage(" + index + " " + (isBlank ? "blank" : "non-blank")
+ (isLastPage ? " <LAST>" : "") + ")");
}
int intIndex = index - startPageOfPageSequence;
@@ -248,12 +248,12 @@
}
}
}
-
+
private Page cacheNextPage(int index, boolean isBlank, boolean isLastPage) {
String pageNumberString = pageSeq.makeFormattedPageNumber(index);
SimplePageMaster spm = pageSeq.getNextSimplePageMaster(
index, (startPageOfPageSequence == index), isLastPage, false, isBlank);
-
+
Region body = spm.getRegion(FO_REGION_BODY);
if (!pageSeq.getMainFlow().getFlowName().equals(body.getRegionName())) {
// this is fine by the XSL Rec (fo:flow's flow-name can be mapped to
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java Thu Jul 24 02:35:34 2008
@@ -57,9 +57,9 @@
public PageProvider getPageProvider() {
return this.pageProvider;
}
-
+
/**
- * @return the PageSequence being managed by this layout manager
+ * @return the PageSequence being managed by this layout manager
*/
protected PageSequence getPageSequence() {
return (PageSequence)pageSeq;
@@ -72,7 +72,7 @@
public PageSequenceLayoutManager getPSLM() {
return this;
}
-
+
/** {@inheritDoc} */
public void activateLayout() {
initialize();
@@ -100,7 +100,7 @@
}
curPage = makeNewPage(false, false);
-
+
PageBreaker breaker = new PageBreaker(this);
int flowBPD = getCurrentPV().getBodyRegion().getRemainingBPD();
breaker.doLayout(flowBPD);
@@ -118,7 +118,7 @@
areaTreeHandler.notifyPageSequenceFinished(pageSeq,
(currentPageNum - startPageNum) + 1);
getPageSequence().releasePageSequence();
-
+
// If this sequence has a page sequence master so we must reset
// it in preparation for the next sequence
String masterReference = getPageSequence().getMasterReference();
@@ -132,13 +132,13 @@
log.debug("Ending layout");
}
}
-
+
/** {@inheritDoc} */
protected Page createPage(int pageNumber, boolean isBlank) {
return pageProvider.getPage(isBlank,
pageNumber, PageProvider.RELTO_PAGE_SEQUENCE);
}
-
+
private void layoutSideRegion(int regionID) {
SideRegion reg = (SideRegion)curPage.getSimplePageMaster().getRegion(regionID);
if (reg == null) {
@@ -158,12 +158,12 @@
/** {@inheritDoc} */
protected void finishPage() {
// Layout side regions
- layoutSideRegion(FO_REGION_BEFORE);
+ layoutSideRegion(FO_REGION_BEFORE);
layoutSideRegion(FO_REGION_AFTER);
layoutSideRegion(FO_REGION_START);
layoutSideRegion(FO_REGION_END);
-
+
super.finishPage();
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/Position.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/Position.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/Position.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/Position.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,11 +16,11 @@
*/
/* $Id$ */
-
+
package org.apache.fop.layoutmgr;
public class Position {
-
+
private LayoutManager layoutManager;
private int index = -1;
@@ -39,14 +39,14 @@
public Position getPosition() {
return null;
}
-
+
public boolean generatesAreas() {
return false;
}
/**
* Sets the index of this position in the sequence of Position elements.
- *
+ *
* @param value this position's index
*/
public void setIndex(int value) {
@@ -55,13 +55,13 @@
/**
* Returns the index of this position in the sequence of Position elements.
- *
+ *
* @return the index of this position in the sequence of Position elements
*/
public int getIndex() {
return this.index;
}
-
+
public String getShortLMName() {
if (getLM() != null) {
String lm = getLM().toString();
@@ -75,7 +75,7 @@
return "null";
}
}
-
+
/** {@inheritDoc} */
public String toString() {
StringBuffer sb = new StringBuffer();
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PositionIterator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PositionIterator.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PositionIterator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PositionIterator.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,14 +16,14 @@
*/
/* $Id$ */
-
+
package org.apache.fop.layoutmgr;
import java.util.Iterator;
import java.util.NoSuchElementException;
public abstract class PositionIterator implements Iterator {
-
+
private Iterator parentIter;
private Object nextObj;
private LayoutManager childLM;
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/RelSide.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/RelSide.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/RelSide.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/RelSide.java Thu Jul 24 02:35:34 2008
@@ -30,7 +30,7 @@
public static final RelSide START = new RelSide("start");
/** the end side */
public static final RelSide END = new RelSide("end");
-
+
private String name;
/**
@@ -45,10 +45,10 @@
public String getName() {
return this.name;
}
-
+
/** {@inheritDoc} */
public String toString() {
return "RelSide:" + name;
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/SpaceElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/SpaceElement.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/SpaceElement.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/SpaceElement.java Thu Jul 24 02:35:34 2008
@@ -30,7 +30,7 @@
public class SpaceElement extends UnresolvedListElementWithLength {
private int precedence;
-
+
/**
* Main constructor
* @param position the Position instance needed by the addAreas stage of the LMs.
@@ -40,21 +40,21 @@
* @param isLast true if this is a space-after of the last area generated.
* @param context the property evaluation context
*/
- public SpaceElement(Position position, SpaceProperty space, RelSide side,
+ public SpaceElement(Position position, SpaceProperty space, RelSide side,
boolean isFirst, boolean isLast,
PercentBaseContext context) {
- super(position,
+ super(position,
MinOptMaxUtil.toMinOptMax(
- space.getSpace().getLengthRange(),
+ space.getSpace().getLengthRange(),
context), side, space.isDiscard(), isFirst, isLast);
int en = space.getSpace().getPrecedence().getEnum();
if (en == Constants.EN_FORCE) {
this.precedence = Integer.MAX_VALUE;
} else {
- this.precedence = space.getSpace().getPrecedence().getNumber().intValue();
+ this.precedence = space.getSpace().getPrecedence().getNumber().intValue();
}
}
-
+
/** @return true if the space is forcing. */
public boolean isForcing() {
return this.precedence == Integer.MAX_VALUE;
@@ -64,7 +64,7 @@
public int getPrecedence() {
return this.precedence;
}
-
+
/** {@inheritDoc} */
public void notifyLayoutManager(MinOptMax effectiveLength) {
LayoutManager lm = getOriginatingLayoutManager();
@@ -72,11 +72,11 @@
((ConditionalElementListener)lm).notifySpace(
getSide(), effectiveLength);
} else {
- log.warn("Cannot notify LM. It does not implement ConditionalElementListener:"
+ log.warn("Cannot notify LM. It does not implement ConditionalElementListener:"
+ lm.getClass().getName());
}
}
-
+
/** {@inheritDoc} */
public String toString() {
StringBuffer sb = new StringBuffer("Space[");
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org