Lines 10-16
Link Here
|
10 |
*******************************************************************************/ |
10 |
*******************************************************************************/ |
11 |
package org.eclipse.ui.internal.dialogs; |
11 |
package org.eclipse.ui.internal.dialogs; |
12 |
|
12 |
|
13 |
|
|
|
14 |
import java.text.Collator; |
13 |
import java.text.Collator; |
15 |
import java.util.*; |
14 |
import java.util.*; |
16 |
|
15 |
|
Lines 155-161
Link Here
|
155 |
layout.numColumns = 2; |
154 |
layout.numColumns = 2; |
156 |
layout.marginWidth = 0; |
155 |
layout.marginWidth = 0; |
157 |
layout.marginHeight = 0; |
156 |
layout.marginHeight = 0; |
158 |
layout.makeColumnsEqualWidth = true; |
|
|
159 |
mainColumn.setFont(defaultFont); |
157 |
mainColumn.setFont(defaultFont); |
160 |
mainColumn.setLayout(layout); |
158 |
mainColumn.setLayout(layout); |
161 |
|
159 |
|
Lines 163-169
Link Here
|
163 |
|
161 |
|
164 |
Composite previewColumn = new Composite(mainColumn, SWT.NULL); |
162 |
Composite previewColumn = new Composite(mainColumn, SWT.NULL); |
165 |
layout = new GridLayout(); |
163 |
layout = new GridLayout(); |
166 |
layout.numColumns = 1; |
|
|
167 |
layout.marginHeight = 0; |
164 |
layout.marginHeight = 0; |
168 |
layout.marginWidth = 0; |
165 |
layout.marginWidth = 0; |
169 |
previewColumn.setLayout(layout); |
166 |
previewColumn.setLayout(layout); |
Lines 174-193
Link Here
|
174 |
|
171 |
|
175 |
createPreviewControl(previewColumn); |
172 |
createPreviewControl(previewColumn); |
176 |
createValueControl(previewColumn); |
173 |
createValueControl(previewColumn); |
177 |
|
|
|
178 |
Composite buttonColumn = new Composite(previewColumn, SWT.NULL); |
179 |
layout = new GridLayout(); |
180 |
layout.numColumns = 3; |
181 |
layout.marginHeight = 0; |
182 |
layout.marginWidth = 0; |
183 |
buttonColumn.setLayout(layout); |
184 |
data = new GridData(GridData.HORIZONTAL_ALIGN_END); |
185 |
buttonColumn.setLayoutData(data); |
186 |
buttonColumn.setFont(defaultFont); |
187 |
|
188 |
createUseDefaultsControl(buttonColumn); |
189 |
createChangeControl(buttonColumn); |
190 |
createResetControl(buttonColumn); |
191 |
createNoteControl(previewColumn); |
174 |
createNoteControl(previewColumn); |
192 |
|
175 |
|
193 |
createDescriptionControl(parent); |
176 |
createDescriptionControl(parent); |
Lines 301-308
Link Here
|
301 |
* Creates the change button. |
284 |
* Creates the change button. |
302 |
*/ |
285 |
*/ |
303 |
private void createChangeControl(Composite parent) { |
286 |
private void createChangeControl(Composite parent) { |
304 |
changeFontButton = |
287 |
changeFontButton = createButton(parent, JFaceResources.getString("openChange")); //$NON-NLS-1$ |
305 |
createButton(parent, JFaceResources.getString("openChange")); //$NON-NLS-1$ |
|
|
306 |
|
288 |
|
307 |
changeFontButton.addSelectionListener(new SelectionAdapter() { |
289 |
changeFontButton.addSelectionListener(new SelectionAdapter() { |
308 |
public void widgetSelected(SelectionEvent event) { |
290 |
public void widgetSelected(SelectionEvent event) { |
Lines 328-337
Link Here
|
328 |
* Creates the change button. |
310 |
* Creates the change button. |
329 |
*/ |
311 |
*/ |
330 |
private void createResetControl(Composite parent) { |
312 |
private void createResetControl(Composite parent) { |
331 |
resetButton = |
313 |
resetButton = createButton(parent, WorkbenchMessages.getString("FontsPreference.reset")); //$NON-NLS-1$ |
332 |
createButton( |
|
|
333 |
parent, |
334 |
WorkbenchMessages.getString("FontsPreference.reset")); //$NON-NLS-1$ |
335 |
|
314 |
|
336 |
resetButton.addSelectionListener(new SelectionAdapter() { |
315 |
resetButton.addSelectionListener(new SelectionAdapter() { |
337 |
public void widgetSelected(SelectionEvent event) { |
316 |
public void widgetSelected(SelectionEvent event) { |
Lines 348-357
Link Here
|
348 |
*/ |
327 |
*/ |
349 |
private void createUseDefaultsControl(Composite parent) { |
328 |
private void createUseDefaultsControl(Composite parent) { |
350 |
|
329 |
|
351 |
useSystemButton = |
330 |
useSystemButton = createButton(parent, WorkbenchMessages.getString("FontsPreference.useSystemFont")); //$NON-NLS-1$ |
352 |
createButton( |
|
|
353 |
parent, |
354 |
WorkbenchMessages.getString("FontsPreference.useSystemFont")); //$NON-NLS-1$ |
355 |
|
331 |
|
356 |
useSystemButton.addSelectionListener(new SelectionAdapter() { |
332 |
useSystemButton.addSelectionListener(new SelectionAdapter() { |
357 |
public void widgetSelected(SelectionEvent event) { |
333 |
public void widgetSelected(SelectionEvent event) { |
Lines 389-401
Link Here
|
389 |
label.setText(WorkbenchMessages.getString("FontsPreference.preview")); //$NON-NLS-1$ |
365 |
label.setText(WorkbenchMessages.getString("FontsPreference.preview")); //$NON-NLS-1$ |
390 |
applyDialogFont(label); |
366 |
applyDialogFont(label); |
391 |
|
367 |
|
392 |
previewer = new DefaultPreviewer(parent); |
368 |
Composite previewColumn = new Composite(parent, SWT.NONE); |
|
|
369 |
|
370 |
GridLayout layout = new GridLayout(); |
371 |
layout.numColumns = 2; |
372 |
layout.marginHeight = 0; |
373 |
layout.marginWidth = 0; |
374 |
previewColumn.setLayout(layout); |
375 |
GridData data = new GridData(GridData.FILL_HORIZONTAL); |
376 |
previewColumn.setLayoutData(data); |
377 |
previewColumn.setFont(parent.getFont()); |
378 |
|
379 |
previewer = new DefaultPreviewer(previewColumn); |
393 |
Control control = previewer.getControl(); |
380 |
Control control = previewer.getControl(); |
394 |
GridData gd = new GridData(); |
381 |
GridData gd = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL); |
395 |
gd.horizontalAlignment = GridData.FILL; |
|
|
396 |
gd.grabExcessHorizontalSpace = true; |
397 |
gd.heightHint = previewer.getPreferredHeight(); |
382 |
gd.heightHint = previewer.getPreferredHeight(); |
398 |
control.setLayoutData(gd); |
383 |
control.setLayoutData(gd); |
|
|
384 |
|
385 |
Composite buttonColumn = new Composite(previewColumn, SWT.NONE); |
386 |
buttonColumn.setLayoutData( |
387 |
new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_END)); |
388 |
layout = new GridLayout(); |
389 |
layout.marginHeight = 0; |
390 |
layout.marginWidth = 0; |
391 |
buttonColumn.setLayout(layout); |
392 |
createUseDefaultsControl(buttonColumn); |
393 |
createChangeControl(buttonColumn); |
394 |
createResetControl(buttonColumn); |
395 |
|
399 |
} |
396 |
} |
400 |
|
397 |
|
401 |
/** |
398 |
/** |