SelectionBoundary
class SelectionBoundary : Parcelable
kotlin.Any | |
↳ | android.graphics.pdf.models.selection.SelectionBoundary |
Represents one edge of the selected content.
Summary
Inherited constants | |
---|---|
Public constructors | |
---|---|
SelectionBoundary(index: Int) Create a new instance of |
|
SelectionBoundary(point: Point) Create a new instance of |
Public methods | |
---|---|
Int | |
Int |
getIndex() Gets the index of the text as determined by the text stream processed. |
Boolean |
getIsRtl() Gets whether the direction of selection is right-to-left (rtl) or reverse. |
Point? |
getPoint() Gets the x, y coordinates of the selection boundary in points (1/72"). |
Unit |
writeToParcel(dest: Parcel, flags: Int) Flatten this object in to a Parcel. |
Properties | |
---|---|
static Parcelable.Creator<SelectionBoundary!> |
Public constructors
SelectionBoundary
SelectionBoundary(index: Int)
Create a new instance of SelectionBoundary
if index of boundary is known. The text returned by PdfPageTextContent#getText()
form a "stream" and inside this "stream" each character has an index. Note: Point defaults to null
in this case.
Parameters | |
---|---|
index |
Int: index of the selection boundary. |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
If the index is negative. |
SelectionBoundary
SelectionBoundary(point: Point)
Create a new instance of SelectionBoundary
if the boundary Point
is known. Index defaults to -1.
Parameters | |
---|---|
point |
Point: The point of selection boundary. This value cannot be null . |
Exceptions | |
---|---|
java.lang.NullPointerException |
If the point is null. |
Public methods
describeContents
fun describeContents(): Int
Return | |
---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
getIndex
fun getIndex(): Int
Gets the index of the text as determined by the text stream processed. If the value is -1 then the getPoint()
will determine the selection boundary.
Return | |
---|---|
Int |
index of the selection boundary. |
getIsRtl
fun getIsRtl(): Boolean
Gets whether the direction of selection is right-to-left (rtl) or reverse. The value of isRtl is determined by the underlying native layer using the start and stop boundaries.
Return | |
---|---|
Boolean |
The direction of selection |
getPoint
fun getPoint(): Point?
Gets the x, y coordinates of the selection boundary in points (1/72"). These coordinates are represented by a Point
. If the value is null
then the getIndex()
will determine the selection boundary.
Note: Point (0,0) represents the top-left corner of the page
Return | |
---|---|
Point? |
The point of the selection boundary. |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
Parameters | |
---|---|
dest |
Parcel: This value cannot be null . |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE . Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |
Properties
CREATOR
static val CREATOR: Parcelable.Creator<SelectionBoundary!>