* (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 {
serverTypeBox.setSelectedItem(IMAPLabel);
folderBox.setText(mrs.getFolder());
}
serverBox.setText(mrs.getServer());
usernameBox.setText(mrs.getUserName());
passwordBox.setText(mrs.getPassword());
if (mrs.getNumMessages() == -1) {
allMessagesButton.setSelected(true);
someMessagesField.setText(Integer.toString(0));
} else {
someMessagesButton.setSelected(true);
someMessagesField.setText(Integer.toString(mrs.getNumMessages()));
}
deleteBox.setSelected(mrs.getDeleteMessages());
super.configure(element);
}