if (tblAvailable.getSelectedRow() < 0) {
return;
}
Book book = myAvailableModel.getBook(tblAvailable.getSelectedRow());
// Check if already installed
if (Books.installed().getBook(book.getInitials()) != null) {
JOptionPane.showMessageDialog(this, book.getName() + " " + java.util.ResourceBundle.getBundle("datasoul/internationalize").getString("IS ALREADY INSTALLED."));
return;
}
if (JOptionPane.showConfirmDialog(this, java.util.ResourceBundle.getBundle("datasoul/internationalize").getString("ARE YOU SURE TO DOWNLOAD AND INSTALL") + " " + book.getName() + " ?", java.util.ResourceBundle.getBundle("datasoul/internationalize").getString("CONFIRM DOWNLOAD AND INSTALL"), JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
try {
ProgressDialog pd = new ProgressDialog(this, true);
pd.setText(java.util.ResourceBundle.getBundle("datasoul/internationalize").getString("DOWNLOADING..."));
pd.isBibleDownload(true);
pd.setLocationRelativeTo(this);
WindowPropConfig.getInstance().setSelectedBible(book.getName());
Installer installer = imanager.getInstaller(cbSource.getSelectedItem().toString());
installer.install(book);
pd.setVisible(true);