Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324004

Summary: [api] provide reusable component for capturing screen shots
Product: z_Archived Reporter: Steffen Pingel <steffen.pingel>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: pascal
Version: unspecifiedKeywords: plan
Target Milestone: 3.5   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Steffen Pingel CLA 2010-08-30 13:56:51 EDT
The screenshot component is tightly coupled to a wizard page. To improve reusability it should be moved to a separate plug-in and decoupled from the wizard page.
Comment 1 Steffen Pingel CLA 2010-08-31 02:30:21 EDT
Committed a new plug-in org.eclipse.mylyn.commons.screenshots that provides a generic screenshot component. The component provides API for listening to state changes and to create an image:

	viewer = new ScreenshotViewer(parent, SWT.BORDER | SWT.FLAT) {
		@Override
		protected void stateChanged() {
			if (isComplete()) {
				// update UI
			}
		}
	};
	
	// ...
	
	viewer.createImage();

Please comment here if you need additional API.