|
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 |
/** |