Eclipse Platform
Release 3.1

org.eclipse.jface.window
Class SameShellProvider

java.lang.Object
  extended byorg.eclipse.jface.window.SameShellProvider
All Implemented Interfaces:
IShellProvider

public class SameShellProvider
extends Object
implements IShellProvider

Standard shell provider that always returns the shell containing the given control. This will always return the correct shell for the control, even if the control is reparented.

Since:
3.1

Constructor Summary
SameShellProvider(Control targetControl)
          Returns a shell provider that always returns the current shell for the given control.
 
Method Summary
 Shell getShell()
          Returns the current shell (or null if none).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SameShellProvider

public SameShellProvider(Control targetControl)
Returns a shell provider that always returns the current shell for the given control.

Parameters:
targetControl - control whose shell will be tracked, or null if getShell() should always return null
Method Detail

getShell

public Shell getShell()
Description copied from interface: IShellProvider
Returns the current shell (or null if none). This return value may change over time, and should not be cached.

Specified by:
getShell in interface IShellProvider
Returns:
the current shell or null if none

Eclipse Platform
Release 3.1

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.