}
return model;
}
private KongaList createListImpl(ListModel model) {
KongaListFactory f = new DefaultKongaListFactory() {
@Override
protected JList createEmptyList() {
JList list = (listFactory != null) ? listFactory.newList() : super.createEmptyList();
list.setFocusable(false);
list.setFocusTraversalKeysEnabled(false);
return list;
}
};
f.setCellRenderer(new DefaultListDecorRenderer());
f.setVisibleRowCount(Math.min(20, model.getSize() + 2));
setPrototypeCellValue(f, model);
KongaList list = f.newList(model);
list.setTransient(isTransient);
list.setDefaultAction(selectionAction);
list.setSelectionMode(ListSelectionMode.SINGLE_SELECTION);
list.addSelectionListener(new SelectedTokenListener());
return list;