View | Details | Raw Unified | Return to bug 175069
Collapse All | Expand All

(-)src/org/eclipse/ui/internal/ide/dialogs/ResourceInfoPage.java (-18 / +5 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2006 IBM Corporation and others.
2
 * Copyright (c) 2000, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 7-12 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Remy Chi Jian Suen <remy.suen@gmail.com> - Bug 175069 [Preferences] ResourceInfoPage is not setting dialog font on all widgets
10
 *******************************************************************************/
11
 *******************************************************************************/
11
package org.eclipse.ui.internal.ide.dialogs;
12
package org.eclipse.ui.internal.ide.dialogs;
12
13
Lines 22-27 Link Here
22
import org.eclipse.core.runtime.CoreException;
23
import org.eclipse.core.runtime.CoreException;
23
import org.eclipse.core.runtime.IPath;
24
import org.eclipse.core.runtime.IPath;
24
import org.eclipse.core.runtime.content.IContentDescription;
25
import org.eclipse.core.runtime.content.IContentDescription;
26
import org.eclipse.jface.dialogs.Dialog;
25
import org.eclipse.jface.dialogs.ErrorDialog;
27
import org.eclipse.jface.dialogs.ErrorDialog;
26
import org.eclipse.jface.preference.FieldEditor;
28
import org.eclipse.jface.preference.FieldEditor;
27
import org.eclipse.jface.util.IPropertyChangeListener;
29
import org.eclipse.jface.util.IPropertyChangeListener;
Lines 108-116 Link Here
108
	 * @return the composite for the group
110
	 * @return the composite for the group
109
	 */
111
	 */
110
	private Composite createBasicInfoGroup(Composite parent, IResource resource) {
112
	private Composite createBasicInfoGroup(Composite parent, IResource resource) {
111
112
		Font font = parent.getFont();
113
114
		Composite basicInfoComposite = new Composite(parent, SWT.NULL);
113
		Composite basicInfoComposite = new Composite(parent, SWT.NULL);
115
		GridLayout layout = new GridLayout();
114
		GridLayout layout = new GridLayout();
116
		layout.numColumns = 2;
115
		layout.numColumns = 2;
Lines 121-127 Link Here
121
		data.verticalAlignment = GridData.FILL;
120
		data.verticalAlignment = GridData.FILL;
122
		data.horizontalAlignment = GridData.FILL;
121
		data.horizontalAlignment = GridData.FILL;
123
		basicInfoComposite.setLayoutData(data);
122
		basicInfoComposite.setLayoutData(data);
124
		basicInfoComposite.setFont(font);
125
123
126
		// The group for path
124
		// The group for path
127
		Label pathLabel = new Label(basicInfoComposite, SWT.NONE);
125
		Label pathLabel = new Label(basicInfoComposite, SWT.NONE);
Lines 129-135 Link Here
129
		GridData gd = new GridData();
127
		GridData gd = new GridData();
130
		gd.verticalAlignment = SWT.TOP;
128
		gd.verticalAlignment = SWT.TOP;
131
		pathLabel.setLayoutData(gd);
129
		pathLabel.setLayoutData(gd);
132
		pathLabel.setFont(font);
133
130
134
		// path value label
131
		// path value label
135
		Text pathValueText = new Text(basicInfoComposite, SWT.WRAP
132
		Text pathValueText = new Text(basicInfoComposite, SWT.WRAP
Lines 142-162 Link Here
142
		gd.grabExcessHorizontalSpace = true;
139
		gd.grabExcessHorizontalSpace = true;
143
		gd.horizontalAlignment = GridData.FILL;
140
		gd.horizontalAlignment = GridData.FILL;
144
		pathValueText.setLayoutData(gd);
141
		pathValueText.setLayoutData(gd);
145
		pathValueText.setFont(font);
146
		pathValueText.setBackground(pathValueText.getDisplay().getSystemColor(
142
		pathValueText.setBackground(pathValueText.getDisplay().getSystemColor(
147
				SWT.COLOR_WIDGET_BACKGROUND));
143
				SWT.COLOR_WIDGET_BACKGROUND));
148
144
149
		// The group for types
145
		// The group for types
150
		Label typeTitle = new Label(basicInfoComposite, SWT.LEFT);
146
		Label typeTitle = new Label(basicInfoComposite, SWT.LEFT);
151
		typeTitle.setText(TYPE_TITLE);
147
		typeTitle.setText(TYPE_TITLE);
152
		typeTitle.setFont(font);
153
148
154
		Text typeValue = new Text(basicInfoComposite, SWT.LEFT | SWT.READ_ONLY);
149
		Text typeValue = new Text(basicInfoComposite, SWT.LEFT | SWT.READ_ONLY);
155
		typeValue.setText(IDEResourceInfoUtils.getTypeString(resource,
150
		typeValue.setText(IDEResourceInfoUtils.getTypeString(resource,
156
				getContentDescription(resource)));
151
				getContentDescription(resource)));
157
		typeValue.setBackground(typeValue.getDisplay().getSystemColor(
152
		typeValue.setBackground(typeValue.getDisplay().getSystemColor(
158
				SWT.COLOR_WIDGET_BACKGROUND));
153
				SWT.COLOR_WIDGET_BACKGROUND));
159
		typeValue.setFont(font);
160
154
161
		// The group for location
155
		// The group for location
162
		Label locationTitle = new Label(basicInfoComposite, SWT.LEFT);
156
		Label locationTitle = new Label(basicInfoComposite, SWT.LEFT);
Lines 164-170 Link Here
164
		gd = new GridData();
158
		gd = new GridData();
165
		gd.verticalAlignment = SWT.TOP;
159
		gd.verticalAlignment = SWT.TOP;
166
		locationTitle.setLayoutData(gd);
160
		locationTitle.setLayoutData(gd);
167
		locationTitle.setFont(font);
168
161
169
		Text locationValue = new Text(basicInfoComposite, SWT.WRAP
162
		Text locationValue = new Text(basicInfoComposite, SWT.WRAP
170
				| SWT.READ_ONLY);
163
				| SWT.READ_ONLY);
Lines 176-182 Link Here
176
		gd.grabExcessHorizontalSpace = true;
169
		gd.grabExcessHorizontalSpace = true;
177
		gd.horizontalAlignment = GridData.FILL;
170
		gd.horizontalAlignment = GridData.FILL;
178
		locationValue.setLayoutData(gd);
171
		locationValue.setLayoutData(gd);
179
		locationValue.setFont(font);
180
		locationValue.setBackground(locationValue.getDisplay().getSystemColor(
172
		locationValue.setBackground(locationValue.getDisplay().getSystemColor(
181
				SWT.COLOR_WIDGET_BACKGROUND));
173
				SWT.COLOR_WIDGET_BACKGROUND));
182
174
Lines 187-193 Link Here
187
			gd = new GridData();
179
			gd = new GridData();
188
			gd.verticalAlignment = SWT.TOP;
180
			gd.verticalAlignment = SWT.TOP;
189
			resolvedLocationTitle.setLayoutData(gd);
181
			resolvedLocationTitle.setLayoutData(gd);
190
			resolvedLocationTitle.setFont(font);
191
182
192
			Text resolvedLocationValue = new Text(basicInfoComposite, SWT.WRAP
183
			Text resolvedLocationValue = new Text(basicInfoComposite, SWT.WRAP
193
					| SWT.READ_ONLY);
184
					| SWT.READ_ONLY);
Lines 198-204 Link Here
198
			gd.grabExcessHorizontalSpace = true;
189
			gd.grabExcessHorizontalSpace = true;
199
			gd.horizontalAlignment = GridData.FILL;
190
			gd.horizontalAlignment = GridData.FILL;
200
			resolvedLocationValue.setLayoutData(gd);
191
			resolvedLocationValue.setLayoutData(gd);
201
			resolvedLocationValue.setFont(font);
202
			resolvedLocationValue.setBackground(resolvedLocationValue
192
			resolvedLocationValue.setBackground(resolvedLocationValue
203
					.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
193
					.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
204
		}
194
		}
Lines 206-212 Link Here
206
			// The group for size
196
			// The group for size
207
			Label sizeTitle = new Label(basicInfoComposite, SWT.LEFT);
197
			Label sizeTitle = new Label(basicInfoComposite, SWT.LEFT);
208
			sizeTitle.setText(SIZE_TITLE);
198
			sizeTitle.setText(SIZE_TITLE);
209
			sizeTitle.setFont(font);
210
199
211
			Text sizeValue = new Text(basicInfoComposite, SWT.LEFT
200
			Text sizeValue = new Text(basicInfoComposite, SWT.LEFT
212
					| SWT.READ_ONLY);
201
					| SWT.READ_ONLY);
Lines 216-222 Link Here
216
			gd.grabExcessHorizontalSpace = true;
205
			gd.grabExcessHorizontalSpace = true;
217
			gd.horizontalAlignment = GridData.FILL;
206
			gd.horizontalAlignment = GridData.FILL;
218
			sizeValue.setLayoutData(gd);
207
			sizeValue.setLayoutData(gd);
219
			sizeValue.setFont(font);
220
			sizeValue.setBackground(sizeValue.getDisplay().getSystemColor(
208
			sizeValue.setBackground(sizeValue.getDisplay().getSystemColor(
221
					SWT.COLOR_WIDGET_BACKGROUND));
209
					SWT.COLOR_WIDGET_BACKGROUND));
222
		}
210
		}
Lines 297-302 Link Here
297
			encodingEditor.setEnabled(false, composite);
285
			encodingEditor.setEnabled(false, composite);
298
			lineDelimiterEditor.setEnabled(false);
286
			lineDelimiterEditor.setEnabled(false);
299
		}
287
		}
288
		
289
		Dialog.applyDialogFont(composite);
300
290
301
		return composite;
291
		return composite;
302
	}
292
	}
Lines 431-447 Link Here
431
		GridData data = new GridData();
421
		GridData data = new GridData();
432
		data.horizontalAlignment = GridData.FILL;
422
		data.horizontalAlignment = GridData.FILL;
433
		composite.setLayoutData(data);
423
		composite.setLayoutData(data);
434
		composite.setFont(font);
435
424
436
		Label timeStampLabel = new Label(composite, SWT.NONE);
425
		Label timeStampLabel = new Label(composite, SWT.NONE);
437
		timeStampLabel.setText(TIMESTAMP_TITLE);
426
		timeStampLabel.setText(TIMESTAMP_TITLE);
438
		timeStampLabel.setFont(font);
439
427
440
		// timeStamp value label
428
		// timeStamp value label
441
		Text timeStampValue = new Text(composite, SWT.READ_ONLY);
429
		Text timeStampValue = new Text(composite, SWT.READ_ONLY);
442
		timeStampValue.setText(IDEResourceInfoUtils
430
		timeStampValue.setText(IDEResourceInfoUtils
443
				.getDateStringValue(resource));
431
				.getDateStringValue(resource));
444
		timeStampValue.setFont(font);
445
		timeStampValue.setBackground(timeStampValue.getDisplay()
432
		timeStampValue.setBackground(timeStampValue.getDisplay()
446
				.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
433
				.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
447
		timeStampValue.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
434
		timeStampValue.setLayoutData(new GridData(GridData.FILL_HORIZONTAL

Return to bug 175069