
protected java.awt.FontMetrics getFontMetrics();
}
Hierar chy: Object→ View(SwingConstants)→ PlainV iew(TabExpander)→ FieldV iew
Subc lasses: PasswordV iew
GapContent Ja va 1.2
javax.swing .text serializable
This class is an implementation of the AbstractDocument.Content inter face that uses an
array of characters with a gap of unused characters in it. This gap is positioned near the
curr ent insertion position so that subsequent insertions requir e fewer characters to be
shifted in the array. This implementation is more complicated than StringContent, but it
works efficiently with documents of any size. This is the default Content implementation
for all documents derived from AbstractDocument. This class inherits from a private super-
class, GapVector, which is not covered in this book because it is private.
public class GapContent extends GapVector implements AbstractDocument.Content, Serializable {
// Public Constructors
public GapContent();
public GapContent(int initialLength);
// Methods Implementing AbstractDocument.Content
public Position createPosition(int offset) throws BadLocationException;
public void getChars(int where, int len, Segment chars) throws BadLocationException;
public String getString(int where, int len) throws BadLocationException;
public javax.swing.undo.UndoableEdit inser tString(int where, String str) throws BadLocationException;
public int length();
public javax.swing.undo.UndoableEdit ...