Udostępnij za pośrednictwem


TextAttribute Class

Definition

The TextAttribute class defines attribute keys and attribute values used for text rendering.

[Android.Runtime.Register("java/awt/font/TextAttribute", DoNotGenerateAcw=true)]
public sealed class TextAttribute : Java.Text.AttributedCharacterIteratorAttribute
[<Android.Runtime.Register("java/awt/font/TextAttribute", DoNotGenerateAcw=true)>]
type TextAttribute = class
    inherit AttributedCharacterIteratorAttribute
Inheritance
Attributes

Remarks

The TextAttribute class defines attribute keys and attribute values used for text rendering.

TextAttribute instances are used as attribute keys to identify attributes in classes handling text attributes. Other constants defined in this class can be used as attribute values.

For each text attribute, the documentation provides: <UL> <LI>the type of its value, <LI>the relevant predefined constants, if any <LI>the default effect if the attribute is absent <LI>the valid values if there are limitations <LI>a description of the effect. </UL>

<H3>Values</H3> <UL> <LI>The values of attributes must always be immutable. <LI>Where value limitations are given, any value outside of that set is reserved for future use; the value will be treated as the default. <LI>The value null is treated the same as the default value and results in the default behavior. <li>If the value is not of the proper type, the attribute will be ignored. <li>The identity of the value does not matter, only the actual value. For example, TextAttribute.WEIGHT_BOLD and new Float(2.0) indicate the same WEIGHT. <li>Attribute values of type Number (used for WEIGHT, WIDTH, POSTURE, SIZE, JUSTIFICATION, and TRACKING) can vary along their natural range and are not restricted to the predefined constants. Number.floatValue() is used to get the actual value from the Number. <li>The values for WEIGHT, WIDTH, and POSTURE are interpolated by the system, which can select the 'nearest available' font or use other techniques to approximate the user's request.

</UL>

Java documentation for java.awt.font.TextAttribute.

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.

Properties

Background

Attribute key for the paint used to render the background of the text.

BidiEmbedding

Attribute key for the embedding level of the text.

CharReplacement

Attribute key for a user-defined glyph to display in lieu of the font's standard glyph for a character.

Class

Returns the runtime class of this Object.

(Inherited from Object)
Family

Attribute key for the font name.

Font

Attribute key used to provide the font to use to render text.

Foreground

Attribute key for the paint used to render the text.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
InputMethodHighlight

Attribute key for input method highlight styles.

InputMethodUnderline

Attribute key for input method underlines.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Justification

Attribute key for the justification of a paragraph.

JustificationFull

Justify the line to the full requested width.

JustificationNone

Do not allow the line to be justified.

Kerning

Attribute key to request kerning.

KerningOn

Request standard kerning.

Ligatures

Attribute key for enabling optional ligatures.

LigaturesOn

Request standard optional ligatures.

Name

Returns the name of the attribute.

(Inherited from AttributedCharacterIteratorAttribute)
NumericShaping

Attribute key for converting ASCII decimal digits to other decimal ranges.

PeerReference (Inherited from Object)
Posture

Attribute key for the posture of a font.

PostureOblique

The standard italic posture.

PostureRegular

The standard posture, upright.

RunDirection

Attribute key for the run direction of the line.

RunDirectionLtr

Left-to-right run direction.

RunDirectionRtl

Right-to-left run direction.

Size

Attribute key for the font size.

Strikethrough

Attribute key for strikethrough.

StrikethroughOn

A single strikethrough.

Superscript

Attribute key for superscripting and subscripting.

SuperscriptSub

Standard subscript.

SuperscriptSuper

Standard superscript.

SwapColors

Attribute key for swapping foreground and background Paints.

SwapColorsOn

Swap foreground and background.

ThresholdClass

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

(Inherited from AttributedCharacterIteratorAttribute)
ThresholdType

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

(Inherited from AttributedCharacterIteratorAttribute)
Tracking

Attribute key to control tracking.

TrackingLoose

Perform loose tracking.

TrackingTight

Perform tight tracking.

Transform

Attribute key for the transform of a font.

Underline

Attribute key for underline.

UnderlineLowDashed

Single pixel dashed low underline.

UnderlineLowDotted

Single pixel dotted low underline.

UnderlineLowGray

Double pixel gray low underline.

UnderlineLowOnePixel

Single pixel solid low underline.

UnderlineLowTwoPixel

Double pixel solid low underline.

UnderlineOn

Standard underline.

Weight

Attribute key for the weight of a font.

WeightBold

The standard bold weight.

WeightDemibold

A moderately lighter weight than WEIGHT_BOLD.

WeightDemilight

An intermediate weight between WEIGHT_LIGHT and WEIGHT_STANDARD.

WeightExtrabold

An extra heavy weight.

WeightExtraLight

The lightest predefined weight.

WeightHeavy

A moderately heavier weight than WEIGHT_BOLD.

WeightLight

The standard light weight.

WeightMedium

An intermediate weight between WEIGHT_REGULAR and WEIGHT_BOLD.

WeightRegular

The standard weight.

WeightSemibold

A moderately heavier weight than WEIGHT_REGULAR.

WeightUltrabold

The heaviest predefined weight.

Width

Attribute key for the width of a font.

WidthCondensed

The most condensed predefined width.

WidthExtended

The most extended predefined width.

WidthRegular

The standard width.

WidthSemiCondensed

A moderately condensed width.

WidthSemiExtended

A moderately extended width.

Methods

Clone()

Creates and returns a copy of this object.

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

Compares two objects for equality.

(Inherited from AttributedCharacterIteratorAttribute)
GetHashCode()

Returns a hash code value for the object.

(Inherited from AttributedCharacterIteratorAttribute)
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)
ReadResolve()

Resolves instances being deserialized to the predefined constants.

(Inherited from AttributedCharacterIteratorAttribute)
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