{
@Override
public Component getListCellRendererComponent ( final JList list, final Object value, final int index, final boolean isSelected,
final boolean cellHasFocus )
{
final WebListElement element =
( WebListElement ) super.getListCellRendererComponent ( list, value, index, isSelected, cellHasFocus );
final File child = ( File ) value;
element.setIcon ( FileUtils.getFileIcon ( child ) );
final String fileName = FileUtils.getDisplayFileName ( child );
element.setText ( FileUtils.getShortFileName ( fileName, listFileNameLength ) );
return element;
}
} );