switch (indeces.length) {
case 0:
return null;
case 1:
String name = (String) list.getModel().getElementAt(indeces[0]);
DataElementTemplate de = new DefaultDataElementTemplate(name);
return new DeTemplateTransferable(de);
default:
String s = StringUtils.join(ListUtils.toArray(
list.getModel(), indeces), System.getProperty("line.separator"));
return new StringSelection(s);