// $Id$
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
private Button button;
private ConversationHolder conversation;
-
- /**
- * @param formFactory
- * @param formElement
- */
+
public EditPasswordElement(CdmFormFactory formFactory,
ICdmFormElement formElement, String labelString, User user, ConversationHolder conversation) {
super(formFactory, formElement);
-
+
this.conversation = conversation;
this.user = user;
-
+
Label label = formFactory.createLabel(getLayoutComposite(), null);
addControl(label);
-
+
String buttonLabelString = (labelString != null) ? labelString : "Change Password";
-
+
button = formFactory.createButton(getLayoutComposite(), buttonLabelString, SWT.PUSH);
button.setLayoutData(LayoutConstants.RIGHT());
addControl(button);
-
+
button.addSelectionListener(this);
}
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetSelected(SelectionEvent e) {
if(!CdmStore.getService(IUserService.class).userExists(user.getUsername())) {
MessagingUtils.warningDialog("Username does not exist", this, "Please create or save user '" + user.getUsername() + "' before changing password");
} else {
PasswordWizard wizard = new PasswordWizard(user, conversation);
- WizardDialog dialog = new WizardDialog(getLayoutComposite().getShell(), wizard);
+ WizardDialog dialog = new WizardDialog(getLayoutComposite().getShell(), wizard);
dialog.open();
}
}
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetDefaultSelected(SelectionEvent e) {}
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostDataChangeObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap)
- */
@Override
public void update(CdmDataChangeMap arg0) {}
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
- */
@Override
public ConversationHolder getConversationHolder() {
return conversation;