A specialized class holding configurable parameters related to iText.Layout.Element.Paragraph 's widows restrictions. More...
A specialized class holding configurable parameters related to iText.Layout.Element.Paragraph 's widows restrictions.
A specialized class holding configurable parameters related to iText.Layout.Element.Paragraph 's widows restrictions. This class is meant to be used as the value for the Property.WIDOWS_CONTROL key.
◆ ParagraphWidowsControl()
iText.Layout.Properties.ParagraphWidowsControl.ParagraphWidowsControl |
( |
int |
minWidows, |
|
|
int |
maxLinesToMove, |
|
|
bool |
overflowParagraphOnViolation |
|
) |
|
|
|
inline |
Creates a ParagraphWidowsControl instance with specified widows restrictions.
-
Parameters
-
minWidows |
minimal number of paragraph's lines to be overflowed to the next area. |
maxLinesToMove |
a number of lines that are allowed to be moved to the next area in order to fix widows constraint violation. |
overflowParagraphOnViolation |
defines whether the entire paragraph should be pushed to the next area if widows constraint is violated and cannot be automatically fixed. |
◆ GetMaxLinesToMove()
virtual int iText.Layout.Properties.ParagraphWidowsControl.GetMaxLinesToMove |
( |
|
) |
|
|
inlinevirtual |
Gets a number of lines that are allowed to be moved to the next area in order to fix widows constraint violation.
-
Returns
-
a number of lines that are allowed to be moved to the next are
◆ GetMinWidows()
virtual int iText.Layout.Properties.ParagraphWidowsControl.GetMinWidows |
( |
|
) |
|
|
inlinevirtual |
Gets minimal number of paragraph's lines to be overflowed to the next area.
-
Returns
-
minimal number of paragraph's lines to be overflowed to the next area
◆ HandleViolatedWidows()
virtual void iText.Layout.Properties.ParagraphWidowsControl.HandleViolatedWidows |
( |
ParagraphRenderer |
widowsRenderer, |
|
|
String |
message |
|
) |
|
|
|
inlinevirtual |
Writes a log message reporting that widows constraint is violated and cannot be automatically fixed.
Writes a log message reporting that widows constraint is violated and cannot be automatically fixed. This method is to be overridden if violation scenarios need to be handled in some other way.
-
Parameters
-
widowsRenderer |
a renderer processing widows |
message |
|
System.String explaining the reason for violation
◆ IsOverflowOnWidowsViolation()
virtual bool iText.Layout.Properties.ParagraphWidowsControl.IsOverflowOnWidowsViolation |
( |
|
) |
|
|
inlinevirtual |
Indicates whether paragraph should be completely pushed to the next area if widows constraint is violated and cannot be automatically fixed.
-
Returns
-
true if paragraph should be completely pushed to the next area if widows constraint is violated and cannot be automatically fixed, otherwise - false
◆ SetMinAllowedWidows()
Sets parameters that define widows restrictions and conditions of handling cases of widows constraint violation.
-
Parameters
-
minWidows |
minimal number of paragraph's lines to be overflowed to the next area. |
maxLinesToMove |
a number of lines that are allowed to be moved to the next area in order to fix widows constraint violation. |
overflowParagraphOnViolation |
defines whether paragraph should be completely pushed to the next area if widows constraint is violated and cannot be automatically fixed. |
-
Returns
-
this ParagraphWidowsControl instance.