* (non-Javadoc) Copy the data from the test element to the GUI
*
* @see org.apache.jmeter.gui.JMeterGUIComponent#configure(org.apache.jmeter.testelement.TestElement)
*/
public void configure(TestElement element) {
MailReaderSampler mrs = (MailReaderSampler) element;
if (mrs.getServerType().equals(MailReaderSampler.TYPE_POP3)) {
serverTypeBox.setSelectedItem(POP3Label);
folderBox.setText(INBOX);
} else if (mrs.getServerType().equals(MailReaderSampler.TYPE_POP3S)) {
serverTypeBox.setSelectedItem(POP3SLabel);
folderBox.setText(INBOX);
} else if (mrs.getServerType().equals(MailReaderSampler.TYPE_IMAPS)) {
serverTypeBox.setSelectedItem(IMAPSLabel);
folderBox.setText(mrs.getFolder());
} else {
serverTypeBox.setSelectedItem(IMAPLabel);
folderBox.setText(mrs.getFolder());
}
serverBox.setText(mrs.getServer());
usernameBox.setText(mrs.getUserName());
passwordBox.setText(mrs.getPassword());
if (mrs.getNumMessages() == MailReaderSampler.ALL_MESSAGES) {
allMessagesButton.setSelected(true);
someMessagesField.setText("0"); // $NON-NLS-1$
} else {
someMessagesButton.setSelected(true);
someMessagesField.setText(mrs.getNumMessagesString());
}
deleteBox.setSelected(mrs.getDeleteMessages());
super.configure(element);
}