2 * Copyright (C) 2018 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
.preference
.wizard
;
11 import org
.eclipse
.swt
.SWT
;
12 import org
.eclipse
.swt
.events
.SelectionAdapter
;
13 import org
.eclipse
.swt
.events
.SelectionEvent
;
14 import org
.eclipse
.swt
.widgets
.Button
;
15 import org
.eclipse
.swt
.widgets
.Composite
;
17 import eu
.etaxonomy
.cdm
.model
.common
.TermType
;
18 import eu
.etaxonomy
.cdm
.model
.metadata
.CdmPreference
;
19 import eu
.etaxonomy
.taxeditor
.session
.ICdmEntitySessionEnabled
;
26 public abstract class AbstractAdminTermSelectionWizardPage
extends AbstractTermSelectionWizardPage
27 implements ICdmEntitySessionEnabled
{
33 protected AbstractAdminTermSelectionWizardPage(String pageName
, TermType type
, CdmPreference pref
) {
34 super(pageName
, type
);
36 this.allowOverride
= pref
.isAllowOverride();
40 boolean allowOverride
;
46 protected void createAllowOverrideButton(Composite parent
) {
47 final Button activateCheckButton
= new Button(parent
, SWT
.CHECK
);
48 activateCheckButton
.setText("Allow Override");
49 activateCheckButton
.setSelection(pref
.isAllowOverride());
50 activateCheckButton
.addSelectionListener(new SelectionAdapter(){
52 public void widgetSelected(SelectionEvent e
) {
53 pref
.setAllowOverride(activateCheckButton
.getSelection());
58 public CdmPreference
getPreference(){