static int drawComposedText(View view,AttributeSet attr,Graphics g,int x,int y,int p0,int p1) throws BadLocationException {
  Graphics2D g2d=(Graphics2D)g;
  AttributedString as=(AttributedString)attr.getAttribute(StyleConstants.ComposedTextAttribute);
  as.addAttribute(TextAttribute.FONT,g.getFont());
  if (p0 >= p1)   return x;
  AttributedCharacterIterator aci=as.getIterator(null,p0,p1);
  return x + (int)SwingUtilities2.drawString(getJComponent(view),g2d,aci,x,y);
}

static int drawComposedText ( View view , AttributeSet attr , Graphics g , int x , int y , int p0 , int p1 ) throws BadLocationException { Graphics2D g2d = ( Graphics2D ) g ; AttributedString as = ( AttributedString ) attr . getAttribute ( StyleConstants . ComposedTextAttribute ) ; as . addAttribute ( TextAttribute . FONT , g . getFont ( ) ) ; if ( p0 >= p1 ) return x ; AttributedCharacterIterator aci = as . getIterator ( null , p0 , p1 ) ; return x + ( int ) SwingUtilities2 . drawString ( getJComponent ( view ) , g2d , aci , x , y ) ; }
draws the given composed text passed from an input method .
