com.webcodepro.applecommander.ui.swt.util
Class SwtUtil

java.lang.Object
  extended by com.webcodepro.applecommander.ui.swt.util.SwtUtil

public class SwtUtil
extends java.lang.Object

SWT-related utility code.

Date Created: Mar 5, 2003

Author:
Rob Greene

Constructor Summary
SwtUtil()
           
 
Method Summary
static void center(org.eclipse.swt.widgets.Shell parent, org.eclipse.swt.widgets.Shell child)
          Center the child shell within the parent shell window.
static void setupPagingInformation(org.eclipse.swt.custom.ScrolledComposite composite)
          Setup some sensible paging information.
static void showErrorDialog(org.eclipse.swt.widgets.Shell shell, java.lang.String title, java.lang.String message)
          Display a dialog box with the error icon and only the ok button.
static int showOkCancelErrorDialog(org.eclipse.swt.widgets.Shell shell, java.lang.String title, java.lang.String message)
          Display a dialog box with the error icon and a ok/cancel button selection.
static org.eclipse.swt.printing.Printer showPrintDialog(org.eclipse.swt.widgets.Control control)
          Display the Print dialog helper method.
static void showSystemErrorDialog(org.eclipse.swt.widgets.Shell shell, java.lang.Throwable throwable)
          Display a system-level error dialog box.
static int showYesNoDialog(org.eclipse.swt.widgets.Shell shell, java.lang.String title, java.lang.String message)
          Display a dialog box with the question icon and a yes/no button selection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwtUtil

public SwtUtil()
Method Detail

center

public static void center(org.eclipse.swt.widgets.Shell parent,
                          org.eclipse.swt.widgets.Shell child)
Center the child shell within the parent shell window.


setupPagingInformation

public static void setupPagingInformation(org.eclipse.swt.custom.ScrolledComposite composite)
Setup some sensible paging information.


showPrintDialog

public static org.eclipse.swt.printing.Printer showPrintDialog(org.eclipse.swt.widgets.Control control)
Display the Print dialog helper method.


showYesNoDialog

public static int showYesNoDialog(org.eclipse.swt.widgets.Shell shell,
                                  java.lang.String title,
                                  java.lang.String message)
Display a dialog box with the question icon and a yes/no button selection.


showOkCancelErrorDialog

public static int showOkCancelErrorDialog(org.eclipse.swt.widgets.Shell shell,
                                          java.lang.String title,
                                          java.lang.String message)
Display a dialog box with the error icon and a ok/cancel button selection.


showErrorDialog

public static void showErrorDialog(org.eclipse.swt.widgets.Shell shell,
                                   java.lang.String title,
                                   java.lang.String message)
Display a dialog box with the error icon and only the ok button.


showSystemErrorDialog

public static void showSystemErrorDialog(org.eclipse.swt.widgets.Shell shell,
                                         java.lang.Throwable throwable)
Display a system-level error dialog box.