org.apache.pdfbox.util
Class PositionWrapper

java.lang.Object
  extended by org.apache.pdfbox.util.PositionWrapper

public class PositionWrapper
extends Object

wrapper of TextPosition that adds flags to track status as linestart and paragraph start positions.

This is implemented as a wrapper since the TextPosition class doesn't provide complete access to its state fields to subclasses. Also, conceptually TextPosition is immutable while these flags need to be set post-creation so it makes sense to put these flags in this separate class.

Author:
m.martinez@ll.mit.edu

Constructor Summary
PositionWrapper(TextPosition position)
          constructs a PositionWrapper around the specified TextPosition object.
 
Method Summary
protected  TextPosition getTextPosition()
          returns the underlying TextPosition object
 boolean isArticleStart()
           
 boolean isHangingIndent()
           
 boolean isLineStart()
           
 boolean isPageBreak()
           
 boolean isParagraphStart()
           
 void setArticleStart()
          sets the isArticleStart() flag to true.
 void setHangingIndent()
          sets the isHangingIndent() flag to true
 void setLineStart()
          sets the isLineStart() flag to true
 void setPageBreak()
          sets the isPageBreak() flag to true
 void setParagraphStart()
          sets the isParagraphStart() flag to true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PositionWrapper

public PositionWrapper(TextPosition position)
constructs a PositionWrapper around the specified TextPosition object.

Parameters:
position -
Method Detail

getTextPosition

protected TextPosition getTextPosition()
returns the underlying TextPosition object

Returns:

isLineStart

public boolean isLineStart()

setLineStart

public void setLineStart()
sets the isLineStart() flag to true


isParagraphStart

public boolean isParagraphStart()

setParagraphStart

public void setParagraphStart()
sets the isParagraphStart() flag to true.


isArticleStart

public boolean isArticleStart()

setArticleStart

public void setArticleStart()
sets the isArticleStart() flag to true.


isPageBreak

public boolean isPageBreak()

setPageBreak

public void setPageBreak()
sets the isPageBreak() flag to true


isHangingIndent

public boolean isHangingIndent()

setHangingIndent

public void setHangingIndent()
sets the isHangingIndent() flag to true



Copyright © 2002-2012 Apache Software Foundation. All Rights Reserved.