Packages  This Package  Prev  Next  Index  

§3.19 Interface TextAreaPeer

The text area peer interface specifies the methods that all implementations of Abstract Window Toolkit text areas must define.

public  interface  java.awt.peer.TextAreaPeer
    extends java.awt.peer.TextComponentPeer  (II-§3.20)
{
        // Methods
    public abstract void insertText(String  txt, int  pos);	§3.19.1
        public abstract Dimension 	§3.19.2
        minimumSize(int  rows, int  cols);
    public abstract Dimension	§3.19.3
        preferredSize(int  rows, int  cols);
    public abstract void replaceText(String  txt, int  start,	§3.19.4
              int  end);
}

Methods

insertText

public abstract void insertText(String txt, int pos)
Inserts the specified text at the specified position.
Parameters:
str - the text to insert
pos - the position at which to insert the text

minimumSize

public abstract Dimension minimumSize(int rows, int cols)
Returns:
the minimum dimensions needed for the text area.

preferredSize

public abstract Dimension preferredSize(int rows, int cols)
Returns:
the preferred dimensions needed for the text area.

replaceText

public abstract void
replaceText(String txt, int start, int end)
Replaces the text from the start (inclusive) index to the end (exclusive) index with the new text specified.
Parameters:
str - the replacement text
start - the start position
end - the end position
See Also:
insertText (II-§3.19.1).

Packages  This Package  Prev  Next  Index
Java API Document (HTML generated by dkramer on April 22, 1996)
Copyright © 1996 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to doug.kramer@sun.com