Re: svn commit: r790142 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr: BreakingAlgorithm.java KnuthSequence.java PageBreakingAlgorithm.java inline/LineLayoutManager.java

View: New views
1 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: svn commit: r790142 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr: BreakingAlgorithm.java KnuthSequence.java PageBreakingAlgorithm.java inline/LineLayoutManager.java

by Andreas Delmelle-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 01 Jul 2009, at 14:36, adelmelle@... wrote:

> Author: adelmelle
> Date: Wed Jul  1 12:36:17 2009
> New Revision: 790142
>
> URL: http://svn.apache.org/viewvc?rev=790142&view=rev
> Log:
> Some cleanups and attempts at improving code-readability and -
> extensibility:

All of those open to interpretation, of course...

> * 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.

FWIW: I have also been playing with the idea of using a more general  
handleElementAt() pattern, with (almost) identical signatures, apart  
from the type of the first parameter...
Basic intention remains: following the step made by handleBox(), give  
subclasses the opportunity to extend the default behavior. For  
penalties, this will turn out handy/important to deal with column-keeps.

> * extracted blocks of code in BreakingAlgorithm.considerLegalBreak()  
> into protected methods: deactivateNode(), activateNode() and  
> forceNode()

I was not sure of the naming here, just took whatever seemed cool.  
registerNode() instead of activateNode() came to mind...



Regards,

Andreas Delmelle
mailto:andreas.delmelle.AT.telenet.be
jabber: mandreas@...
skype: adlm0608

---