|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.ui.swt.components.shell.ShellManager
public class ShellManager
ShellManager provides a logical grouping for a set of shells
Note: This class must be used from the SWT display thread
org.eclipse.jface.window.WindowManager
Constructor Summary | |
---|---|
ShellManager()
|
Method Summary | |
---|---|
void |
addWindow(org.eclipse.swt.widgets.Shell shell)
Adds a shell to the shell manager. |
void |
addWindowAddedListener(org.eclipse.swt.widgets.Listener listener)
Adds a listener that will be invoked when a shell has been added to the ShellManager |
void |
addWindowRemovedListener(org.eclipse.swt.widgets.Listener listener)
Adds a listener that will be invoked when a shell has been removed from the ShellManager |
protected java.util.Collection |
getManagedShellSet()
Gets the set of managed shells |
int |
getSize()
Gets the number of shells the ShellManager manages |
protected org.eclipse.swt.widgets.Event |
getSWTEvent(org.eclipse.swt.widgets.Shell shell)
Gets a generated SWT Event based on the shell |
java.util.Iterator<org.eclipse.swt.widgets.Shell> |
getWindows()
Gets the shells managed by the manager as an Iterator |
boolean |
isEmpty()
Gets whether the ShellManager manages no shells |
protected void |
notifyAddListeners(org.eclipse.swt.widgets.Shell sender)
Notifies the WindowAddedListener handlers |
protected void |
notifyRemoveListeners(org.eclipse.swt.widgets.Shell sender)
Notifies the WindowRemovedListener handlers |
void |
performForShells(org.eclipse.swt.widgets.Listener command)
Invokes the handleEvent method specified by the SWT listener for each managed shell |
void |
removeWindow(org.eclipse.swt.widgets.Shell shell)
Removes a shell from the shell manager |
void |
removeWindowAddedListener(org.eclipse.swt.widgets.Listener listener)
Removes a listener that will be invoked when a shell has been added to the ShellManager |
void |
removeWindowRemovedListener(org.eclipse.swt.widgets.Listener listener)
Removes a listener that will be invoked when a shell has been removed from the ShellManager |
static ShellManager |
sharedManager()
Gets the application's shared shell manager |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShellManager()
Method Detail |
---|
public static final ShellManager sharedManager()
Gets the application's shared shell manager
This ShellManager has no bearing on other ShellManager instances
Note: This method must be invoked by the SWT display thread
public final void addWindow(org.eclipse.swt.widgets.Shell shell)
Note: This method must be invoked by the SWT display thread
shell
- A SWT Shellpublic final void removeWindow(org.eclipse.swt.widgets.Shell shell)
Note: This method must be invoked by the SWT display thread
shell
- A SWT Shellpublic final java.util.Iterator<org.eclipse.swt.widgets.Shell> getWindows()
Gets the shells managed by the manager as an Iterator
The order in which the shells were added are retained.
Note: This method must be invoked by the SWT display thread
public final boolean isEmpty()
public final int getSize()
public final void performForShells(org.eclipse.swt.widgets.Listener command)
Invokes the handleEvent method specified by the SWT listener for each managed shell
The event's widget is set to the reference of the shell invoking it
command
- A command implemented as a SWT Listenerprotected final java.util.Collection getManagedShellSet()
public final void addWindowAddedListener(org.eclipse.swt.widgets.Listener listener)
Adds a listener that will be invoked when a shell has been added to the ShellManager
The listener and the shell will automatically be removed when the shell is disposed
listener
- A SWT Listenerpublic final void removeWindowAddedListener(org.eclipse.swt.widgets.Listener listener)
listener
- A SWT Listenerpublic final void addWindowRemovedListener(org.eclipse.swt.widgets.Listener listener)
listener
- A SWT Listenerpublic final void removeWindowRemovedListener(org.eclipse.swt.widgets.Listener listener)
listener
- A SWT Listenerprotected final void notifyAddListeners(org.eclipse.swt.widgets.Shell sender)
sender
- A SWT shell that "sends" the eventsprotected final void notifyRemoveListeners(org.eclipse.swt.widgets.Shell sender)
sender
- A SWT shell that "sends" the eventsprotected org.eclipse.swt.widgets.Event getSWTEvent(org.eclipse.swt.widgets.Shell shell)
Gets a generated SWT Event based on the shell
The widget field of the event should be set to the shell
shell
- A SWT Shell
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |