Project

General

Profile

Download (3.15 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2016 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.taxeditor.databaseAdmin.wizard;
10

    
11
import org.eclipse.jface.wizard.WizardPage;
12
import org.eclipse.swt.SWT;
13
import org.eclipse.swt.events.SelectionAdapter;
14
import org.eclipse.swt.events.SelectionEvent;
15
import org.eclipse.swt.layout.GridLayout;
16
import org.eclipse.swt.widgets.Button;
17
import org.eclipse.swt.widgets.Composite;
18

    
19
import eu.etaxonomy.cdm.io.operation.config.SortIndexUpdaterConfigurator;
20
import eu.etaxonomy.taxeditor.l10n.Messages;
21

    
22
/**
23
 * @author k.luther
24
 * @date 06.12.2016
25
 *
26
 */
27
public class DatabaseRepairSortIndexPage extends WizardPage {
28

    
29
    SortIndexUpdaterConfigurator config = null;
30
    /**
31
     * @param pageName
32
     */
33
    protected DatabaseRepairSortIndexPage(String pageName, SortIndexUpdaterConfigurator config){
34
        super(pageName);
35
        this.config = config;
36
        setMessage(Messages.DatabaseRepairPage_chooseParameter);
37
    }
38

    
39

    
40

    
41

    
42

    
43

    
44

    
45

    
46
    /**
47
     * {@inheritDoc}
48
     */
49
    @Override
50
    public void createControl(Composite parent) {
51
        final Composite composite = new Composite(parent, SWT.NULL);
52

    
53
        GridLayout gridLayout = new GridLayout();
54
        composite.setLayout(gridLayout);
55

    
56
        Button checkBoxTaxonNode = new Button(composite, SWT.CHECK);
57
        checkBoxTaxonNode.setSelection(config.isDoTaxonNode());
58
        checkBoxTaxonNode.setText(Messages.DatabaseRepairPage_updateTaxonNodes);
59
        checkBoxTaxonNode
60
                .setToolTipText(Messages.DatabaseRepairPage_toolTip_taxonNode);
61
        checkBoxTaxonNode.addSelectionListener(new SelectionAdapter() {
62
            @Override
63
            public void widgetSelected(SelectionEvent e) {
64
                config.setDoTaxonNode(!config.isDoTaxonNode());
65
            }
66
        });
67

    
68
        Button checkBoxPolytomousKeyNode = new Button(composite, SWT.CHECK);
69
        checkBoxPolytomousKeyNode.setSelection(config.isDoPolytomousKeyNode());
70
        checkBoxPolytomousKeyNode.setText(Messages.DatabaseRepairPage_PolytomousKeyNode);
71
        checkBoxPolytomousKeyNode
72
        .setToolTipText(Messages.DatabaseRepairPage_toolTip_polytomousKeyNode);
73
        checkBoxPolytomousKeyNode.addSelectionListener(new SelectionAdapter() {
74
            @Override
75
            public void widgetSelected(SelectionEvent e) {
76
                config.setDoPolytomousKeyNode(!config.isDoPolytomousKeyNode());
77
            }
78
        });
79

    
80
        Button checkBoxFeatureNode = new Button(composite, SWT.CHECK);
81
        checkBoxFeatureNode.setSelection(config.isDoFeatureNode());
82
        checkBoxFeatureNode.setText(Messages.DatabaseRepairPage_featureNodes);
83
        checkBoxFeatureNode
84
        .setToolTipText(Messages.DatabaseRepairPage_toolTipFeatureNodes);
85
        checkBoxFeatureNode.addSelectionListener(new SelectionAdapter() {
86
            @Override
87
            public void widgetSelected(SelectionEvent e) {
88
                config.setDoFeatureNode(!config.isDoFeatureNode());
89
            }
90
        });
91

    
92

    
93

    
94
        setControl(composite);
95

    
96
    }
97

    
98

    
99

    
100
}
(4-4/11)