Package org.mt4j.components.visibleComponents.font

Examples of org.mt4j.components.visibleComponents.font.IFontCharacter


  protected float getMaxLineWidth(){
    float currentLineWidth = 2 * this.getInnerPaddingLeft() + caretWidth;
    float maxWidth = currentLineWidth;
   
    for (int i = 0; i < this.characterList.size(); i++) {
      IFontCharacter character = this.characterList.get(i);
     
      if (character.getUnicode().equals("\n")){
        if (currentLineWidth > maxWidth){
          maxWidth = currentLineWidth;
        }
        currentLineWidth = 2 * this.getInnerPaddingLeft() + caretWidth;
      }else{
        currentLineWidth += character.getHorizontalDist();
        if (currentLineWidth > maxWidth){
          maxWidth = currentLineWidth;
        }
      }
    }
View Full Code Here


   * @return the total lines height
   */
  protected float getTotalLinesHeight(){
    float height = fontHeight ;//
    for (int i = 0; i < this.characterList.size(); i++) {
      IFontCharacter character = this.characterList.get(i);
      if (character.getUnicode().equals("\n")){
        height += fontHeight;
      }
    }
    return height;
  }
View Full Code Here

   * @return the line count
   */
  public int getLineCount(){
    int count = 0;
    for (int i = 0; i < this.characterList.size(); i++) {
      IFontCharacter character = this.characterList.get(i);
      if (character.getUnicode().equals("\n")){
        count++;
      }
    }
    return count;
  }
View Full Code Here

TOP

Related Classes of org.mt4j.components.visibleComponents.font.IFontCharacter

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.