getParentComponent(), getWikipedia(), comboPagename));
buttonFullAnalysis.addActionListener(new ActionFullAnalysis(
getParentComponent(), getWikipedia(), comboPagename));
// Login
LoginWorker loginWorker = new LoginWorker(
getWikipedia(), this, comboPagename,
(EnumLanguage) comboLanguage.getSelectedItem(),
comboUser.getSelectedItem().toString(),
textPassword.getPassword(),
radSavePassword.isSelected() ?
ConfigurationConstants.VALUE_SAVE_USER_BOTH :
radSaveUsername.isSelected() ?
ConfigurationConstants.VALUE_SAVE_USER_NAME :
ConfigurationConstants.VALUE_SAVE_USER_NONE,
login, false);
loginWorker.setListener(new BasicWorkerListener() {
/**
* Called just at the beginning of the start() method in BasicWorker.
*
* @param worker Current worker.
*/
public void beforeStart(BasicWorker worker) {
// Nothing to do
}
/**
* Called just at the end of the start() method in BasicWorker.
*
* @param worker Current worker.
*/
public void afterStart(BasicWorker worker) {
// Nothing to do
}
/**
* Called just at the beginning of the finished() method in BasicWorker.
*
* @param worker Current worker.
*/
public void beforeFinished(BasicWorker worker) {
if (worker instanceof LoginWorker) {
logged = ((LoginWorker) worker).isLogged();
if (logged) {
userLogged = login;
}
}
}
/**
* Called just at the end of the finished() method in BasicWorker.
*
* @param worker Current worker.
* @param ok Flag indicating if the worker finished OK.
*/
public void afterFinished(BasicWorker worker, boolean ok) {
// Nothing to do
}
});
loginWorker.start();
}