2 * Copyright (C) 2016 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
9 package eu
.etaxonomy
.taxeditor
.databaseAdmin
.wizard
;
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
;
19 import eu
.etaxonomy
.cdm
.io
.common
.SortIndexUpdaterConfigurator
;
20 import eu
.etaxonomy
.taxeditor
.Messages
;
27 public class DatabaseRepairSortIndexPage
extends WizardPage
{
29 SortIndexUpdaterConfigurator config
= null;
33 protected DatabaseRepairSortIndexPage(String pageName
, SortIndexUpdaterConfigurator config
){
36 setMessage(Messages
.DatabaseRepairPage_chooseParameter
);
50 public void createControl(Composite parent
) {
51 final Composite composite
= new Composite(parent
, SWT
.NULL
);
53 GridLayout gridLayout
= new GridLayout();
54 composite
.setLayout(gridLayout
);
56 Button checkBoxTaxonNode
= new Button(composite
, SWT
.CHECK
);
57 checkBoxTaxonNode
.setSelection(config
.isDoTaxonNode());
58 checkBoxTaxonNode
.setText(Messages
.DatabaseRepairPage_updateTaxonNodes
);
60 .setToolTipText(Messages
.DatabaseRepairPage_toolTip_taxonNode
);
61 checkBoxTaxonNode
.addSelectionListener(new SelectionAdapter() {
63 public void widgetSelected(SelectionEvent e
) {
64 config
.setDoTaxonNode(!config
.isDoTaxonNode());
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() {
75 public void widgetSelected(SelectionEvent e
) {
76 config
.setDoPolytomousKeyNode(!config
.isDoPolytomousKeyNode());
80 Button checkBoxFeatureNode
= new Button(composite
, SWT
.CHECK
);
81 checkBoxFeatureNode
.setSelection(config
.isDoFeatureNode());
82 checkBoxFeatureNode
.setText(Messages
.DatabaseRepairPage_featureNodes
);
84 .setToolTipText(Messages
.DatabaseRepairPage_toolTipFeatureNodes
);
85 checkBoxFeatureNode
.addSelectionListener(new SelectionAdapter() {
87 public void widgetSelected(SelectionEvent e
) {
88 config
.setDoFeatureNode(!config
.isDoFeatureNode());
94 setControl(composite
);