dialogs
Class SwitchUserDialog

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by org.eclipse.jface.dialogs.Dialog
          extended by org.eclipse.jface.dialogs.IconAndMessageDialog
              extended by dialogs.SwitchUserDialog
All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider

public class SwitchUserDialog
extends org.eclipse.jface.dialogs.IconAndMessageDialog

Dialog to allow the user to switch the active user profile

Author:
pgroudas

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
private  org.eclipse.swt.graphics.Image image
           
(package private)  java.lang.String user
           
 
Fields inherited from class org.eclipse.jface.dialogs.IconAndMessageDialog
imageLabel, message, messageLabel
 
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
 
Fields inherited from class org.eclipse.jface.window.Window
CANCEL, OK
 
Constructor Summary
SwitchUserDialog(org.eclipse.swt.widgets.Shell parentShell)
          SwitchUserDialog constructor
 
Method Summary
 boolean close()
          Closes the dialog box.
protected  void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
          Creates the buttons
protected  org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
          Creates the dialog area for this dialog
protected  org.eclipse.swt.graphics.Image getImage()
          gets the Image for this dialog
protected  org.eclipse.swt.graphics.Point getInitialSize()
          gets the Initial size
 java.lang.String getSelectedUser()
          Returns the selected user
 
Methods inherited from class org.eclipse.jface.dialogs.IconAndMessageDialog
createButtonBar, createContents, createDialogAndButtonArea, createMessageArea, getErrorImage, getInfoImage, getMessageLabelStyle, getQuestionImage, getWarningImage
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getOKButton, initializeBounds, initializeDialogUnits, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
 
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, configureShell, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

user

java.lang.String user

image

private org.eclipse.swt.graphics.Image image
Constructor Detail

SwitchUserDialog

public SwitchUserDialog(org.eclipse.swt.widgets.Shell parentShell)
SwitchUserDialog constructor

Parameters:
parentShell - the parent shell
Method Detail

getImage

protected org.eclipse.swt.graphics.Image getImage()
gets the Image for this dialog

Specified by:
getImage in class org.eclipse.jface.dialogs.IconAndMessageDialog
Returns:
Image

close

public boolean close()
Closes the dialog box.

Overrides:
close in class org.eclipse.jface.dialogs.Dialog

createDialogArea

protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
Creates the dialog area for this dialog

Overrides:
createDialogArea in class org.eclipse.jface.dialogs.Dialog
Parameters:
Composite -
Returns:
Control

createButtonsForButtonBar

protected void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
Creates the buttons

Overrides:
createButtonsForButtonBar in class org.eclipse.jface.dialogs.Dialog
Parameters:
parent - Composite

getInitialSize

protected org.eclipse.swt.graphics.Point getInitialSize()
gets the Initial size

Overrides:
getInitialSize in class org.eclipse.jface.dialogs.Dialog
Returns:
Point

getSelectedUser

public java.lang.String getSelectedUser()
Returns the selected user

Returns:
String username