Revision 7eaf9741
Added by Katja Luther about 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java | ||
---|---|---|
23 | 23 |
import org.eclipse.core.runtime.IProgressMonitor; |
24 | 24 |
import org.eclipse.core.runtime.IStatus; |
25 | 25 |
import org.eclipse.jface.dialogs.IDialogSettings; |
26 |
import org.eclipse.jface.viewers.CellEditor.LayoutData; |
|
26 | 27 |
import org.eclipse.jface.viewers.ILabelProvider; |
27 | 28 |
import org.eclipse.jface.viewers.LabelProvider; |
28 | 29 |
import org.eclipse.jface.viewers.StructuredSelection; |
... | ... | |
33 | 34 |
import org.eclipse.swt.events.SelectionEvent; |
34 | 35 |
import org.eclipse.swt.events.SelectionListener; |
35 | 36 |
import org.eclipse.swt.graphics.Cursor; |
37 |
import org.eclipse.swt.layout.GridData; |
|
38 |
import org.eclipse.swt.layout.GridLayout; |
|
36 | 39 |
import org.eclipse.swt.widgets.Button; |
37 | 40 |
import org.eclipse.swt.widgets.Composite; |
38 | 41 |
import org.eclipse.swt.widgets.Control; |
42 |
import org.eclipse.swt.widgets.Label; |
|
39 | 43 |
import org.eclipse.swt.widgets.Shell; |
40 | 44 |
import org.eclipse.swt.widgets.Text; |
41 | 45 |
|
... | ... | |
419 | 423 |
@Override |
420 | 424 |
protected void createButtonsForButtonBar(Composite parent) { |
421 | 425 |
String[] newButtonText = getNewWizardText(); |
426 |
|
|
422 | 427 |
if (newButtonText!= null){ |
423 | 428 |
this.newButton1 = createButton(parent, this.new_id, newButtonText[0], false); |
424 | 429 |
newButton1.addSelectionListener(getNewWizardButtonSelectionListener()); |
430 |
|
|
431 |
|
|
425 | 432 |
if (newButtonText.length > 1){ |
426 | 433 |
newButton2 = createButton(parent, this.new_id2, newButtonText[1], false); |
427 | 434 |
newButton2.addSelectionListener(getNewWizardButtonSelectionListener()); |
435 |
|
|
428 | 436 |
} |
437 |
|
|
429 | 438 |
} |
430 |
//Label label = new Label(parent, SWT.NONE); |
|
439 |
Button space = createButton(parent, this.space_id, " ", false); |
|
440 |
space.setEnabled(false); |
|
441 |
space.setVisible(false); |
|
442 |
GridData gridData = new GridData(); |
|
443 |
gridData.grabExcessHorizontalSpace = false; |
|
444 |
gridData.widthHint = 3; |
|
445 |
space.setLayoutData(gridData); |
|
446 |
GridLayout gridLayout = new GridLayout(); |
|
447 |
gridLayout.makeColumnsEqualWidth= false; |
|
448 |
gridLayout.numColumns=newButtonText.length+2; |
|
449 |
parent.setLayout(gridLayout); |
|
450 |
|
|
431 | 451 |
super.createButtonsForButtonBar(parent); |
432 | 452 |
} |
433 | 453 |
|
Also available in: Unified diff
fix #7120: move new buttons in selection dialogs a little bit to the left