initializeToolkit();
initialize();
restoreLayout();
PropertyChangeListener disconnector = new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
if (connection != null) {
try {
connection.quit();
}
catch (Exception e) {
logger.debug("Error closing connection", e);
}
connection = null;
}
}
};
Settings.HOSTNAME.addPropertyChangeListener(disconnector);
Settings.PORT.addPropertyChangeListener(disconnector);
Settings.USE_PASSIVE.addPropertyChangeListener(disconnector);
Settings.USERNAME.addPropertyChangeListener(disconnector);
Settings.LOCALE.addPropertyChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
updateResourceBundle();
}
});