class StringListCellRenderer implements ListCellRenderer<E> {

  @Override
  public Component getListCellRendererComponent(JList<? extends E> list,
                                                E value,
                                                int index,
                                                boolean isSelected,
                                                boolean cellHasFocus) {
    JLabel label = (JLabel) defaultRenderer.getListCellRendererComponent(list,
                                                                         value,
                                                                         index,
                                                                         isSelected,
                                                                         cellHasFocus);
    label.setText(representer.apply(value));
    return label;
  }

  public  StringListCellRenderer(Function<E, String> representer);

}