def repaint graphic, r=@row,c=@col, row_index=-1,value=@text, focussed=false, selected=false

      select_colors focussed, selected 
      # if listboxes width is reduced, display_len remains the same
      # XXX FIXME parent may not be the list but a container like rfe !!
      # maybe caller should update at start of repain loop.
      #@display_length = @parent.width - 2 - @parent.left_margin

      value=value.to_s
      if !@display_length.nil?
        if value.length > @display_length
          value = value[0..@display_length-1]
        end
        # added 2010-09-27 11:05 TO UNCOMMENT AND TEST IT OUT
        if @justify == :center
          value = value.center(@display_length)
        end
      end
      len = @display_length || value.length
      #$log.debug " XXX @display_length: #{@display_length}, #{value.length}, L:#{len}, pw:#{@parent.width} ::attr:: #{@attr} "
      graphic.printstring r, c, @format % [len, value], @color_pair, @attr
    end
def repaint graphic, r=@row,c=@col, row_index=-1,value=@text, focussed=false, selected=false

      select_colors focussed, selected 
      # if listboxes width is reduced, display_len remains the same
      # XXX FIXME parent may not be the list but a container like rfe !!
      # maybe caller should update at start of repain loop.
      #@display_length = @parent.width - 2 - @parent.left_margin

      value=value.to_s
      if !@display_length.nil?
        if value.length > @display_length
          value = value[0..@display_length-1]
        end
        # added 2010-09-27 11:05 TO UNCOMMENT AND TEST IT OUT
        if @justify == :center
          value = value.center(@display_length)
        end
      end
      len = @display_length || value.length
      #$log.debug " XXX @display_length: #{@display_length}, #{value.length}, L:#{len}, pw:#{@parent.width} ::attr:: #{@attr} "
      graphic.printstring r, c, @format % [len, value], @color_pair, @attr
    end
paint a list box cell

  @param [Buffer] window or buffer object used for printing
  @param [Fixnum] row
  @param [Fixnum] column
  @param [Fixnum] actual index into data, some lists may have actual data elsewhere and
                  display data separate. e.g. rfe_renderer (directory listing)
  @param [String] text to print in cell
  @param [Boolean, cell focussed, not focussed
  @param [Boolean] cell selected or not