| java.lang.Object org.eclipse.ui.internal.ShellPool
ShellPool | public class ShellPool (Code) | | Manages a pool of shells. This can be used instead of creating and destroying
shells. By reusing shells, they will never be disposed until the pool goes away.
This is useful in situations where client code may have cached pointers to the
shells to use as a parent for dialogs. It also works around bug 86226 (SWT menus
cannot be reparented).
since: 3.1 |
Constructor Summary | |
public | ShellPool(Shell parentShell, int childFlags) Creates a shell pool that allocates shells that are children of the
given parent and are created with the given flags. |
Method Summary | |
public Shell | allocateShell(ShellListener closeListener) Returns a new shell. | public void | dispose() Disposes this pool. |
ShellPool | public ShellPool(Shell parentShell, int childFlags)(Code) | | Creates a shell pool that allocates shells that are children of the
given parent and are created with the given flags.
Parameters: parentShell - parent shell (may be null, indicating that this pool createstop-level shells) Parameters: childFlags - flags for all child shells |
allocateShell | public Shell allocateShell(ShellListener closeListener)(Code) | | Returns a new shell. The shell must not be disposed directly, but it may be closed.
Once the shell is closed, it will be returned to the shell pool. Note: callers must
remove all listeners from the shell before closing it.
|
dispose | public void dispose()(Code) | | Disposes this pool. Any unused shells in the pool are disposed immediately,
and any shells in use will be disposed once they are closed.
since: 3.1 |
|
|