Unified Typesetting API M1-20040817

de.inghuimische.uta.linebreaking
Class AbstractLinebreakAlgorithm

java.lang.Object
  extended byde.inghuimische.uta.linebreaking.AbstractLinebreakAlgorithm
All Implemented Interfaces:
LinebreakAlgorithm, QManageable
Direct Known Subclasses:
LineBasedBreakAlgorithm, ParagraphBasedBreakAlgorithm

public abstract class AbstractLinebreakAlgorithm
extends Object
implements LinebreakAlgorithm

An abstract linebreaker providing some utiltiy methods and a empty feature list.

Author:
Christian Ziesemer

Field Summary
protected  FeatureList features
          Subclasses should add their features to this list during constrution.
protected  int lineNumber
          Holds the actual line number, compare nextLineWidth().
protected  LineWidthModel lineWidthModel
          The line width model used.
 
Constructor Summary
AbstractLinebreakAlgorithm()
           
 
Method Summary
 FeatureList getFeatures()
          Returns a list of supported features.
 LineWidthModel getLineWidthModel()
          Returns the line width model used.
protected  double nextLineWidth()
          An utility method taking care of the line number.
 void setLineWidthModel(LineWidthModel aModel)
          Sets the line width model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.inghuimische.uta.linebreaking.LinebreakAlgorithm
consider, getBreakpoints
 

Field Detail

lineWidthModel

protected LineWidthModel lineWidthModel
The line width model used.


lineNumber

protected int lineNumber
Holds the actual line number, compare nextLineWidth().


features

protected FeatureList features
Subclasses should add their features to this list during constrution.

Constructor Detail

AbstractLinebreakAlgorithm

public AbstractLinebreakAlgorithm()
Method Detail

setLineWidthModel

public void setLineWidthModel(LineWidthModel aModel)
Description copied from interface: LinebreakAlgorithm
Sets the line width model. The model is used to allow varying line width.

Specified by:
setLineWidthModel in interface LinebreakAlgorithm
Parameters:
aModel - The model to use.

getLineWidthModel

public LineWidthModel getLineWidthModel()
Description copied from interface: LinebreakAlgorithm
Returns the line width model used.

Specified by:
getLineWidthModel in interface LinebreakAlgorithm
Returns:
The line width model used.

nextLineWidth

protected double nextLineWidth()
An utility method taking care of the line number.

Returns:
The width for the next line.

getFeatures

public FeatureList getFeatures()
Description copied from interface: LinebreakAlgorithm
Returns a list of supported features.

Specified by:
getFeatures in interface LinebreakAlgorithm
Returns:
A list of supported features.

Unified Typesetting API M1-20040817


An inghuimische.de project.
Copyright (C) 2004 Christian Ziesemer; See the Mozilla Public License for more details.