Provides a mapping, for a given region,
from the document model coordinate space
to the view coordinate space.
Provides a mapping, for a given region,
from the document model coordinate space
to the view coordinate space. The specified region is
created as a union of the first and last character positions.
Returns:
the bounding box which is a union of the region specified
by the first and last character positions
Parameters:
-
p0 - the position of the first character (>=0)
-
b0 - the bias of the first character position,
toward the previous character or the
next character represented by the offset, in case the
position is a boundary of two views;
b0
will have one
of these values:
-
Position.Bias.Forward
-
Position.Bias.Backward
-
p1 - the position of the last character (>=0)
-
b1 - the bias for the second character position, defined
one of the legal values shown above
-
a - the area of the view, which encompasses the requested region
Throws:
-
BadLocationException - if the given position does
not represent a valid location in the associated document
-
IllegalArgumentException - if
b0
or
b1
are not one of the
legal
Position.Bias
values listed above
See Also:
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])
,