edu.wpi.ebob.internal.gui.dialogs
Class RemoveInstanceDialog

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 edu.wpi.ebob.internal.gui.dialogs.RemoveInstanceDialog
All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider

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

Author:
Liam Morley

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
static int DELETE_CASCADE
          Return code constant (value 2) indicating the instance should be deleted along with all children.
static int DELETE_FORCE
          Return code constant (value 2) indicating the instance should be deleted by force.
private  Instance instance
           
private  int returnCode
           
 
Fields inherited from class org.eclipse.jface.dialogs.IconAndMessageDialog
imageLabel, message, messageLabel
 
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, 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
RemoveInstanceDialog(org.eclipse.swt.widgets.Shell parentShell, Instance instance)
           
 
Method Summary
protected  void configureShell(org.eclipse.swt.widgets.Shell newShell)
           
protected  org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
           
protected  org.eclipse.swt.graphics.Image getImage()
           
 int getReturnCode()
          Returns either DELETE_FORCE,DELETE_CASCADE, or CANCEL.
 int open()
          Returns the RemoveInstanceDialog return code instead of just OK or CANCEL.
 
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, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonsForButtonBar, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getImage, getOKButton, initializeBounds, initializeDialogUnits, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
 
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getInitialLocation, getInitialSize, getLayout, getParentShell, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, 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

DELETE_FORCE

public static final int DELETE_FORCE
Return code constant (value 2) indicating the instance should be deleted by force.

See Also:
Constant Field Values

DELETE_CASCADE

public static final int DELETE_CASCADE
Return code constant (value 2) indicating the instance should be deleted along with all children.

See Also:
Constant Field Values

instance

private Instance instance

returnCode

private int returnCode
Constructor Detail

RemoveInstanceDialog

public RemoveInstanceDialog(org.eclipse.swt.widgets.Shell parentShell,
                            Instance instance)
Parameters:
parentShell -
Method Detail

createDialogArea

protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
Overrides:
createDialogArea in class org.eclipse.jface.dialogs.Dialog
See Also:
Dialog.createDialogArea(org.eclipse.swt.widgets.Composite)

configureShell

protected void configureShell(org.eclipse.swt.widgets.Shell newShell)
Overrides:
configureShell in class org.eclipse.jface.window.Window
See Also:
Window.configureShell(org.eclipse.swt.widgets.Shell)

getReturnCode

public int getReturnCode()
Returns either DELETE_FORCE,DELETE_CASCADE, or CANCEL.

Overrides:
getReturnCode in class org.eclipse.jface.window.Window
See Also:
Window.getReturnCode()

getImage

protected org.eclipse.swt.graphics.Image getImage()
Specified by:
getImage in class org.eclipse.jface.dialogs.IconAndMessageDialog
See Also:
IconAndMessageDialog.getImage()

open

public int open()
Returns the RemoveInstanceDialog return code instead of just OK or CANCEL.

Overrides:
open in class org.eclipse.jface.window.Window
See Also:
Window.open(), getReturnCode()