Revision b50ab815
Added by Patrick Plitzner over 10 years ago
- converted Browse, Edit, Delete functionality of EntitySelection
- adapted layout of detail elements to fill up the horizontal space
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EditFromSelectionWizard.java | ||
---|---|---|
1 | 1 |
// $Id$ |
2 | 2 |
/** |
3 | 3 |
* Copyright (C) 2007 EDIT |
4 |
* European Distributed Institute of Taxonomy
|
|
4 |
* European Distributed Institute of Taxonomy |
|
5 | 5 |
* http://www.e-taxonomy.eu |
6 |
*
|
|
6 |
* |
|
7 | 7 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
8 | 8 |
* See LICENSE.TXT at the top of this package for the full license terms. |
9 | 9 |
*/ |
... | ... | |
35 | 35 |
import eu.etaxonomy.taxeditor.ui.section.agent.InstitutionWizardPage; |
36 | 36 |
import eu.etaxonomy.taxeditor.ui.section.agent.PersonWizardPage; |
37 | 37 |
import eu.etaxonomy.taxeditor.ui.section.agent.TeamWizardPage; |
38 |
import eu.etaxonomy.taxeditor.ui.section.campanula.compatibility.IEntitySelectionElement; |
|
38 | 39 |
import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameWizardPage; |
39 | 40 |
import eu.etaxonomy.taxeditor.ui.section.occurrence.CollectionWizardPage; |
40 | 41 |
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitBaseWizardPage; |
... | ... | |
48 | 49 |
* <p> |
49 | 50 |
* EditFromSelectionWizard class. |
50 | 51 |
* </p> |
51 |
*
|
|
52 |
* |
|
52 | 53 |
* @author n.hoffmann |
53 | 54 |
* @created Jun 1, 2010 |
54 | 55 |
* @version 1.0 |
... | ... | |
56 | 57 |
public class EditFromSelectionWizard extends Wizard implements |
57 | 58 |
SelectionListener { |
58 | 59 |
|
59 |
private final EntitySelectionElement selectionElement; |
|
60 |
private final IEntitySelectionElement selectionElement;
|
|
60 | 61 |
|
61 | 62 |
/** |
62 | 63 |
* <p> |
63 | 64 |
* Constructor for EditFromSelectionWizard. |
64 | 65 |
* </p> |
65 |
*
|
|
66 |
* |
|
66 | 67 |
* @param selectionElement |
67 | 68 |
* a |
68 | 69 |
* {@link eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement} |
69 | 70 |
* object. |
70 | 71 |
*/ |
71 |
public EditFromSelectionWizard(EntitySelectionElement selectionElement) { |
|
72 |
public EditFromSelectionWizard(IEntitySelectionElement selectionElement) {
|
|
72 | 73 |
this.selectionElement = selectionElement; |
73 | 74 |
this.setWindowTitle(String.format("Edit %s", TextHelper.deproxyClassName(selectionElement.getEntity().getClass()))); |
74 | 75 |
} |
... | ... | |
124 | 125 |
selectionElement.getConversationHolder(), |
125 | 126 |
(Institution) entity)); |
126 | 127 |
} else if (entity instanceof User) { |
127 |
addPage(new UserDetailWizardPage(formFactory,
|
|
128 |
selectionElement.getConversationHolder(),
|
|
128 |
addPage(new UserDetailWizardPage(formFactory, |
|
129 |
selectionElement.getConversationHolder(), |
|
129 | 130 |
(User) entity)); |
130 | 131 |
} else { |
131 | 132 |
StoreUtil.warningDialog("Missing interface", this, |
132 | 133 |
"No detail element for current selection"); |
133 |
}
|
|
134 |
} |
|
134 | 135 |
|
135 | 136 |
} |
136 | 137 |
|
137 | 138 |
/* |
138 | 139 |
* (non-Javadoc) |
139 |
*
|
|
140 |
* |
|
140 | 141 |
* @see org.eclipse.jface.wizard.Wizard#performFinish() |
141 | 142 |
*/ |
142 | 143 |
/** {@inheritDoc} */ |
Also available in: Unified diff