共用方式為


Bidi Class

Definition

This class implements the Unicode Bidirectional Algorithm.

[Android.Runtime.Register("java/text/Bidi", DoNotGenerateAcw=true)]
public sealed class Bidi : Java.Lang.Object
[<Android.Runtime.Register("java/text/Bidi", DoNotGenerateAcw=true)>]
type Bidi = class
    inherit Object
Inheritance
Bidi
Attributes

Remarks

This class implements the Unicode Bidirectional Algorithm.

A Bidi object provides information on the bidirectional reordering of the text used to create it. This is required, for example, to properly display Arabic or Hebrew text. These languages are inherently mixed directional, as they order numbers from left-to-right while ordering most other text from right-to-left.

Once created, a Bidi object can be queried to see if the text it represents is all left-to-right or all right-to-left. Such objects are very lightweight and this text is relatively easy to process.

If there are multiple runs of text, information about the runs can be accessed by indexing to get the start, limit, and level of a run. The level represents both the direction and the 'nesting level' of a directional run. Odd levels are right-to-left, while even levels are left-to-right. So for example level 0 represents left-to-right text, while level 1 represents right-to-left text, and level 2 represents left-to-right text embedded in a right-to-left run.

Added in 1.4.

Java documentation for java.text.Bidi.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

Bidi(Char[], Int32, Byte[], Int32, Int32, Int32)

Create Bidi from the given text, embedding, and direction information.

Bidi(IAttributedCharacterIterator)

Create Bidi from the given paragraph of text.

Bidi(String, Int32)

Create Bidi from the given paragraph of text and base direction.

Fields

DirectionDefaultLeftToRight

Constant indicating that the base direction depends on the first strong directional character in the text according to the Unicode Bidirectional Algorithm.

DirectionDefaultRightToLeft

Constant indicating that the base direction depends on the first strong directional character in the text according to the Unicode Bidirectional Algorithm.

DirectionLeftToRight

Constant indicating base direction is left-to-right.

DirectionRightToLeft

Constant indicating base direction is right-to-left.

Properties

BaseLevel

Return the base level (0 if left-to-right, 1 if right-to-left).

Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
IsLeftToRight

Return true if the line is all left-to-right text and the base direction is left-to-right.

IsMixed

Return true if the line is not left-to-right or right-to-left.

IsRightToLeft

Return true if the line is all right-to-left text, and the base direction is right-to-left.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Length

Return the length of text in the line.

PeerReference (Inherited from Object)
RunCount

Return the number of level runs.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)

Methods

BaseIsLeftToRight()

Return true if the base direction is left-to-right.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
CreateLineBidi(Int32, Int32)

Create a Bidi object representing the bidi information on a line of text within the paragraph represented by the current Bidi.

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetLevelAt(Int32)

Return the resolved level of the character at offset.

GetRunLevel(Int32)

Return the level of the nth logical run in this line.

GetRunLimit(Int32)

Return the index of the character past the end of the nth logical run in this line, as an offset from the start of the line.

GetRunStart(Int32)

Return the index of the character at the start of the nth logical run in this line, as an offset from the start of the line.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
ReorderVisually(Byte[], Int32, Object[], Int32, Int32)

Reorder the objects in the array into visual order based on their levels.

RequiresBidi(Char[], Int32, Int32)

Return true if the specified text requires bidi analysis.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to