Revision b4e62664
Added by Alexander Oppermann almost 9 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/FeatureTreePreferences.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 |
*/ |
... | ... | |
12 | 12 |
|
13 | 13 |
import org.eclipse.jface.preference.PreferencePage; |
14 | 14 |
import org.eclipse.jface.resource.ImageDescriptor; |
15 |
import org.eclipse.jface.wizard.WizardDialog; |
|
16 | 15 |
import org.eclipse.swt.SWT; |
17 |
import org.eclipse.swt.events.SelectionAdapter; |
|
18 |
import org.eclipse.swt.events.SelectionEvent; |
|
19 | 16 |
import org.eclipse.swt.layout.GridLayout; |
20 |
import org.eclipse.swt.widgets.Button; |
|
21 | 17 |
import org.eclipse.swt.widgets.Composite; |
22 | 18 |
import org.eclipse.swt.widgets.Control; |
23 | 19 |
import org.eclipse.ui.IWorkbench; |
24 | 20 |
import org.eclipse.ui.IWorkbenchPreferencePage; |
25 | 21 |
|
26 |
import eu.etaxonomy.taxeditor.featuretree.FeatureTreeEditorWizard; |
|
27 |
import eu.etaxonomy.taxeditor.featuretree.OpenFeatureTreeEditorWizardHandler; |
|
22 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
|
28 | 23 |
import eu.etaxonomy.taxeditor.ui.element.CommandHandlerButton; |
29 | 24 |
|
30 | 25 |
/** |
31 | 26 |
* <p> |
32 | 27 |
* FeatureTreePreferences class. |
33 | 28 |
* </p> |
34 |
*
|
|
29 |
* |
|
35 | 30 |
* @author n.hoffmann |
36 | 31 |
* @created Aug 5, 2010 |
37 | 32 |
* @version 1.0 |
... | ... | |
51 | 46 |
* <p> |
52 | 47 |
* Constructor for FeatureTreePreferences. |
53 | 48 |
* </p> |
54 |
*
|
|
49 |
* |
|
55 | 50 |
* @param title |
56 | 51 |
* a {@link java.lang.String} object. |
57 | 52 |
*/ |
... | ... | |
63 | 58 |
* <p> |
64 | 59 |
* Constructor for FeatureTreePreferences. |
65 | 60 |
* </p> |
66 |
*
|
|
61 |
* |
|
67 | 62 |
* @param title |
68 | 63 |
* a {@link java.lang.String} object. |
69 | 64 |
* @param image |
... | ... | |
75 | 70 |
|
76 | 71 |
/* |
77 | 72 |
* (non-Javadoc) |
78 |
*
|
|
73 |
* |
|
79 | 74 |
* @see |
80 | 75 |
* org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench) |
81 | 76 |
*/ |
... | ... | |
86 | 81 |
|
87 | 82 |
/* |
88 | 83 |
* (non-Javadoc) |
89 |
*
|
|
84 |
* |
|
90 | 85 |
* @see |
91 | 86 |
* org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse |
92 | 87 |
* .swt.widgets.Composite) |
... | ... | |
94 | 89 |
/** {@inheritDoc} */ |
95 | 90 |
@Override |
96 | 91 |
protected Control createContents(Composite parent) { |
97 |
|
|
98 | 92 |
Composite composite = new Composite(parent, SWT.NULL); |
99 | 93 |
composite.setLayout(new GridLayout()); |
100 | 94 |
|
101 | 95 |
final CommandHandlerButton button_openFeatureTree = new CommandHandlerButton(composite, SWT.PUSH, "eu.etaxonomy.taxeditor.store.open.FeatureTreeEditorWizard"); |
102 | 96 |
button_openFeatureTree.setText("Open FeatureTree Editor"); |
103 |
|
|
97 |
PreferencesUtil.recursiveSetEnabled(composite, CdmStore.isActive()); |
|
104 | 98 |
return composite; |
105 | 99 |
} |
106 | 100 |
} |
Also available in: Unified diff
Fix ticket #4367