Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321754 - SWT.TOOL window doesn't show minimize button when specified
Summary: SWT.TOOL window doesn't show minimize button when specified
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: 3.7 M2   Edit
Assignee: Scott Kovatch CLA
QA Contact: Silenio Quarti CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-04 12:15 EDT by Scott Kovatch CLA
Modified: 2010-09-02 13:38 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Kovatch CLA 2010-08-04 12:15:54 EDT
Steps:
1. Run this code.
2. Note that the minimize button isn't enabled, even though SWT.SHELL_TRIM is set.

--------------------------------------------------

package snippets;

import org.eclipse.swt.*;
import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;

public class ToolWindowExample {
	public static void main(String[] args) {
		Display display = new Display();
		final Shell shell = new Shell(display);
		shell.setLayout(new GridLayout(1, false));

		Button button = new Button(shell, SWT.PUSH);
		button.setText("Click me");
		button.addSelectionListener(new SelectionAdapter() {
			public void widgetSelected(SelectionEvent e) {
				Shell shell2 = new Shell(SWT.TOOL | SWT.RESIZE | SWT.SHELL_TRIM);
				shell2.setLayout(new GridLayout(1, false));
				shell2.setText("Palette");
				Label l = new Label(shell2, SWT.LEFT);
				l.setText("This is a SWT.TOOL Shell");
				Point origin = shell.getLocation();
				origin.x += 100;
				origin.y += 100;
				shell2.pack();
				shell2.open();
			}
		});
				
		shell.pack();
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
		display.dispose();
	}
}
Comment 1 Scott Kovatch CLA 2010-09-02 13:38:37 EDT
Fixed > 20100902