Class BreakingAlgorithm.KnuthNode

java.lang.Object
org.apache.fop.layoutmgr.BreakingAlgorithm.KnuthNode
Enclosing class:
BreakingAlgorithm

public class BreakingAlgorithm.KnuthNode extends Object
Class recording all the informations of a feasible breaking point.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final double
    adjustment ratio if the line ends at this breakpoint
    final int
    available stretch of the line ending at this breakpoint
    final int
    available shrink of the line ending at this breakpoint
    final int
    difference between target and actual line width
    final 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 breakpoint
    next possible node in the same line
    final int
    index of the breakpoint represented by this node
    best node for the preceding breakpoint
    double
    minimum total demerits up to this breakpoint
    final 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

    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

    Modifier and Type
    Method
    Description

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • 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

      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 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 integer
      line - an integer
      fitness - an integer
      totalWidth - an integer
      totalStretch - an integer
      totalShrink - an integer
      adjustRatio - a real number
      availableShrink - an integer
      availableStretch - an integer
      difference - an integer
      totalDemerits - a real number
      previous - a node
  • Method Details