View | Details | Raw Unified | Return to bug 166989 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/gmf/runtime/common/ui/dialogs/ShowRelatedElementsComposite.java (-24 / +32 lines)
Lines 464-473 Link Here
464
		gridLayout.marginHeight = gridLayout.marginWidth = 0;
464
		gridLayout.marginHeight = gridLayout.marginWidth = 0;
465
		this.expansionComposite.setLayout(gridLayout);
465
		this.expansionComposite.setLayout(gridLayout);
466
466
467
		new Label(this.expansionComposite, SWT.NULL).setText(
467
		Label label1 = new Label(this.expansionComposite, SWT.NULL);
468
			CommonUIMessages.ShowRelatedElementsDialog_ExpansionGroup_Text);
468
		gridData = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
469
		label1.setLayoutData(gridData);
470
		label1.setText(CommonUIMessages.ShowRelatedElementsDialog_ExpansionGroup_Text);
471
		
472
		Composite expansionGroupComposite = new Composite(this.expansionComposite, SWT.NONE);
473
		gridData = new GridData(GridData.FILL_HORIZONTAL);
474
		expansionGroupComposite.setLayoutData(gridData);
475
		gridLayout = new GridLayout();
476
		gridLayout.marginHeight = gridLayout.marginWidth = 0;
477
		expansionGroupComposite.setLayout(gridLayout);
469
478
470
		consumerToSelection = new Button(this.expansionComposite, SWT.RADIO);
479
		consumerToSelection = new Button(expansionGroupComposite, SWT.RADIO);
471
		consumerToSelection.setText(
480
		consumerToSelection.setText(
472
			CommonUIMessages.ShowRelatedElementsDialog_Incoming); 
481
			CommonUIMessages.ShowRelatedElementsDialog_Incoming); 
473
		consumerToSelection.addSelectionListener(new SelectionListener() {
482
		consumerToSelection.addSelectionListener(new SelectionListener() {
Lines 481-489 Link Here
481
			}
490
			}
482
		});
491
		});
483
492
484
		new Label(this.expansionComposite, SWT.NULL);
493
		selectionToSupplier = new Button(expansionGroupComposite, SWT.RADIO);
485
486
		selectionToSupplier = new Button(this.expansionComposite, SWT.RADIO);
487
		selectionToSupplier.setText(
494
		selectionToSupplier.setText(
488
			CommonUIMessages.ShowRelatedElementsDialog_Outgoing);
495
			CommonUIMessages.ShowRelatedElementsDialog_Outgoing);
489
		selectionToSupplier.addSelectionListener(new SelectionListener() {
496
		selectionToSupplier.addSelectionListener(new SelectionListener() {
Lines 497-508 Link Here
497
			}
504
			}
498
		});
505
		});
499
506
500
		if (showAllConnected) {
501
			new Label(this.expansionComposite, SWT.NULL);
502
		}
503
504
		//TODO temporarily hide the all connected radio button
507
		//TODO temporarily hide the all connected radio button
505
		allConnected = new Button(this.expansionComposite, SWT.RADIO);
508
		allConnected = new Button(expansionGroupComposite, SWT.RADIO);
506
		allConnected.setText(
509
		allConnected.setText(
507
			CommonUIMessages.ShowRelatedElementsDialog_AllConnected);
510
			CommonUIMessages.ShowRelatedElementsDialog_AllConnected);
508
		allConnected.addSelectionListener(new SelectionListener() {
511
		allConnected.addSelectionListener(new SelectionListener() {
Lines 516-528 Link Here
516
			}
519
			}
517
		});
520
		});
518
521
519
		if (!showAllConnected) {
522
		gridData = new GridData();
520
			allConnected.setVisible(false);
523
		gridData.exclude = !showAllConnected;
521
		} else {
524
		allConnected.setLayoutData(gridData);
522
			new Label(this.expansionComposite, SWT.NULL);
525
		allConnected.setVisible(showAllConnected);
523
		}
524
526
525
		both = new Button(this.expansionComposite, SWT.RADIO);
527
		both = new Button(expansionGroupComposite, SWT.RADIO);
526
		both
528
		both
527
			.setText(
529
			.setText(
528
				CommonUIMessages.ShowRelatedElementsDialog_ExpansionGroup_RadioButton_Both);
530
				CommonUIMessages.ShowRelatedElementsDialog_ExpansionGroup_RadioButton_Both);
Lines 542-552 Link Here
542
		//subclasses will override this method if they need to contribute
544
		//subclasses will override this method if they need to contribute
543
		contributeToExpansionGroupComposite(this.expansionComposite);
545
		contributeToExpansionGroupComposite(this.expansionComposite);
544
546
545
		new Label(expansionComposite, SWT.NULL)
547
		Label label2 = new Label(this.expansionComposite, SWT.NULL);
546
			.setText(
548
		gridData = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
547
				CommonUIMessages.ShowRelatedElementsDialog_ExpansionGroup_Label_Levels);
549
		label2.setLayoutData(gridData);
550
		label2.setText(CommonUIMessages.ShowRelatedElementsDialog_ExpansionGroup_Label_Levels);
551
		
552
		Composite levelsGroupComposite = new Composite(this.expansionComposite, SWT.NONE);
553
		gridData = new GridData(GridData.FILL_HORIZONTAL);
554
		levelsGroupComposite.setLayoutData(gridData);
555
		gridLayout = new GridLayout();
556
		gridLayout.marginHeight = gridLayout.marginWidth = 0;
557
		levelsGroupComposite.setLayout(gridLayout);
548
558
549
		levels = new Text(this.expansionComposite, SWT.BORDER);
559
		levels = new Text(levelsGroupComposite, SWT.BORDER);
550
		gridData = new GridData();
560
		gridData = new GridData();
551
		//just pick a small, reasonable number, no need to externalize levels
561
		//just pick a small, reasonable number, no need to externalize levels
552
		// size
562
		// size
Lines 565-573 Link Here
565
			}
575
			}
566
		});
576
		});
567
577
568
		new Label(this.expansionComposite, SWT.NULL);
578
		expandIndefinitely = new Button(levelsGroupComposite, SWT.CHECK);
569
570
		expandIndefinitely = new Button(this.expansionComposite, SWT.CHECK);
571
		expandIndefinitely
579
		expandIndefinitely
572
			.setText(
580
			.setText(
573
				CommonUIMessages.ShowRelatedElementsDialog_ExpansionGroup_CheckBox_Expand_Indefinitely); 
581
				CommonUIMessages.ShowRelatedElementsDialog_ExpansionGroup_CheckBox_Expand_Indefinitely); 

Return to bug 166989