PDF Clown
0.0.8

it.stefanochizzolini.clown.documents.contents.composition
Class BlockFilter

java.lang.Object
  extended by it.stefanochizzolini.clown.documents.contents.composition.BlockFilter

public final class BlockFilter
extends Object

Content block filter.

It provides content positioning functionalities for page typesetting.

Since:
0.0.3
Version:
0.0.8
Author:
Stefano Chizzolini (http://www.stefanochizzolini.it)

Constructor Summary
BlockFilter(PrimitiveFilter context)
           
 
Method Summary
 void begin(Rectangle2D frame, AlignmentXEnum alignmentX, AlignmentYEnum alignmentY)
          Begins a content block.
 void end()
          Ends the content block.
 Rectangle2D getBoundBox()
          Gets the actual area occupied by the block contents.
 PrimitiveFilter getContext()
          Gets the context of the block filter.
 Rectangle2D getFrame()
          Gets the available area where to render the block contents inside.
 ContentScanner getScanner()
          Gets the content scanner.
 boolean isHyphenation()
          Gets whether the hyphenation algorithm has to be applied.
 void setHyphenation(boolean value)
          Sets whether the hyphenation algorithm has to be applied.
 void showBreak()
          Ends current paragraph.
 void showBreak(AlignmentXEnum alignmentX)
          Ends current paragraph, specifying the alignment of the next one.
 void showBreak(Dimension2D offset)
          Ends current paragraph, specifying the offset of the next one.
 void showBreak(Dimension2D offset, AlignmentXEnum alignmentX)
          Ends current paragraph, specifying the offset and alignment of the next one.
 int showText(String text)
          Shows text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockFilter

public BlockFilter(PrimitiveFilter context)
Method Detail

begin

public void begin(Rectangle2D frame,
                  AlignmentXEnum alignmentX,
                  AlignmentYEnum alignmentY)
Begins a content block.

Parameters:
frame - Block boundaries.
alignmentX - Horizontal alignment.
alignmentY - Vertical alignment.

end

public void end()
Ends the content block.


getBoundBox

public Rectangle2D getBoundBox()
Gets the actual area occupied by the block contents.


getScanner

public ContentScanner getScanner()
Gets the content scanner.


getContext

public PrimitiveFilter getContext()
Gets the context of the block filter.


getFrame

public Rectangle2D getFrame()
Gets the available area where to render the block contents inside.


isHyphenation

public boolean isHyphenation()
Gets whether the hyphenation algorithm has to be applied.


setHyphenation

public void setHyphenation(boolean value)
Sets whether the hyphenation algorithm has to be applied.


showBreak

public void showBreak()
Ends current paragraph.


showBreak

public void showBreak(Dimension2D offset)
Ends current paragraph, specifying the offset of the next one.

Remarks

This functionality allows higher-level features such as paragraph indentation and margin.

Parameters:
offset - Relative location of the next paragraph.

showBreak

public void showBreak(AlignmentXEnum alignmentX)
Ends current paragraph, specifying the alignment of the next one.

Remarks

This functionality allows higher-level features such as paragraph indentation and margin.

Parameters:
alignmentX - Horizontal alignment.

showBreak

public void showBreak(Dimension2D offset,
                      AlignmentXEnum alignmentX)
Ends current paragraph, specifying the offset and alignment of the next one.

Remarks

This functionality allows higher-level features such as paragraph indentation and margin.

Parameters:
offset - Relative location of the next paragraph.
alignmentX - Horizontal alignment.

showText

public int showText(String text)
Shows text.

Returns:
Last shown character index.

PDF Clown
0.0.8

Project home page

Copyright © 2006-2010 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.