de.dante.extex.typesetter.paragraphBuilder
Class ParagraphShape

java.lang.Object
  extended byde.dante.extex.typesetter.paragraphBuilder.ParagraphShape
Direct Known Subclasses:
FixedParagraphShape, HangingParagraphShape

public class ParagraphShape
extends java.lang.Object

This class defines an arbitrary paragraph shape.

Version:
$Revision: 1.8 $
Author:
Gerd Neugebauer

Constructor Summary
ParagraphShape()
          Creates a new object.
 
Method Summary
 void add(Dimen left, Dimen right)
          Add another pair of points.
 FixedDimen getIndent(int index)
          Getter for the left hand margin of a certain position.
 FixedDimen getLength(int index)
          Getter for the right hand margin of a certain position.
 long getSize()
          Getter for the number of points.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParagraphShape

public ParagraphShape()
Creates a new object.

Method Detail

add

public void add(Dimen left,
                Dimen right)
Add another pair of points.

Parameters:
left - the left margin
right - the right margin

getIndent

public FixedDimen getIndent(int index)
Getter for the left hand margin of a certain position. The position is given by an index into the list. If the index points past the end of th list then the last entry is repeated. If the index is negative then 0pt is returned.

Parameters:
index - the index of the position
Returns:
the left hand margin

getLength

public FixedDimen getLength(int index)
Getter for the right hand margin of a certain position. The position is given by an index into the list. If the index points past the end of th list then the last entry is repeated. If the index is negative then 0pt is returned.

Parameters:
index - the index of the position
Returns:
the right hand margin

getSize

public long getSize()
Getter for the number of points.

Returns:
the number of points stored in this instance