Package org.apache.fop.layoutmgr
Class BreakingAlgorithm.KnuthNode
- java.lang.Object
-
- org.apache.fop.layoutmgr.BreakingAlgorithm.KnuthNode
-
- Enclosing class:
- BreakingAlgorithm
public class BreakingAlgorithm.KnuthNode extends java.lang.ObjectClass recording all the informations of a feasible breaking point.
-
-
Field Summary
Fields Modifier and Type Field Description doubleadjustRatioadjustment ratio if the line ends at this breakpointintavailableShrinkavailable stretch of the line ending at this breakpointintavailableStretchavailable shrink of the line ending at this breakpointintdifferencedifference between target and actual line widthintfitnessfitness class of the line ending at this breakpoint.intfitRecoveryCounterHolds the number of subsequent recovery attempty that are made to get content fit into a line.intlinenumber of the line ending at this breakpointBreakingAlgorithm.KnuthNodenextnext possible node in the same lineintpositionindex of the breakpoint represented by this nodeBreakingAlgorithm.KnuthNodepreviousbest node for the preceding breakpointdoubletotalDemeritsminimum total demerits up to this breakpointinttotalShrinkaccumulated shrinkability of the KnuthElements up to after this breakpoint.inttotalStretchaccumulated stretchability of the KnuthElements up to after this breakpoint.inttotalWidthaccumulated width of the KnuthElements up to after this breakpoint.
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringtoString()
-
-
-
Field Detail
-
position
public final int position
index of the breakpoint represented by this node
-
line
public final int line
number of the line ending at this breakpoint
-
fitness
public final int fitness
fitness class of the line ending at this breakpoint. One of 0, 1, 2, 3.
-
totalWidth
public final int totalWidth
accumulated width of the KnuthElements up to after this breakpoint.
-
totalStretch
public final int totalStretch
accumulated stretchability of the KnuthElements up to after this breakpoint.
-
totalShrink
public final int totalShrink
accumulated shrinkability of the KnuthElements up to after this breakpoint.
-
adjustRatio
public final double adjustRatio
adjustment ratio if the line ends at this breakpoint
-
availableShrink
public final int availableShrink
available stretch of the line ending at this breakpoint
-
availableStretch
public final int availableStretch
available shrink of the line ending at this breakpoint
-
difference
public final int difference
difference between target and actual line width
-
totalDemerits
public double totalDemerits
minimum total demerits up to this breakpoint
-
previous
public BreakingAlgorithm.KnuthNode previous
best node for the preceding breakpoint
-
next
public BreakingAlgorithm.KnuthNode next
next possible node in the same line
-
fitRecoveryCounter
public int fitRecoveryCounter
Holds the number of subsequent recovery attempty that are made to get content fit into a line.
-
-
Constructor Detail
-
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
-
-