KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > dialogs > ColorThemeDemo


1 /*******************************************************************************
2  * Copyright (c) 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.internal.dialogs;
12
13
14
15 /**
16  * Class to encapsulate the set of widgets that will be used to indicate
17  * the current color theme of the workbench and give feedback on
18  * changes made.
19  */

20 public class ColorThemeDemo {
21
22 // Composite sampleComposite;
23
// CTabFolder sampleTabFolder;
24
//
25
// /**
26
// * Creates an instance of the <code>ColorThemeDemo</code> class.
27
// *
28
// * @param Composite parent The parent containing the ColorThemeDemo widgets
29
// */
30
// public ColorThemeDemo(Composite parent) {
31
// createControl(parent);
32
// }
33
//
34
// /**
35
// * Create the set of widgets to display in the receiver.
36
// *
37
// * @param Composite parent The parent containing the ColorThemeDemo widgets
38
// */
39
// private void createControl(Composite parent) {
40
// Composite marginComposite = new Composite(parent, SWT.NONE);
41
// GridLayout gl = new GridLayout();
42
// gl.marginHeight = 1;
43
// gl.marginWidth = 1;
44
//
45
// marginComposite.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_BLACK));
46
// marginComposite.setLayout(gl);
47
// GridData gd = new GridData();
48
// gd.horizontalSpan = 2;
49
// marginComposite.setLayoutData(gd);
50
//
51
// sampleComposite = new Composite(marginComposite, SWT.H_SCROLL | SWT.V_SCROLL);
52
// sampleComposite.setLayout(new GridLayout());
53
// GridData gridData = new GridData(GridData.FILL_BOTH);
54
// sampleComposite.setData(gridData);
55
//
56
// sampleTabFolder = new CTabFolder(sampleComposite, SWT.BORDER);
57
// sampleTabFolder.setSimpleTab(WorkbenchPlugin.getDefault().getPreferenceStore().getBoolean(IPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS));
58
// sampleTabFolder.setData(new GridData(GridData.FILL_BOTH));
59
// CTabItem temp = new CTabItem(sampleTabFolder, SWT.NONE);
60
// temp.setText("Console");
61
// Text text = new Text(sampleTabFolder, SWT.MULTI);
62
// text.setText("Lorem ipsum dolor sit amet\n"); //$NON-NLS-1$
63
// temp.setControl(text);
64
// sampleTabFolder.setSelection(0);
65
// temp = new CTabItem(sampleTabFolder, SWT.NONE);
66
// temp.setText("Search");
67
//
68
// resetColors();
69
// }
70
//
71
// /**
72
// * Reset the colors in the receiver.
73
// */
74
// public void resetColors() {
75
// ColorSchemeService.setTabColors(sampleTabFolder);
76
// }
77
//
78
// /**
79
// * Redraw the receiver.
80
// */
81
// void redraw() {
82
// sampleTabFolder.redraw();
83
// }
84
//
85
// /**
86
// * Set the Selected Tab background
87
// * @param color
88
// */
89
// public void setTabSelectionBGColor(Color color) {
90
// sampleTabFolder.setSelectionBackground(WorkbenchColors.createGradientArray(sampleTabFolder.getDisplay(), color), WorkbenchColors.getActiveViewGradientPercents(), true);
91
// }
92
//
93
// /**
94
// * Set the Selected Tab foreground
95
// * @param color
96
// */
97
// public void setTabSelectionFGColor(Color color) {
98
// sampleTabFolder.setSelectionForeground(color);
99
// }
100
//
101
// /**
102
// * Set the Tab background
103
// * @param color
104
// */
105
// public void setTabBGColor(Color color) {
106
// sampleTabFolder.setBackground(WorkbenchColors.createGradientArray(sampleTabFolder.getDisplay(), color), WorkbenchColors.getActiveViewGradientPercents(), true);
107
// }
108
//
109
// /**
110
// * Set the Selected Tab foreground
111
// * @param color
112
// */
113
// public void setTabFGColor(Color color) {
114
// sampleTabFolder.setForeground(color);
115
// }
116
//
117
//
118
}
119
Popular Tags