public class

StandardTextSource

extends TextSource
java.lang.Object
   ↳ sun.font.TextSource
     ↳ sun.font.StandardTextSource

Summary

[Expand]
Inherited Constants
From class sun.font.TextSource
Public Constructors
StandardTextSource(char[] chars, int start, int len, int cstart, int clen, int level, int flags, Font font, FontRenderContext frc, CoreMetrics cm)
Create a simple implementation of a TextSource.
StandardTextSource(char[] chars, int start, int len, int level, int flags, Font font, FontRenderContext frc, CoreMetrics cm)
Create a StandardTextSource whose context is coextensive with the source.
StandardTextSource(char[] chars, int level, int flags, Font font, FontRenderContext frc)
Create a StandardTextSource whose context and source are coextensive with the entire char array.
StandardTextSource(String str, int level, int flags, Font font, FontRenderContext frc)
Create a StandardTextSource whose context and source are all the text in the String.
Public Methods
int getBidiLevel()
Bidi level of all the characters in context.
char[] getChars()
Source character data.
int getContextLength()
Length of context data.
int getContextStart()
Start of context data in char array returned from getChars.
CoreMetrics getCoreMetrics()
Line metrics for source data.
FontRenderContext getFRC()
Font render context to use when measuring or rendering source data.
Font getFont()
Font for source data.
int getLayoutFlags()
Return the layout flags
int getLength()
Length of source data.
int getStart()
Start of source data in char array returned from getChars.
TextSource getSubSource(int start, int length, int dir)
Get subrange of this TextSource.
String toString(boolean withContext)
Get debugging info about this TextSource instance.
String toString()
Returns a string representation of the object.
[Expand]
Inherited Methods
From class sun.font.TextSource
From class java.lang.Object

Public Constructors

public StandardTextSource (char[] chars, int start, int len, int cstart, int clen, int level, int flags, Font font, FontRenderContext frc, CoreMetrics cm)

Create a simple implementation of a TextSource. Chars is an array containing clen chars in the context, in logical order, contiguously starting at cstart. Start and len represent that portion of the context representing the true source; start, like cstart, is relative to the start of the character array. Level is the bidi level (0-63 for the entire context. Flags is the layout flags. Font is the font, frc is the render context, and lm is the line metrics for the entire source text, but not necessarily the context.

public StandardTextSource (char[] chars, int start, int len, int level, int flags, Font font, FontRenderContext frc, CoreMetrics cm)

Create a StandardTextSource whose context is coextensive with the source.

public StandardTextSource (char[] chars, int level, int flags, Font font, FontRenderContext frc)

Create a StandardTextSource whose context and source are coextensive with the entire char array.

public StandardTextSource (String str, int level, int flags, Font font, FontRenderContext frc)

Create a StandardTextSource whose context and source are all the text in the String.

Public Methods

public int getBidiLevel ()

Bidi level of all the characters in context.

public char[] getChars ()

Source character data.

public int getContextLength ()

Length of context data.

public int getContextStart ()

Start of context data in char array returned from getChars.

public CoreMetrics getCoreMetrics ()

Line metrics for source data.

public FontRenderContext getFRC ()

Font render context to use when measuring or rendering source data.

public Font getFont ()

Font for source data.

public int getLayoutFlags ()

Return the layout flags

public int getLength ()

Length of source data.

public int getStart ()

Start of source data in char array returned from getChars.

public TextSource getSubSource (int start, int length, int dir)

Get subrange of this TextSource. dir is one of the TextLineComponent constants

public String toString (boolean withContext)

Get debugging info about this TextSource instance. Default implementation just returns toString. Subclasses should implement this to match the semantics of the toString constants.

public String toString ()

Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Returns
  • a string representation of the object.