iText 8.0.4 API
iText.Layout.Properties.ParagraphOrphansControl Class Reference

A specialized class holding configurable parameters related to iText.Layout.Element.Paragraph 's orphans restrictions. More...

Public Member Functions

  ParagraphOrphansControl (int minOrphans)
  Creates a ParagraphOrphansControl instance with a specified orphans limitation. More...
 
virtual iText.Layout.Properties.ParagraphOrphansControl  SetMinAllowedOrphans (int minOrphans)
  Sets parameter that defines orphans restrictions. More...
 
virtual int  GetMinOrphans ()
  Gets minimal number of paragraph's lines to remain on an area before a split. More...
 
virtual void  HandleViolatedOrphans (ParagraphRenderer renderer, String message)
  Writes a log message reporting that orphans constraint is violated. More...
 

Detailed Description

A specialized class holding configurable parameters related to iText.Layout.Element.Paragraph 's orphans restrictions.

A specialized class holding configurable parameters related to iText.Layout.Element.Paragraph 's orphans restrictions. This class is meant to be used as the value for the Property.ORPHANS_CONTROL key.

Constructor & Destructor Documentation

◆ ParagraphOrphansControl()

iText.Layout.Properties.ParagraphOrphansControl.ParagraphOrphansControl ( int  minOrphans )
inline

Creates a ParagraphOrphansControl instance with a specified orphans limitation.

Parameters
minOrphans minimal number of paragraph's lines to remain on an area before an area break.

Member Function Documentation

◆ GetMinOrphans()

virtual int iText.Layout.Properties.ParagraphOrphansControl.GetMinOrphans ( )
inlinevirtual

Gets minimal number of paragraph's lines to remain on an area before a split.

Returns
minimal number of paragraph's lines to remain on an area before an area break.

◆ HandleViolatedOrphans()

virtual void iText.Layout.Properties.ParagraphOrphansControl.HandleViolatedOrphans ( ParagraphRenderer  renderer,
String  message 
)
inlinevirtual

Writes a log message reporting that orphans constraint is violated.

Writes a log message reporting that orphans constraint is violated. This method is to be overridden if violation scenarios need to be handled in some other way.

Parameters
renderer a renderer processing orphans
message

System.String explaining the reason for violation

◆ SetMinAllowedOrphans()

virtual iText.Layout.Properties.ParagraphOrphansControl iText.Layout.Properties.ParagraphOrphansControl.SetMinAllowedOrphans ( int  minOrphans )
inlinevirtual

Sets parameter that defines orphans restrictions.

Parameters
minOrphans minimal number of paragraph's lines to remain on an area before an area break.
Returns
this ParagraphOrphansControl instance