Package java.awt.peer

Examples of java.awt.peer.TextComponentPeer


   *
   * @return The caret position in the text.
   */
  public synchronized int getCaretPosition()
  {
    TextComponentPeer tcp = (TextComponentPeer) getPeer();
    if (tcp != null)
      return(tcp.getCaretPosition());
    else
      return(0);
  }
View Full Code Here


  public synchronized void setCaretPosition(int caretPosition)
  {
    if (caretPosition < 0)
      throw new IllegalArgumentException();
 
    TextComponentPeer tcp = (TextComponentPeer) getPeer();
    if (tcp != null)
      tcp.setCaretPosition(caretPosition);
  }
View Full Code Here

   */
  public synchronized void setEditable(boolean editable)
  {
    this.editable = editable;

    TextComponentPeer tcp = (TextComponentPeer) getPeer();
    if (tcp != null)
      tcp.setEditable(editable);
  }
View Full Code Here

  // Provide AccessibleAWTTextComponent access to several peer functions that
  // aren't publicly exposed.  This is package-private to avoid an accessor
  // method.
  synchronized int getIndexAtPoint(Point p)
  {
    TextComponentPeer tcp = (TextComponentPeer) getPeer();
    if (tcp != null)
      return tcp.getIndexAtPoint(p.x, p.y);
    return -1;
  }
View Full Code Here

    return -1;
  }
 
  synchronized Rectangle getCharacterBounds(int i)
  {
    TextComponentPeer tcp = (TextComponentPeer) getPeer();
    if (tcp != null)
      return tcp.getCharacterBounds(i);
    return null;
  }
View Full Code Here

TOP

Related Classes of java.awt.peer.TextComponentPeer

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.