protected int drawLabelText(AndroidGraphics underlying,int textDecoration,boolean rtl,boolean isTickerRunning,boolean endsWith3Points,CodenameOneTextPaint nativeFont,int txtW,int textSpaceW,int shiftText,String text,int x,int y,int fontHeight,Bitmap textCache){
  if ((!isTickerRunning) || rtl) {
    if (txtW > textSpaceW && textSpaceW > 0) {
      if (rtl) {
        if ((!isTickerRunning) && endsWith3Points) {
          String points="...";
          int pointsW=impl.stringWidth(nativeFont,points);
          drawString(underlying,nativeFont,points,shiftText + x,y,textDecoration,fontHeight,textCache);
          clipRect(pointsW + shiftText + x,y,textSpaceW - pointsW,fontHeight);
        }
        x=x - txtW + textSpaceW;
      }
 else       if (endsWith3Points) {
        String points="...";
        int index=1;
        int widest=impl.charWidth(nativeFont,'W');
        int pointsW=impl.stringWidth(nativeFont,points);
        while (fastCharWidthCheck(text,index,textSpaceW - pointsW,widest,nativeFont) && index < text.length()) {
          index++;
        }
        text=text.substring(0,Math.min(text.length(),Math.max(1,index - 1))) + points;
        txtW=impl.stringWidth(nativeFont,text);
      }
    }
  }
  drawString(underlying,nativeFont,text,shiftText + x,y,textDecoration,fontHeight,textCache);
  return Math.min(txtW,textSpaceW);
}

protected int drawLabelText ( AndroidGraphics underlying , int textDecoration , boolean rtl , boolean isTickerRunning , boolean endsWith3Points , CodenameOneTextPaint nativeFont , int txtW , int textSpaceW , int shiftText , String text , int x , int y , int fontHeight , Bitmap textCache ) { if ( ( ! isTickerRunning ) || rtl ) { if ( txtW > textSpaceW && textSpaceW > 0 ) { if ( rtl ) { if ( ( ! isTickerRunning ) && endsWith3Points ) { String points = "..." ; int pointsW = impl . stringWidth ( nativeFont , points ) ; drawString ( underlying , nativeFont , points , shiftText + x , y , textDecoration , fontHeight , textCache ) ; clipRect ( pointsW + shiftText + x , y , textSpaceW - pointsW , fontHeight ) ; } x = x - txtW + textSpaceW ; } else if ( endsWith3Points ) { String points = "..." ; int index = 1 ; int widest = impl . charWidth ( nativeFont , 'W' ) ; int pointsW = impl . stringWidth ( nativeFont , points ) ; while ( fastCharWidthCheck ( text , index , textSpaceW - pointsW , widest , nativeFont ) && index < text . length ( ) ) { index ++ ; } text = text . substring ( 0 , Math . min ( text . length ( ) , Math . max ( 1 , index - 1 ) ) ) + points ; txtW = impl . stringWidth ( nativeFont , text ) ; } } } drawString ( underlying , nativeFont , text , shiftText + x , y , textDecoration , fontHeight , textCache ) ; return Math . min ( txtW , textSpaceW ) ; }
draws the text of a label
