|
fop 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.layoutmgr.BreakingAlgorithm.BestRecords
protected class BreakingAlgorithm.BestRecords
Class that stores, for each fitness class, the best active node that could start a line of the corresponding fitness ending at the current element.
Constructor Summary | |
---|---|
BreakingAlgorithm.BestRecords()
default constructor |
Method Summary | |
---|---|
void |
addRecord(double demerits,
BreakingAlgorithm.KnuthNode node,
double adjust,
int availableShrink,
int availableStretch,
int difference,
int fitness)
Registers the new best active node for the given fitness class. |
double |
getAdjust(int fitness)
|
int |
getAvailableShrink(int fitness)
|
int |
getAvailableStretch(int fitness)
|
double |
getDemerits(int fitness)
|
int |
getDifference(int fitness)
|
double |
getMinDemerits()
|
BreakingAlgorithm.KnuthNode |
getNode(int fitness)
|
boolean |
hasRecords()
|
boolean |
notInfiniteDemerits(int fitness)
|
void |
reset()
Reset when a new breakpoint is being considered. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BreakingAlgorithm.BestRecords()
Method Detail |
---|
public void addRecord(double demerits, BreakingAlgorithm.KnuthNode node, double adjust, int availableShrink, int availableStretch, int difference, int fitness)
demerits
- the total demerits of the new optimal set of breakpointsnode
- the node starting the line ending at the current elementadjust
- adjustment ratio of the current lineavailableShrink
- how much the current line can be shrinkedavailableStretch
- how much the current line can be stretcheddifference
- difference between the width of the considered line and the
width of the "real" linefitness
- fitness class of the current linepublic boolean hasRecords()
public boolean notInfiniteDemerits(int fitness)
fitness
- fitness class (0, 1, 2 or 3, i.e. "tight" to "very loose")
public double getDemerits(int fitness)
fitness
- to use
public BreakingAlgorithm.KnuthNode getNode(int fitness)
fitness
- to use
public double getAdjust(int fitness)
fitness
- to use
public int getAvailableShrink(int fitness)
fitness
- to use
public int getAvailableStretch(int fitness)
fitness
- to use
public int getDifference(int fitness)
fitness
- to use
public double getMinDemerits()
public void reset()
|
fop 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |