Project

General

Profile

« Previous | Next » 

Revision 3257fc1d

Added by Patrick Plitzner about 8 years ago

Add space between label and textfield for all wizards #5436

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameRelationshipWizardPage.java
12 12

  
13 13
import org.eclipse.jface.util.IPropertyChangeListener;
14 14
import org.eclipse.jface.util.PropertyChangeEvent;
15
import org.eclipse.jface.wizard.WizardPage;
16 15
import org.eclipse.swt.SWT;
17 16
import org.eclipse.swt.widgets.Composite;
18 17

  
......
20 19
import eu.etaxonomy.cdm.model.name.NameRelationship;
21 20
import eu.etaxonomy.cdm.model.name.NameRelationshipType;
22 21
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
22
import eu.etaxonomy.taxeditor.ui.AbstractEntityCollectionElementWizardPage;
23 23
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
24
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
25
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
26
import eu.etaxonomy.taxeditor.ui.element.RootElement;
27 24
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
28 25

  
29 26
/**
......
35 32
 * @created Jun 1, 2010
36 33
 * @version 1.0
37 34
 */
38
public class NameRelationshipWizardPage extends WizardPage implements
35
public class NameRelationshipWizardPage extends AbstractEntityCollectionElementWizardPage implements
39 36
		IPropertyChangeListener {
40 37

  
41
	private final CdmFormFactory formFactory;
42

  
43 38
	private EntitySelectionElement<TaxonNameBase> selection_relatedTo;
44 39

  
45 40
	private TermComboElement<NameRelationshipType> combo_relationshipType;
......
50 45

  
51 46
	private TaxonNameBase toName;
52 47

  
53
	private RootElement rootElement;
54

  
55 48
	/**
56 49
	 * <p>
57 50
	 * Constructor for NameRelationshipWizardPage.
......
83 76
	/** {@inheritDoc} */
84 77
	@Override
85 78
	public void createControl(Composite parent) {
86
		this.setPageComplete(false);
87

  
88
		Composite control = formFactory.createComposite(parent);
89

  
90
		control.setLayout(LayoutConstants.LAYOUT(2, false));
91

  
92
		rootElement = new RootElement(formFactory, control);
79
	    super.createControl(parent);
93 80

  
94 81
		combo_relationshipType = formFactory.createDefinedTermComboElement(TermType.NameRelationshipType,
95 82
						rootElement, "Name Relationship Type", null, SWT.NULL);
......
101 88
						"Related to", null, EntitySelectionElement.ALL,
102 89
						SWT.NULL);
103 90

  
104
		setControl(control);
105 91
	}
106 92

  
107 93
	/**
......
132 118
		setPageComplete(complete);
133 119
	}
134 120

  
135
	/** {@inheritDoc} */
136
	@Override
137
	public void dispose() {
138
		rootElement.removeElements();
139
		formFactory.removePropertyChangeListener(this);
140
		super.dispose();
141
	}
142 121
}

Also available in: Unified diff