Package g4p_controls.StyledString

Examples of g4p_controls.StyledString.TextLayoutInfo


  protected void keyTypedProcess(int keyCode, char keyChar, boolean shiftDown, boolean ctrlDown){ }


  // Only executed if text has changed
  protected void changeText(){
    TextLayoutInfo tli;
    TextHitInfo thi = null, thiRight = null;

    pos += adjust;
    // Force layouts to be updated
    stext.getLines(buffer.g2);
View Full Code Here


  }

  protected boolean moveCaretUp(TextLayoutHitInfo currPos){
    if(currPos.tli.lineNo == 0)
      return false;
    TextLayoutInfo ntli = stext.getTLIforLineNo(currPos.tli.lineNo - 1)
    TextHitInfo nthi = ntli.layout.hitTestChar(caretX, 0);
    currPos.tli = ntli;
    currPos.thi = nthi;
    return true;
  }
View Full Code Here

  }

  protected boolean moveCaretDown(TextLayoutHitInfo currPos){
    if(currPos.tli.lineNo == stext.getNbrLines() - 1)
      return false;
    TextLayoutInfo ntli = stext.getTLIforLineNo(currPos.tli.lineNo + 1)
    TextHitInfo nthi = ntli.layout.hitTestChar(caretX, 0);
    currPos.tli = ntli;
    currPos.thi = nthi;
    return true;
  }
View Full Code Here

  /**
   * Move caret left by one character. If necessary move to the end of the line above
   * @return true if caret was moved else false
   */
  protected boolean moveCaretLeft(TextLayoutHitInfo currPos){
    TextLayoutInfo ntli;
    TextHitInfo nthi = currPos.tli.layout.getNextLeftHit(currPos.thi);
    if(nthi == null){
      // Move the caret to the end of the previous line
      if(currPos.tli.lineNo == 0)
        // Can't goto previous line because this is the first line
View Full Code Here

  /**
   * Move caret right by one character. If necessary move to the start of the next line
   * @return true if caret was moved else false
   */
  protected boolean moveCaretRight(TextLayoutHitInfo currPos){
    TextLayoutInfo ntli;
    TextHitInfo nthi = currPos.tli.layout.getNextRightHit(currPos.thi);
    if(nthi == null){
      // Move the caret to the start of the next line the previous line
      if(currPos.tli.lineNo >= stext.getNbrLines() - 1)
        // Can't goto next line because this is the last line
View Full Code Here

TOP

Related Classes of g4p_controls.StyledString.TextLayoutInfo

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.