Package org.apache.fop.layoutmgr.inline
Class LineLayoutManager.LineBreakingAlgorithm
java.lang.Object
org.apache.fop.layoutmgr.BreakingAlgorithm
org.apache.fop.layoutmgr.inline.LineLayoutManager.LineBreakingAlgorithm
- Enclosing class:
LineLayoutManager
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.fop.layoutmgr.BreakingAlgorithm
BreakingAlgorithm.BestRecords, BreakingAlgorithm.KnuthNode
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private int
private final int
private final int
private final int
private static final double
private final int
private final int
private final LineLayoutManager
Fields inherited from class org.apache.fop.layoutmgr.BreakingAlgorithm
activeLines, activeNodeCount, alignment, alignmentLast, ALL_BREAKS, best, considerTooShort, endLine, incompatibleFitnessDemerit, indentFirstPart, INFINITE_RATIO, lineWidth, log, maxFlaggedPenaltiesCount, NO_FLAGGED_PENALTIES, ONLY_FORCED_BREAKS, par, repeatedFlaggedDemerit, startLine, totalShrink, totalStretch, totalWidth
-
Constructor Summary
ConstructorsConstructorDescriptionLineBreakingAlgorithm
(int pageAlign, int textAlign, int textAlignLast, int indent, int fillerWidth, int lh, int ld, int fl, boolean first, int maxFlagCount, LineLayoutManager llm) -
Method Summary
Modifier and TypeMethodDescriptionprotected int
Filter active nodes.makeLineBreakPosition
(KnuthSequence par, int firstElementIndex, int lastElementIndex, int availableShrink, int availableStretch, int difference, double ratio, int startIndent, int endIndent) void
void
updateData1
(int lineCount, double demerits) Empty method, hook for subclasses.void
updateData2
(BreakingAlgorithm.KnuthNode bestActiveNode, KnuthSequence par, int total) Empty method, hook for subclasses.Methods inherited from class org.apache.fop.layoutmgr.BreakingAlgorithm
activateNode, addNode, calculateBreakPoints, compareNodes, computeAdjustmentRatio, computeDemerits, computeDifference, considerLegalBreak, createForcedNodes, createNode, createNode, deactivateNode, disableFloatHandling, elementCanEndLine, findBreakingPoints, findBreakingPoints, finish, forceNode, getAlignment, getAlignmentLast, getElement, getIPDdifference, getLastTooLong, getLastTooShort, getLineWidth, getLineWidth, getMaxRecoveryAttempts, getNode, handleBox, handleElementAt, handleFloat, handleGlueAt, handleIpdChange, handlePenaltyAt, handlingFloat, initialize, isPartOverflowRecoveryActivated, recoverFromOverflow, recoverFromTooLong, removeNode, replaceLastDeactivated, restartFrom, setConstantLineWidth, toString
-
Field Details
-
thisLLM
-
pageAlignment
private final int pageAlignment -
activePossibility
private int activePossibility -
addedPositions
private int addedPositions -
textIndent
private final int textIndent -
lineHeight
private final int lineHeight -
lead
private final int lead -
follow
private final int follow -
MAX_DEMERITS
private static final double MAX_DEMERITS- See Also:
-
-
Constructor Details
-
LineBreakingAlgorithm
public LineBreakingAlgorithm(int pageAlign, int textAlign, int textAlignLast, int indent, int fillerWidth, int lh, int ld, int fl, boolean first, int maxFlagCount, LineLayoutManager llm)
-
-
Method Details
-
updateData1
public void updateData1(int lineCount, double demerits) Description copied from class:BreakingAlgorithm
Empty method, hook for subclasses. Called before determining the optimal breakpoints corresponding to a given active node.- Specified by:
updateData1
in classBreakingAlgorithm
- Parameters:
lineCount
- number of lines for the active nodedemerits
- total demerits of the paragraph for the active node
-
updateData2
Description copied from class:BreakingAlgorithm
Empty method, hook for subclasses. Called when determining the optimal breakpoints for a given active node.- Specified by:
updateData2
in classBreakingAlgorithm
- Parameters:
bestActiveNode
- a node in the chain of best active nodes, corresponding to one of the optimal breakpointspar
- the corresponding paragraphtotal
- the number of lines into which the paragraph will be broken
-
resetAlgorithm
public void resetAlgorithm() -
makeLineBreakPosition
private LineLayoutManager.LineBreakPosition makeLineBreakPosition(KnuthSequence par, int firstElementIndex, int lastElementIndex, int availableShrink, int availableStretch, int difference, double ratio, int startIndent, int endIndent) -
filterActiveNodes
protected int filterActiveNodes()Description copied from class:BreakingAlgorithm
Filter active nodes.- Specified by:
filterActiveNodes
in classBreakingAlgorithm
- Returns:
- an integer
-