Package java.awt.peer Previous
Previous
Java API
Java API
Index
Index
Next
Next

Interface TextAreaPeer

Methods

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  
{
        // Methods
    public abstract void insertText(String  txt, int  pos);	
        public abstract Dimension 	
        minimumSize(int  rows, int  cols);
    public abstract Dimension	
        preferredSize(int  rows, int  cols);
    public abstract void replaceText(String  txt, int  start,	
              int  end);
}


Methods


insertText

public abstract void insertText(String  txt, int  pos) 

Inserts the specified text at the specified position.

ParameterDescription
str the text to insert
pos the position at which to insert the text


minimumSize

public abstract Dimension minimumSize(int  rows, int  cols) 

Return Value:

Returns the minimum dimensions needed for the text area.


preferredSize

public abstract Dimension preferredSize(int  rows, int  cols) 

Return Value:

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.

ParameterDescription
str the replacement text
start the start position
end the end position

See Also: insertText .



Top© 1996 Sun Microsystems, Inc. All rights reserved.