3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
11 package eu
.etaxonomy
.taxeditor
.preference
;
13 import org
.eclipse
.jface
.resource
.ImageDescriptor
;
14 import org
.eclipse
.swt
.SWT
;
15 import org
.eclipse
.swt
.layout
.GridLayout
;
16 import org
.eclipse
.swt
.widgets
.Composite
;
17 import org
.eclipse
.swt
.widgets
.Control
;
18 import org
.eclipse
.ui
.IWorkbench
;
19 import org
.eclipse
.ui
.IWorkbenchPreferencePage
;
21 import eu
.etaxonomy
.taxeditor
.preference
.menu
.CdmPreferencePage
;
22 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
23 import eu
.etaxonomy
.taxeditor
.ui
.element
.CommandHandlerButton
;
27 * FeatureTreePreferences class.
31 * @created Aug 5, 2010
34 public class FeatureTreePreferences
extends CdmPreferencePage
implements
35 IWorkbenchPreferencePage
{
39 * Constructor for FeatureTreePreferences.
42 public FeatureTreePreferences() {
47 * Constructor for FeatureTreePreferences.
51 * a {@link java.lang.String} object.
53 public FeatureTreePreferences(String title
) {
59 * Constructor for FeatureTreePreferences.
63 * a {@link java.lang.String} object.
65 * a {@link org.eclipse.jface.resource.ImageDescriptor} object.
67 public FeatureTreePreferences(String title
, ImageDescriptor image
) {
75 * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
79 public void init(IWorkbench workbench
) {
86 * org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse
87 * .swt.widgets.Composite)
91 protected Control
createContents(Composite parent
) {
92 Composite composite
= new Composite(parent
, SWT
.NULL
);
93 composite
.setLayout(new GridLayout());
95 final CommandHandlerButton button_openFeatureTree
= new CommandHandlerButton(composite
, SWT
.PUSH
, "eu.etaxonomy.taxeditor.store.open.FeatureTreeEditorWizard");
96 button_openFeatureTree
.setText("Open FeatureTree Editor");
97 PreferencesUtil
.recursiveSetEnabled(composite
, CdmStore
.isActive());