1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2007 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
|
11
|
package eu.etaxonomy.taxeditor.preference;
|
12
|
|
13
|
import org.eclipse.jface.preference.PreferencePage;
|
14
|
import org.eclipse.jface.resource.ImageDescriptor;
|
15
|
import org.eclipse.jface.wizard.WizardDialog;
|
16
|
import org.eclipse.swt.SWT;
|
17
|
import org.eclipse.swt.events.SelectionAdapter;
|
18
|
import org.eclipse.swt.events.SelectionEvent;
|
19
|
import org.eclipse.swt.layout.GridLayout;
|
20
|
import org.eclipse.swt.widgets.Button;
|
21
|
import org.eclipse.swt.widgets.Composite;
|
22
|
import org.eclipse.swt.widgets.Control;
|
23
|
import org.eclipse.ui.IWorkbench;
|
24
|
import org.eclipse.ui.IWorkbenchPreferencePage;
|
25
|
|
26
|
import eu.etaxonomy.taxeditor.featuretree.FeatureTreeEditorWizard;
|
27
|
import eu.etaxonomy.taxeditor.featuretree.OpenFeatureTreeEditorWizardHandler;
|
28
|
import eu.etaxonomy.taxeditor.ui.element.CommandHandlerButton;
|
29
|
|
30
|
/**
|
31
|
* <p>
|
32
|
* FeatureTreePreferences class.
|
33
|
* </p>
|
34
|
*
|
35
|
* @author n.hoffmann
|
36
|
* @created Aug 5, 2010
|
37
|
* @version 1.0
|
38
|
*/
|
39
|
public class FeatureTreePreferences extends PreferencePage implements
|
40
|
IWorkbenchPreferencePage {
|
41
|
|
42
|
/**
|
43
|
* <p>
|
44
|
* Constructor for FeatureTreePreferences.
|
45
|
* </p>
|
46
|
*/
|
47
|
public FeatureTreePreferences() {
|
48
|
}
|
49
|
|
50
|
/**
|
51
|
* <p>
|
52
|
* Constructor for FeatureTreePreferences.
|
53
|
* </p>
|
54
|
*
|
55
|
* @param title
|
56
|
* a {@link java.lang.String} object.
|
57
|
*/
|
58
|
public FeatureTreePreferences(String title) {
|
59
|
super(title);
|
60
|
}
|
61
|
|
62
|
/**
|
63
|
* <p>
|
64
|
* Constructor for FeatureTreePreferences.
|
65
|
* </p>
|
66
|
*
|
67
|
* @param title
|
68
|
* a {@link java.lang.String} object.
|
69
|
* @param image
|
70
|
* a {@link org.eclipse.jface.resource.ImageDescriptor} object.
|
71
|
*/
|
72
|
public FeatureTreePreferences(String title, ImageDescriptor image) {
|
73
|
super(title, image);
|
74
|
}
|
75
|
|
76
|
/*
|
77
|
* (non-Javadoc)
|
78
|
*
|
79
|
* @see
|
80
|
* org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
|
81
|
*/
|
82
|
/** {@inheritDoc} */
|
83
|
@Override
|
84
|
public void init(IWorkbench workbench) {
|
85
|
}
|
86
|
|
87
|
/*
|
88
|
* (non-Javadoc)
|
89
|
*
|
90
|
* @see
|
91
|
* org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse
|
92
|
* .swt.widgets.Composite)
|
93
|
*/
|
94
|
/** {@inheritDoc} */
|
95
|
@Override
|
96
|
protected Control createContents(Composite parent) {
|
97
|
|
98
|
Composite composite = new Composite(parent, SWT.NULL);
|
99
|
composite.setLayout(new GridLayout());
|
100
|
|
101
|
final CommandHandlerButton button_openFeatureTree = new CommandHandlerButton(composite, SWT.PUSH, "eu.etaxonomy.taxeditor.store.open.FeatureTreeEditorWizard");
|
102
|
button_openFeatureTree.setText("Open FeatureTree Editor");
|
103
|
|
104
|
return composite;
|
105
|
}
|
106
|
}
|