layout.center(fileList);
}
private static KongaList createList(MatchingFileList files) {
KongaListFactory factory = ComponentFactories.newKongaListFactory();
KongaListModel model = new KongaListModel();
Collection<String> fileNames = files.getFileNames();
if (fileNames.isEmpty()) {
model.addElement(Strings.get("Connection.MatchingFiles.NoFiles"));
} else {
for (String name : fileNames) {
model.addElement(new FileItem(name));
}
}
return factory.newList(model);
}