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.Object
Class recording all the informations of a feasible breaking point.
-
-
Field Summary
Fields Modifier and Type Field Description double
adjustRatio
adjustment ratio if the line ends at this breakpointint
availableShrink
available stretch of the line ending at this breakpointint
availableStretch
available shrink of the line ending at this breakpointint
difference
difference between target and actual line widthint
fitness
fitness class of the line ending at this breakpoint.int
fitRecoveryCounter
Holds the number of subsequent recovery attempty that are made to get content fit into a line.int
line
number of the line ending at this breakpointBreakingAlgorithm.KnuthNode
next
next possible node in the same lineint
position
index of the breakpoint represented by this nodeBreakingAlgorithm.KnuthNode
previous
best node for the preceding breakpointdouble
totalDemerits
minimum total demerits up to this breakpointint
totalShrink
accumulated shrinkability of the KnuthElements up to after this breakpoint.int
totalStretch
accumulated stretchability of the KnuthElements up to after this breakpoint.int
totalWidth
accumulated 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.String
toString()
-
-
-
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
-
-