Updates the
TextMeasurer
after a single character has
been inserted
into the paragraph currently represented by this
TextMeasurer
. After this call, this
TextMeasurer
is equivalent to a new
TextMeasurer
created from the text; however, it will
usually be more efficient to update an existing
TextMeasurer
than to create a new one from scratch.
Parameters:
-
newParagraph - the text of the paragraph after performing
the insertion. Cannot be null.
-
insertPos - the position in the text where the character was
inserted. Must not be less than the start of
newParagraph
, and must be less than the end of
newParagraph
.
Throws:
-
IndexOutOfBoundsException - if
insertPos
is less
than the start of
newParagraph
or greater than
or equal to the end of
newParagraph
-
NullPointerException - if
newParagraph
is
null