Package org.apache.fop.layoutmgr
Class BreakingAlgorithm.KnuthNode
java.lang.Object
org.apache.fop.layoutmgr.BreakingAlgorithm.KnuthNode
- Enclosing class:
- BreakingAlgorithm
Class recording all the informations of a feasible breaking point.
-
Field Summary
Modifier and TypeFieldDescriptionfinal double
adjustment ratio if the line ends at this breakpointfinal int
available stretch of the line ending at this breakpointfinal int
available shrink of the line ending at this breakpointfinal int
difference between target and actual line widthfinal int
fitness class of the line ending at this breakpoint.int
Holds the number of subsequent recovery attempty that are made to get content fit into a line.final int
number of the line ending at this breakpointnext possible node in the same linefinal int
index of the breakpoint represented by this nodebest node for the preceding breakpointdouble
minimum total demerits up to this breakpointfinal int
accumulated shrinkability of the KnuthElements up to after this breakpoint.final int
accumulated stretchability of the KnuthElements up to after this breakpoint.final int
accumulated width of the KnuthElements up to after this breakpoint. -
Constructor Summary
ConstructorDescriptionKnuthNode
(int position, int line, int fitness, int totalWidth, int totalStretch, int totalShrink, double adjustRatio, int availableShrink, int availableStretch, int difference, double totalDemerits, BreakingAlgorithm.KnuthNode previous) Construct node. -
Method Summary
-
Field Details
-
position
public final int positionindex of the breakpoint represented by this node -
line
public final int linenumber of the line ending at this breakpoint -
fitness
public final int fitnessfitness class of the line ending at this breakpoint. One of 0, 1, 2, 3. -
totalWidth
public final int totalWidthaccumulated width of the KnuthElements up to after this breakpoint. -
totalStretch
public final int totalStretchaccumulated stretchability of the KnuthElements up to after this breakpoint. -
totalShrink
public final int totalShrinkaccumulated shrinkability of the KnuthElements up to after this breakpoint. -
adjustRatio
public final double adjustRatioadjustment ratio if the line ends at this breakpoint -
availableShrink
public final int availableShrinkavailable stretch of the line ending at this breakpoint -
availableStretch
public final int availableStretchavailable shrink of the line ending at this breakpoint -
difference
public final int differencedifference between target and actual line width -
totalDemerits
public double totalDemeritsminimum total demerits up to this breakpoint -
previous
best node for the preceding breakpoint -
next
next possible node in the same line -
fitRecoveryCounter
public int fitRecoveryCounterHolds the number of subsequent recovery attempty that are made to get content fit into a line.
-
-
Constructor Details
-
KnuthNode
public KnuthNode(int position, int line, int fitness, int totalWidth, int totalStretch, int totalShrink, double adjustRatio, int availableShrink, int availableStretch, int difference, double totalDemerits, BreakingAlgorithm.KnuthNode previous) Construct node.- Parameters:
position
- an integerline
- an integerfitness
- an integertotalWidth
- an integertotalStretch
- an integertotalShrink
- an integeradjustRatio
- a real numberavailableShrink
- an integeravailableStretch
- an integerdifference
- an integertotalDemerits
- a real numberprevious
- a node
-
-
Method Details