filePanel = createFilePanel();
addFilePanelListeners();
}
private void addFilePanelListeners() {
filePanel.addFileSelectionListener(new FileSelectionListener() {
@Override
public void selectionChanged(Collection<? extends File> selected) {
boolean selectionExists = (selected != null) && !selected.isEmpty();
container.setSelectionExists(XmlSampleRootSelector.this, selectionExists);