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 193114 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java (-15 / +26 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2006 IBM Corporation and others.
2
 * Copyright (c) 2000, 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 31-38 Link Here
31
31
32
	/**
32
	/**
33
	 * Constructor for DetailsDialogWithProjects.
33
	 * Constructor for DetailsDialogWithProjects.
34
	 * @param parentShell
34
	 * 
35
	 * @param dialogTitle
35
	 * @param parentShell the parent shell
36
	 * @param dialogTitle the dialog title
37
	 * @param dialogMessage the dialog message
38
	 * @param detailsTitle the details title
39
	 * @param projects the <code>IProject</code>s
40
	 * @param includeCancelButton <code>true</code> if the 'Cancel' button should be shown
41
	 * @param imageKey the image key (one of the image constants on Dialog)
36
	 */
42
	 */
37
	public DetailsDialogWithProjects(Shell parentShell, String dialogTitle, String dialogMessage, String detailsTitle, IProject[] projects, boolean includeCancelButton, String imageKey) {
43
	public DetailsDialogWithProjects(Shell parentShell, String dialogTitle, String dialogMessage, String detailsTitle, IProject[] projects, boolean includeCancelButton, String imageKey) {
38
		super(parentShell, dialogTitle);
44
		super(parentShell, dialogTitle);
Lines 49-59 Link Here
49
	protected void createMainDialogArea(Composite composite) {
55
	protected void createMainDialogArea(Composite composite) {
50
		Label label = new Label(composite, SWT.WRAP);
56
		Label label = new Label(composite, SWT.WRAP);
51
		label.setText(message); 
57
		label.setText(message); 
52
		GridData data = new GridData(
58
		GridData data = new GridData(SWT.FILL, SWT.FILL | SWT.CENTER, true, false);
53
			GridData.GRAB_HORIZONTAL |
54
			GridData.GRAB_VERTICAL |
55
			GridData.HORIZONTAL_ALIGN_FILL |
56
			GridData.VERTICAL_ALIGN_CENTER);
57
		data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
59
		data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
58
		label.setLayoutData(data);
60
		label.setLayoutData(data);
59
		updateEnablements();
61
		updateEnablements();
Lines 73-88 Link Here
73
		composite.setLayout(layout);
75
		composite.setLayout(layout);
74
		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
76
		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
75
		
77
		
78
		if (detailsTitle != null) {
79
			Label title = new Label(composite, SWT.WRAP);
80
			title.setText(detailsTitle);
81
			title.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
82
		}
83
		
76
		detailsList = new org.eclipse.swt.widgets.List(composite, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);	 
84
		detailsList = new org.eclipse.swt.widgets.List(composite, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);	 
77
		GridData data = new GridData ();		
85
		GridData data = new GridData (SWT.FILL, SWT.FILL, true, true);		
78
		data.heightHint = 75;
86
		data.heightHint = convertHeightInCharsToPixels(5);
79
		data.horizontalAlignment = GridData.FILL;
80
		data.grabExcessHorizontalSpace = true;
81
		detailsList.setLayoutData(data);
87
		detailsList.setLayoutData(data);
82
		
88
		
83
		if (detailsTitle != null) {
84
			detailsList.add(detailsTitle);
85
		}
86
		
89
		
87
		for (int i = 0; i < projects.length; i++) {
90
		for (int i = 0; i < projects.length; i++) {
88
			detailsList.add(projects[i].getName()); 
91
			detailsList.add(projects[i].getName()); 
Lines 103-107 Link Here
103
	protected boolean includeCancelButton() {
106
	protected boolean includeCancelButton() {
104
		return includeCancelButton;
107
		return includeCancelButton;
105
	}
108
	}
109
	
110
    /* (non-Javadoc)
111
     * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#isMainGrabVertical()
112
     * @since 3.4
113
     */
114
    protected boolean isMainGrabVertical() {
115
        return false;
116
    }
106
117
107
}
118
}

Return to bug 193114