
ther efor e, the position must be augmented with a bias value. This inner class defines
the two legal bias values: Position.Bias.Backward and Position.Bias.Forward.Anumber of
methods in the javax.swing .text package requir e one or the other of these constants as an
argument.
public static final class Position.Bias {
// No Constructor
// Public Constants
public static final Position.Bias Backward;
public static final Position.Bias Forward;
// Public Methods Overriding Object
public String toString();
}
Passed To: Too many methods to list.
Type Of: Position.Bias.{Backward, Forward}
Segment Ja va 1. 2
javax.swing .text
The Segment class repr esents a segment of text through three public fields. These are a
refer ence to a character array, the array offset of the first character in the array, and the
number of characters in the segment. This is an efficient way to pass refer ences to text
segments, since it does not requir e new String objects to be created. However, it is dan-
ger ous because it exposes the character array directly and makes it vulnerable to
changes. Users of a Segment object must treat the text segment as if it were immutable,
using it for read-only access to the text.
public class Segment {
// Public Constructors
public Segment();
public Segment(char[ ] array, int offset, int count);
// Public Methods Overriding Object
public String toString();
// Public Instance Fields
public char[ ] ar ray;
public ...