public class PositionWrapper extends Object
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.
Constructor and Description |
---|
PositionWrapper(TextPosition position)
Constructs a PositionWrapper around the specified TextPosition object.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public PositionWrapper(TextPosition position)
position
- the text positionpublic TextPosition getTextPosition()
public boolean isLineStart()
public void setLineStart()
public boolean isParagraphStart()
public void setParagraphStart()
public boolean isArticleStart()
public void setArticleStart()
public boolean isPageBreak()
public void setPageBreak()
public boolean isHangingIndent()
public void setHangingIndent()
Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.