// Text fields panel
XAlignedComponentPanel compPanel = new XAlignedComponentPanel();
// Name field
nameField = new PrefTextField(MuConfigurations.getPreferences().getVariable(MuPreference.MAIL_SENDER_NAME, "")) {
public boolean hasChanged() {
return !nameField.getText().equals(MuConfigurations.getPreferences().getVariable(MuPreference.MAIL_SENDER_NAME, ""));
}
};
compPanel.addRow(Translator.get("prefs_dialog.mail_name"), nameField, 10);
// Email field
emailField = new PrefTextField(MuConfigurations.getPreferences().getVariable(MuPreference.MAIL_SENDER_ADDRESS, "")) {
public boolean hasChanged() {
return !emailField.getText().equals(MuConfigurations.getPreferences().getVariable(MuPreference.MAIL_SENDER_ADDRESS, ""));
}
};
compPanel.addRow(Translator.get("prefs_dialog.mail_address"), emailField, 10);
// SMTP field
smtpField = new PrefTextField(MuConfigurations.getPreferences().getVariable(MuPreference.SMTP_SERVER, "")) {
public boolean hasChanged() {
return !smtpField.getText().equals(MuConfigurations.getPreferences().getVariable(MuPreference.SMTP_SERVER, ""));
}
};
compPanel.addRow(Translator.get("prefs_dialog.mail_server"), smtpField, 10);
// SMTP port field
portField = new PrefTextField(""+MuConfigurations.getPreferences().getVariable(MuPreference.SMTP_PORT, MuPreferences.DEFAULT_SMTP_PORT)) {
public boolean hasChanged() {
return !portField.getText().equals(String.valueOf(MuConfigurations.getPreferences().getVariable(MuPreference.SMTP_PORT, MuPreferences.DEFAULT_SMTP_PORT)));
}
};
compPanel.addRow(Translator.get("server_connect_dialog.port"), portField, 10);