public void draw(final Graphics g,final int x,final int y,final int height){
  Preconditions.checkNotNull(g,"Error: Graphics context can't be null");
  if (isVisible()) {
    final Color oldColor=g.getColor();
    g.setColor(m_caretColor);
    g.drawLine(x,y,x,(y + height) - 1);
    g.setColor(oldColor);
  }
}

public void draw ( final Graphics g , final int x , final int y , final int height ) { Preconditions . checkNotNull ( g , "Error: Graphics context can't be null" ) ; if ( isVisible ( ) ) { final Color oldColor = g . getColor ( ) ; g . setColor ( m_caretColor ) ; g . drawLine ( x , y , x , ( y + height ) - 1 ) ; g . setColor ( oldColor ) ; } }
draws the caret on a given graphics surface .
