]> source.dussan.org Git - xmlgraphics-fop.git/commit
Some cleanups and attempts at improving code-readability and -extensibility:
authorAndreas L. Delmelle <adelmelle@apache.org>
Wed, 1 Jul 2009 12:36:17 +0000 (12:36 +0000)
committerAndreas L. Delmelle <adelmelle@apache.org>
Wed, 1 Jul 2009 12:36:17 +0000 (12:36 +0000)
commitc48ed5b0f4dd465e731b1b39541a365744e1b58a
treee156d7273e0a49b651a4bc70dabfbf8653d4217b
parentdb73a5d0a381d40c2b47eddb01a8cead2b06ddc1
Some cleanups and attempts at improving code-readability and -extensibility:
* added inner holder class to BreakingAlgorithm to contain everything related to the fitness classes. Improves readability of both the code and the trace messages.
* extracted blocks of code in BreakingAlgorithm.findBreakingPoints() into protected methods. Following the already existing handleBox(), added handleGlueAt() and handlePenaltyAt() to provide extension points to subclasses. Extraction of the code-blocks related to the node-recovery mechanism.
* extracted blocks of code in BreakingAlgorithm.considerLegalBreak() into protected methods: deactivateNode(), activateNode() and forceNode()
* factored the functionality to obtain the index of the first box into KnuthSequence... just seemed to make sense; may be useful elsewhere.
* some (but not all :() javadoc fixups
* minor changes to LineLayoutManager and PageBreakingAlgorithm to take into account above changes

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@790142 13f79535-47bb-0310-9956-ffa450edef68
src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java
src/java/org/apache/fop/layoutmgr/KnuthSequence.java
src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java