net.sourceforge.java.util.gui.swt
Class SWTUtils

java.lang.Object
  extended bynet.sourceforge.java.util.gui.swt.SWTUtils

public class SWTUtils
extends Object

Contains common SWT specific utility methods.

Author:
Sebastian Machhausen

Constructor Summary
SWTUtils()
           
 
Method Summary
static void centerShell(Display display, Shell shell)
           Centers the specified Shell on the given Display.
static boolean isDisposed(Widget widget)
           Returns true if the specified Widget is disposed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SWTUtils

public SWTUtils()
Method Detail

isDisposed

public static boolean isDisposed(Widget widget)

Returns true if the specified Widget is disposed. A Widget is considered as disposed if it is either null or its Widget.isDisposed() method returns true.

Parameters:
widget - the Widget to verify for disposal
Returns:
true if the specified Widget is disposed; false otherwise

centerShell

public static void centerShell(Display display,
                               Shell shell)

Centers the specified Shell on the given Display.

Parameters:
display - the Display to center the Shell on
shell - the Shell to center