Package java.awt.peer

Examples of java.awt.peer.TextAreaPeer


     * replaced by <code>getMinimumSize(int, int)</code>.
     */
    @Deprecated
    public Dimension minimumSize(int rows, int columns) {
        synchronized (getTreeLock()) {
            TextAreaPeer peer = (TextAreaPeer)this.peer;
            return (peer != null) ?
                       peer.getMinimumSize(rows, columns) :
                       super.minimumSize();
        }
    }
View Full Code Here


     * @deprecated As of JDK version 1.1,
     * replaced by <code>insert(String, int)</code>.
     */
    @Deprecated
    public synchronized void insertText(String str, int pos) {
        TextAreaPeer peer = (TextAreaPeer)this.peer;
        if (peer != null) {
            peer.insertText(str, pos);
        } else {
            text = text.substring(0, pos) + str + text.substring(pos);
        }
    }
View Full Code Here

     * @deprecated As of JDK version 1.1,
     * replaced by <code>replaceRange(String, int, int)</code>.
     */
    @Deprecated
    public synchronized void replaceText(String str, int start, int end) {
        TextAreaPeer peer = (TextAreaPeer)this.peer;
        if (peer != null) {
            peer.replaceText(str, start, end);
        } else {
            text = text.substring(0, start) + str + text.substring(end);
        }
    }
View Full Code Here

     * replaced by <code>getPreferredSize(int, int)</code>.
     */
    @Deprecated
    public Dimension preferredSize(int rows, int columns) {
        synchronized (getTreeLock()) {
            TextAreaPeer peer = (TextAreaPeer)this.peer;
            return (peer != null) ?
                       peer.preferredSize(rows, columns) :
                       super.preferredSize();
        }
    }
View Full Code Here

     * replaced by <code>getMinimumSize(int, int)</code>.
     */
    @Deprecated
    public Dimension minimumSize(int rows, int columns) {
        synchronized (getTreeLock()) {
            TextAreaPeer peer = (TextAreaPeer)this.peer;
            return (peer != null) ?
                       peer.minimumSize(rows, columns) :
                       super.minimumSize();
        }
    }
View Full Code Here

  public Dimension minimumSize (int rows, int columns)
  {
    if (isMinimumSizeSet())
      return new Dimension(minSize);
   
    TextAreaPeer peer = (TextAreaPeer) getPeer ();
    if (peer == null)
      return new Dimension (getWidth(), getHeight());

    return peer.getMinimumSize (rows, columns);
  }
View Full Code Here

  public Dimension preferredSize (int rows, int columns)
  {
    if (isPreferredSizeSet())
      return new Dimension(prefSize);
   
    TextAreaPeer peer = (TextAreaPeer) getPeer ();
    if (peer == null)
      return new Dimension (getWidth(), getHeight());

    return peer.getPreferredSize (rows, columns);
  }
View Full Code Here

   * @deprecated This method is deprecated in favor of
   * <code>append ()</code>.
   */
  public void appendText (String str)
  {
    TextAreaPeer peer = (TextAreaPeer) getPeer ();

    if (peer != null)
      peer.insert (str, peer.getText().length ());
    else
      setText(getText() + str);  
  }
View Full Code Here

  public void insertText (String str, int pos)
  {
    String tmp1 = null;
    String tmp2 = null;
   
    TextAreaPeer peer = (TextAreaPeer) getPeer ();

    if (peer != null)
      peer.insert (str, pos);
    else
      {
        tmp1 = getText().substring(0, pos);
        tmp2 = getText().substring(pos, getText().length());
        setText(tmp1 + str + tmp2);
View Full Code Here

  public void replaceText (String str, int start, int end)
  {
    String tmp1 = null;
    String tmp2 = null;

    TextAreaPeer peer = (TextAreaPeer) getPeer();

    if (peer != null)
      peer.replaceRange(str, start, end);
    else
      {
        tmp1 = getText().substring(0, start);
        tmp2 = getText().substring(end, getText().length());
        setText(tmp1 + str + tmp2);
View Full Code Here

TOP

Related Classes of java.awt.peer.TextAreaPeer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.