// double click is same as cliking the OK button.
XRegistryLoaderWindow.this.okButton.doClick();
}
}
});
DefaultListCellRenderer renderer = new DefaultListCellRenderer() {
/**
* @see javax.swing.DefaultListCellRenderer#getListCellRendererComponent(javax.swing.JList,
* java.lang.Object, int, boolean, boolean)
*/
@Override
public Component getListCellRendererComponent(JList jList,
Object value, int index, boolean isSelected,
boolean cellHasFocus) {
DefaultListCellRenderer listCellRendererComponent = (DefaultListCellRenderer) super
.getListCellRendererComponent(jList, value, index,
isSelected, cellHasFocus);
if (value instanceof XRSearchResult) {
QName qname = ((XRSearchResult) value).getQname();
listCellRendererComponent.setText(qname.getNamespaceURI()+": "+qname.getLocalPart());
}
return listCellRendererComponent;
}
};