Skip to main content
summaryrefslogtreecommitdiffstats
blob: ee269aa12320fa529178808622aee271b6271827 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*******************************************************************************
 * Copyright (c) 2006 Sybase, Inc. and others.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Sybase, Inc. - initial API and implementation
 *******************************************************************************/
package org.eclipse.jst.pagedesigner.ui.dialogs;

import org.eclipse.jface.preference.PreferenceDialog;
import org.eclipse.jface.preference.PreferenceManager;
import org.eclipse.jst.pagedesigner.PDPlugin;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.css.core.internal.util.declaration.CSSPropertyContext;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;

/**
 * @author mengbo
 * @version 1.5
 */
public class StyleDialog extends PreferenceDialog {
	/**
	 * @param parentShell
	 * @param manager
	 * @param element 
	 * @param style 
	 */
	public StyleDialog(Shell parentShell, PreferenceManager manager,
			IDOMElement element, CSSPropertyContext style) {
		super(parentShell, manager);
		manager.addToRoot(new TextPreferenceNode(element, style));
		manager.addToRoot(new BackgroudPreferenceNode(element, style));
		manager.addToRoot(new BlockPreferenceNode(element, style));
		manager.addToRoot(new BoxPreferenceNode(element, style));
		manager.addToRoot(new BorderPreferenceNode(element, style));
		manager.addToRoot(new ListPreferenceNode(element, style));
		manager.addToRoot(new PositioningPreferenceNode(element, style));
		manager.addToRoot(new ExtensionsPreferenceNode(element, style));
	}

	protected Control createDialogArea(Composite parent) {
		Control control = super.createDialogArea(parent);
		PlatformUI.getWorkbench().getHelpSystem().setHelp(control,
				PDPlugin.getResourceString("StyleDialog.help.id"));
		PlatformUI.getWorkbench().getHelpSystem().setHelp(
				getTreeViewer().getControl(),
				PDPlugin.getResourceString("StyleDialog.help.id"));
		return control;
	}

	protected void update() {
		super.update();
		getShell().setText(DialogsMessages.getString("StyleDialog.Title"));
	}
}

Back to the top