Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 19346 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/ui/views/tasklist/FiltersDialog.java (-1 / +21 lines)
Lines 21-26 Link Here
21
import org.eclipse.jface.window.Window;
21
import org.eclipse.jface.window.Window;
22
import org.eclipse.swt.SWT;
22
import org.eclipse.swt.SWT;
23
import org.eclipse.swt.events.*;
23
import org.eclipse.swt.events.*;
24
import org.eclipse.swt.graphics.Font;
24
import org.eclipse.swt.graphics.Image;
25
import org.eclipse.swt.graphics.Image;
25
import org.eclipse.swt.layout.*;
26
import org.eclipse.swt.layout.*;
26
import org.eclipse.swt.widgets.*;
27
import org.eclipse.swt.widgets.*;
Lines 78-83 Link Here
78
		private Button[] valueButtons;
79
		private Button[] valueButtons;
79
80
80
		CheckboxEnumGroup(Composite parent, String text, EnumType type) {
81
		CheckboxEnumGroup(Composite parent, String text, EnumType type) {
82
			Font font = parent.getFont();
81
			this.type = type;
83
			this.type = type;
82
			// although not needed for layout, this composite is needed to get the tab order right
84
			// although not needed for layout, this composite is needed to get the tab order right
83
			Composite enableComposite = new Composite(parent, SWT.NONE);
85
			Composite enableComposite = new Composite(parent, SWT.NONE);
Lines 86-91 Link Here
86
			enableButton = new Button(enableComposite, SWT.CHECK);
88
			enableButton = new Button(enableComposite, SWT.CHECK);
87
			enableButton.addSelectionListener(selectionListener);
89
			enableButton.addSelectionListener(selectionListener);
88
			enableButton.setText(text);
90
			enableButton.setText(text);
91
			enableButton.setFont(font);
89
			Composite valueComposite = new Composite(parent, SWT.NONE);
92
			Composite valueComposite = new Composite(parent, SWT.NONE);
90
			valueComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
93
			valueComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
91
			valueComposite.setLayout(new FillLayout());
94
			valueComposite.setLayout(new FillLayout());
Lines 95-100 Link Here
95
				Button valueButton = new Button(valueComposite, SWT.CHECK);
98
				Button valueButton = new Button(valueComposite, SWT.CHECK);
96
				valueButton.setText(values[i].getText());
99
				valueButton.setText(values[i].getText());
97
//				valueButton.setImage(values[i].getImage());
100
//				valueButton.setImage(values[i].getImage());
101
				valueButton.setFont(font);
98
				valueButtons[i] = valueButton;
102
				valueButtons[i] = valueButton;
99
			}
103
			}
100
		}
104
		}
Lines 150-168 Link Here
150
		Text text;
154
		Text text;
151
155
152
		LabelComboTextGroup(Composite parent, String labelText, String[] comboStrings, String initialText, int widthHint) {
156
		LabelComboTextGroup(Composite parent, String labelText, String[] comboStrings, String initialText, int widthHint) {
157
			Font font = parent.getFont();
153
			Composite group = new Composite(parent, SWT.NONE);
158
			Composite group = new Composite(parent, SWT.NONE);
154
			GridLayout layout = new GridLayout();
159
			GridLayout layout = new GridLayout();
155
			layout.numColumns = 3;
160
			layout.numColumns = 3;
156
			//Set the margin width to 0 in order to line up with other items
161
			//Set the margin width to 0 in order to line up with other items
157
			layout.marginWidth = 0;
162
			layout.marginWidth = 0;
158
			group.setLayout(layout);
163
			group.setLayout(layout);
164
			group.setFont(font);
159
			label = new Label(group, SWT.NONE);
165
			label = new Label(group, SWT.NONE);
160
			label.setText(labelText);
166
			label.setText(labelText);
167
			label.setFont(font);
161
			combo = createCombo(group, comboStrings, 0);
168
			combo = createCombo(group, comboStrings, 0);
162
			text = new Text(parent, SWT.SINGLE | SWT.BORDER);
169
			text = new Text(parent, SWT.SINGLE | SWT.BORDER);
163
			GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
170
			GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
164
			gridData.widthHint = widthHint;
171
			gridData.widthHint = widthHint;
165
			text.setLayoutData(gridData);
172
			text.setLayoutData(gridData);
173
			text.setFont(font);
166
			text.setText(initialText);
174
			text.setText(initialText);
167
		}
175
		}
168
	}
176
	}
Lines 186-191 Link Here
186
			button.setLayoutData(data);
194
			button.setLayoutData(data);
187
195
188
			Composite composite = new Composite(parent, SWT.NONE);
196
			Composite composite = new Composite(parent, SWT.NONE);
197
			composite.setFont(parent.getFont());
189
			GridLayout layout = new GridLayout();
198
			GridLayout layout = new GridLayout();
190
			Button radio = new Button(parent, SWT.RADIO);
199
			Button radio = new Button(parent, SWT.RADIO);
191
			layout.marginWidth = radio.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
200
			layout.marginWidth = radio.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
Lines 349-354 Link Here
349
	GridLayout layout = new GridLayout();
358
	GridLayout layout = new GridLayout();
350
	layout.numColumns = 2;
359
	layout.numColumns = 2;
351
	composite.setLayout(layout);
360
	composite.setLayout(layout);
361
	composite.setFont(parent.getFont());
352
362
353
	String[] filters = {TaskListMessages.getString("TaskList.contains"), TaskListMessages.getString("TaskList.doesNotContain")}; //$NON-NLS-2$ //$NON-NLS-1$
363
	String[] filters = {TaskListMessages.getString("TaskList.contains"), TaskListMessages.getString("TaskList.doesNotContain")}; //$NON-NLS-2$ //$NON-NLS-1$
354
	descriptionGroup = new LabelComboTextGroup(composite, TaskListMessages.getString("TaskList.whereDescription"), filters, "", 200);//$NON-NLS-2$ //$NON-NLS-1$
364
	descriptionGroup = new LabelComboTextGroup(composite, TaskListMessages.getString("TaskList.whereDescription"), filters, "", 200);//$NON-NLS-2$ //$NON-NLS-1$
Lines 379-384 Link Here
379
	}
389
	}
380
	button.setText(text);
390
	button.setText(text);
381
	button.addSelectionListener(selectionListener);
391
	button.addSelectionListener(selectionListener);
392
	button.setFont(parent.getFont());
382
	return button;
393
	return button;
383
}
394
}
384
/**
395
/**
Lines 392-397 Link Here
392
Combo createCombo(Composite parent, String[] items, int selectionIndex) {
403
Combo createCombo(Composite parent, String[] items, int selectionIndex) {
393
	Combo combo = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
404
	Combo combo = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
394
	combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
405
	combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
406
	combo.setFont(parent.getFont());
395
	combo.setItems(items);
407
	combo.setItems(items);
396
	combo.select(selectionIndex);
408
	combo.select(selectionIndex);
397
	combo.addSelectionListener(selectionListener);
409
	combo.addSelectionListener(selectionListener);
Lines 421-426 Link Here
421
Button createRadioButton(Composite parent, String text) {
433
Button createRadioButton(Composite parent, String text) {
422
	Button button = new Button(parent, SWT.RADIO);
434
	Button button = new Button(parent, SWT.RADIO);
423
	button.setText(text);
435
	button.setText(text);
436
	button.setFont(parent.getFont());
424
	button.addSelectionListener(selectionListener);
437
	button.addSelectionListener(selectionListener);
425
	return button;
438
	return button;
426
}
439
}
Lines 433-438 Link Here
433
	Composite group = new Composite(parent, SWT.NONE);
446
	Composite group = new Composite(parent, SWT.NONE);
434
	group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
447
	group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
435
	group.setLayout(new GridLayout());
448
	group.setLayout(new GridLayout());
449
	group.setFont(parent.getFont());
436
	anyResourceButton = createRadioButton(group, TaskListMessages.getString("TaskList.anyResource")); //$NON-NLS-1$
450
	anyResourceButton = createRadioButton(group, TaskListMessages.getString("TaskList.anyResource")); //$NON-NLS-1$
437
	anyResourceInSameProjectButton = createRadioButton(group, TaskListMessages.getString("TaskList.anyResourceInSameProject")); //$NON-NLS-1$ // added by cagatayk@acm.org
451
	anyResourceInSameProjectButton = createRadioButton(group, TaskListMessages.getString("TaskList.anyResourceInSameProject")); //$NON-NLS-1$ // added by cagatayk@acm.org
438
	selectedResourceButton = createRadioButton(group, TaskListMessages.getString("TaskList.selectedResource")); //$NON-NLS-1$
452
	selectedResourceButton = createRadioButton(group, TaskListMessages.getString("TaskList.selectedResource")); //$NON-NLS-1$
Lines 445-450 Link Here
445
 * @param parent the parent composite
459
 * @param parent the parent composite
446
 */
460
 */
447
void createTypesArea(Composite parent) {
461
void createTypesArea(Composite parent) {
462
	Font font = parent.getFont();
448
	Composite composite = new Composite(parent, SWT.NONE);
463
	Composite composite = new Composite(parent, SWT.NONE);
449
	composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
464
	composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
450
	GridLayout layout = new GridLayout();
465
	GridLayout layout = new GridLayout();
Lines 452-461 Link Here
452
467
453
	Label label = new Label(composite, SWT.NONE);
468
	Label label = new Label(composite, SWT.NONE);
454
	label.setText(TaskListMessages.getString("TaskList.showItemsOfType")); //$NON-NLS-1$
469
	label.setText(TaskListMessages.getString("TaskList.showItemsOfType")); //$NON-NLS-1$
455
470
	label.setFont(font);
471
	
456
	typesViewer = new CheckboxTreeViewer(composite);
472
	typesViewer = new CheckboxTreeViewer(composite);
457
	GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
473
	GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
458
	gridData.heightHint = 100;
474
	gridData.heightHint = 100;
475
	typesViewer.getTree().setFont(font);
459
	typesViewer.getControl().setLayoutData(gridData);
476
	typesViewer.getControl().setLayoutData(gridData);
460
	typesViewer.setContentProvider(getContentProvider());
477
	typesViewer.setContentProvider(getContentProvider());
461
	typesViewer.setLabelProvider(getLabelProvider());
478
	typesViewer.setLabelProvider(getLabelProvider());
Lines 488-495 Link Here
488
}
505
}
489
506
490
void createMarkerLimitArea(Composite parent) {
507
void createMarkerLimitArea(Composite parent) {
508
	Font font = parent.getFont();
491
	Composite composite = new Composite(parent, SWT.NONE);
509
	Composite composite = new Composite(parent, SWT.NONE);
492
	composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
510
	composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
511
	composite.setFont(font);
493
	GridLayout layout = new GridLayout();
512
	GridLayout layout = new GridLayout();
494
	layout.numColumns = 2;
513
	layout.numColumns = 2;
495
	composite.setLayout(layout);
514
	composite.setLayout(layout);
Lines 501-506 Link Here
501
	GridData gridData = new GridData();
520
	GridData gridData = new GridData();
502
	gridData.widthHint = convertWidthInCharsToPixels(10);
521
	gridData.widthHint = convertWidthInCharsToPixels(10);
503
	markerLimit.setLayoutData(gridData);
522
	markerLimit.setLayoutData(gridData);
523
	markerLimit.setFont(font);
504
}	
524
}	
505
525
506
/**
526
/**
(-)src/org/eclipse/ui/views/tasklist/TaskPropertiesDialog.java (-3 / +23 lines)
Lines 14-19 Link Here
14
import org.eclipse.swt.SWT;
14
import org.eclipse.swt.SWT;
15
import org.eclipse.swt.events.TraverseEvent;
15
import org.eclipse.swt.events.TraverseEvent;
16
import org.eclipse.swt.events.TraverseListener;
16
import org.eclipse.swt.events.TraverseListener;
17
import org.eclipse.swt.graphics.Font;
17
import org.eclipse.swt.layout.GridData;
18
import org.eclipse.swt.layout.GridData;
18
import org.eclipse.swt.layout.GridLayout;
19
import org.eclipse.swt.layout.GridLayout;
19
import org.eclipse.swt.widgets.*;
20
import org.eclipse.swt.widgets.*;
Lines 193-198 Link Here
193
 * @param composite
194
 * @param composite
194
 */
195
 */
195
private void createCreationTimeArea(Composite parent) {
196
private void createCreationTimeArea(Composite parent) {
197
	Font font = parent.getFont();
196
	Composite composite = new Composite(parent, SWT.NONE);
198
	Composite composite = new Composite(parent, SWT.NONE);
197
	GridLayout layout = new GridLayout();
199
	GridLayout layout = new GridLayout();
198
	layout.numColumns = 2;
200
	layout.numColumns = 2;
Lines 200-207 Link Here
200
	
202
	
201
	Label label = new Label(composite, SWT.NONE);
203
	Label label = new Label(composite, SWT.NONE);
202
	label.setText(TaskListMessages.getString("TaskProp.creationTime")); //$NON-NLS-1$
204
	label.setText(TaskListMessages.getString("TaskProp.creationTime")); //$NON-NLS-1$
205
	label.setFont(font);
203
	
206
	
204
	creationTime = new Label(composite, SWT.NONE);	
207
	creationTime = new Label(composite, SWT.NONE);
208
	creationTime.setFont(font);	
205
}
209
}
206
210
207
/**
211
/**
Lines 219-230 Link Here
219
 * Creates the area for the Description field.
223
 * Creates the area for the Description field.
220
 */
224
 */
221
private void createDescriptionArea(Composite parent) {
225
private void createDescriptionArea(Composite parent) {
226
	Font font = parent.getFont();
222
	Composite composite = new Composite(parent, SWT.NONE);
227
	Composite composite = new Composite(parent, SWT.NONE);
223
	GridLayout layout = new GridLayout();
228
	GridLayout layout = new GridLayout();
224
	layout.numColumns = 2;
229
	layout.numColumns = 2;
225
	composite.setLayout(layout);
230
	composite.setLayout(layout);
226
	Label label = new Label(composite, SWT.NONE);
231
	Label label = new Label(composite, SWT.NONE);
227
	label.setText(TaskListMessages.getString("TaskProp.description")); //$NON-NLS-1$
232
	label.setText(TaskListMessages.getString("TaskProp.description")); //$NON-NLS-1$
233
	label.setFont(font);
228
	int style = SWT.SINGLE | SWT.BORDER;
234
	int style = SWT.SINGLE | SWT.BORDER;
229
	if (!isTask()) {
235
	if (!isTask()) {
230
		style |= SWT.READ_ONLY;
236
		style |= SWT.READ_ONLY;
Lines 233-244 Link Here
233
	GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
239
	GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
234
	gridData.widthHint = convertHorizontalDLUsToPixels(400);
240
	gridData.widthHint = convertHorizontalDLUsToPixels(400);
235
	descriptionText.setLayoutData(gridData);
241
	descriptionText.setLayoutData(gridData);
242
	descriptionText.setFont(font);
236
}
243
}
237
244
238
/**
245
/**
239
 * Creates the area for the Priority and Status fields.
246
 * Creates the area for the Priority and Status fields.
240
 */
247
 */
241
private void createPriorityAndStatusArea(Composite parent) {
248
private void createPriorityAndStatusArea(Composite parent) {
249
	Font font = parent.getFont();
242
	Composite composite = new Composite(parent, SWT.NONE);
250
	Composite composite = new Composite(parent, SWT.NONE);
243
	GridLayout layout = new GridLayout();
251
	GridLayout layout = new GridLayout();
244
	layout.numColumns = 3;
252
	layout.numColumns = 3;
Lines 246-251 Link Here
246
	
254
	
247
	Label label = new Label(composite, SWT.NONE);
255
	Label label = new Label(composite, SWT.NONE);
248
	label.setText(TaskListMessages.getString("TaskProp.priority")); //$NON-NLS-1$
256
	label.setText(TaskListMessages.getString("TaskProp.priority")); //$NON-NLS-1$
257
	label.setFont(font);
249
	priorityCombo = new Combo(composite, SWT.READ_ONLY);
258
	priorityCombo = new Combo(composite, SWT.READ_ONLY);
250
	priorityCombo.setItems(new String[] {
259
	priorityCombo.setItems(new String[] {
251
		TaskListMessages.getString("TaskList.high"), //$NON-NLS-1$
260
		TaskListMessages.getString("TaskList.high"), //$NON-NLS-1$
Lines 260-277 Link Here
260
			}
269
			}
261
		}
270
		}
262
	});
271
	});
272
	priorityCombo.setFont(font);
263
	
273
	
264
	completedCheckbox = new Button(composite, SWT.CHECK);
274
	completedCheckbox = new Button(composite, SWT.CHECK);
265
	completedCheckbox.setText(TaskListMessages.getString("TaskProp.completed")); //$NON-NLS-1$
275
	completedCheckbox.setText(TaskListMessages.getString("TaskProp.completed")); //$NON-NLS-1$
266
	GridData gridData = new GridData();
276
	GridData gridData = new GridData();
267
	gridData.horizontalIndent = convertHorizontalDLUsToPixels(20);
277
	gridData.horizontalIndent = convertHorizontalDLUsToPixels(20);
268
	completedCheckbox.setLayoutData(gridData);
278
	completedCheckbox.setLayoutData(gridData);
279
	completedCheckbox.setFont(font);
269
}
280
}
270
281
271
/**
282
/**
272
 * Creates the area for the Severity field.
283
 * Creates the area for the Severity field.
273
 */
284
 */
274
private void createSeverityArea(Composite parent) {
285
private void createSeverityArea(Composite parent) {
286
	Font font = parent.getFont();
275
	Composite composite = new Composite(parent, SWT.NONE);
287
	Composite composite = new Composite(parent, SWT.NONE);
276
	GridLayout layout = new GridLayout();
288
	GridLayout layout = new GridLayout();
277
	layout.numColumns = 2;
289
	layout.numColumns = 2;
Lines 279-287 Link Here
279
	
291
	
280
	Label label = new Label(composite, SWT.NONE);
292
	Label label = new Label(composite, SWT.NONE);
281
	label.setText(TaskListMessages.getString("TaskProp.severity")); //$NON-NLS-1$
293
	label.setText(TaskListMessages.getString("TaskProp.severity")); //$NON-NLS-1$
282
	
294
	label.setFont(font);
283
	// workaround for bug 11078: Can't get a read-only combo box
295
	// workaround for bug 11078: Can't get a read-only combo box
284
	severityLabel = new Label(composite, SWT.NONE);	
296
	severityLabel = new Label(composite, SWT.NONE);
297
	severityLabel.setFont(font);
285
/*
298
/*
286
	severityCombo = new Combo(composite, SWT.READ_ONLY);
299
	severityCombo = new Combo(composite, SWT.READ_ONLY);
287
	severityCombo.setItems(new String[] {
300
	severityCombo.setItems(new String[] {
Lines 296-301 Link Here
296
 * Creates the area for the Resource field.
309
 * Creates the area for the Resource field.
297
 */
310
 */
298
private void createResourceArea(Composite parent) {
311
private void createResourceArea(Composite parent) {
312
	Font font = parent.getFont();
299
	Composite composite = new Composite(parent, SWT.NONE);
313
	Composite composite = new Composite(parent, SWT.NONE);
300
	GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
314
	GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
301
	composite.setLayoutData(gridData);
315
	composite.setLayoutData(gridData);
Lines 305-325 Link Here
305
	
319
	
306
	Label resourceLabel = new Label(composite, SWT.NONE);
320
	Label resourceLabel = new Label(composite, SWT.NONE);
307
	resourceLabel.setText(TaskListMessages.getString("TaskProp.onResource")); //$NON-NLS-1$
321
	resourceLabel.setText(TaskListMessages.getString("TaskProp.onResource")); //$NON-NLS-1$
322
	resourceLabel.setFont(font);
308
	resourceText = new Text(composite, SWT.SINGLE | SWT.WRAP | SWT.READ_ONLY | SWT.BORDER);
323
	resourceText = new Text(composite, SWT.SINGLE | SWT.WRAP | SWT.READ_ONLY | SWT.BORDER);
309
	gridData = new GridData(GridData.FILL_HORIZONTAL);
324
	gridData = new GridData(GridData.FILL_HORIZONTAL);
310
	resourceText.setLayoutData(gridData);
325
	resourceText.setLayoutData(gridData);
326
	resourceText.setFont(font);
311
	
327
	
312
	Label folderLabel = new Label(composite, SWT.NONE);
328
	Label folderLabel = new Label(composite, SWT.NONE);
313
	folderLabel.setText(TaskListMessages.getString("TaskProp.inFolder")); //$NON-NLS-1$
329
	folderLabel.setText(TaskListMessages.getString("TaskProp.inFolder")); //$NON-NLS-1$
330
	folderLabel.setFont(font);
314
	folderText = new Text(composite, SWT.SINGLE | SWT.WRAP | SWT.READ_ONLY | SWT.BORDER);
331
	folderText = new Text(composite, SWT.SINGLE | SWT.WRAP | SWT.READ_ONLY | SWT.BORDER);
315
	gridData = new GridData(GridData.FILL_HORIZONTAL);
332
	gridData = new GridData(GridData.FILL_HORIZONTAL);
316
	folderText.setLayoutData(gridData);
333
	folderText.setLayoutData(gridData);
334
	folderText.setFont(font);
317
	
335
	
318
	Label locationLabel = new Label(composite, SWT.NONE);
336
	Label locationLabel = new Label(composite, SWT.NONE);
319
	locationLabel.setText(TaskListMessages.getString("TaskProp.location")); //$NON-NLS-1$
337
	locationLabel.setText(TaskListMessages.getString("TaskProp.location")); //$NON-NLS-1$
338
	locationLabel.setFont(font);
320
	locationText = new Text(composite, SWT.SINGLE | SWT.WRAP | SWT.READ_ONLY | SWT.BORDER);
339
	locationText = new Text(composite, SWT.SINGLE | SWT.WRAP | SWT.READ_ONLY | SWT.BORDER);
321
	gridData = new GridData(GridData.FILL_HORIZONTAL);
340
	gridData = new GridData(GridData.FILL_HORIZONTAL);
322
	locationText.setLayoutData(gridData);
341
	locationText.setLayoutData(gridData);
342
	locationText.setFont(font);
323
}
343
}
324
344
325
/**
345
/**

Return to bug 19346