public class ParagraphOrphansControl extends Object
Paragraph
's
orphans restrictions. This class is meant to be used as the value for the Property.ORPHANS_CONTROL
key.Constructor and Description |
---|
ParagraphOrphansControl(int minOrphans)
Creates a
ParagraphOrphansControl instance with a specified orphans limitation. |
Modifier and Type | Method and Description |
---|---|
int |
getMinOrphans()
Gets minimal number of paragraph's lines to remain on an area before a split.
|
void |
handleViolatedOrphans(ParagraphRenderer renderer,
String message)
Writes a log message reporting that orphans constraint is violated.
|
ParagraphOrphansControl |
setMinAllowedOrphans(int minOrphans)
Sets parameter that defines orphans restrictions.
|
public ParagraphOrphansControl(int minOrphans)
ParagraphOrphansControl
instance with a specified orphans limitation.minOrphans
- minimal number of paragraph's lines to remain on an area before an area break.public ParagraphOrphansControl setMinAllowedOrphans(int minOrphans)
minOrphans
- minimal number of paragraph's lines to remain on an area before an area break.ParagraphOrphansControl
instancepublic int getMinOrphans()
public void handleViolatedOrphans(ParagraphRenderer renderer, String message)
renderer
- a renderer processing orphansmessage
- String
explaining the reason for violationCopyright © 1998–2021 iText Group NV. All rights reserved.