net.sourceforge.rssowl.controller.dialog
Class ConfirmDeleteDialog

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by org.eclipse.jface.dialogs.Dialog
          extended by org.eclipse.jface.dialogs.TitleAreaDialog
              extended by net.sourceforge.rssowl.controller.dialog.ConfirmDeleteDialog
All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider

public class ConfirmDeleteDialog
extends org.eclipse.jface.dialogs.TitleAreaDialog

The ConfirmDeleteDialog asks the user if he wants to proceed with the deletion of a favorite, category or blogroll. A checkbutton allows to never show the dialog again.

Version:
1.2.4
Author:
Benjamin Pasero

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
private  java.lang.String dialogHeaderMessage
           
private  java.lang.String dialogMessage
           
private static int dialogMinWidth
          Min. width of the dialog in DLUs
private  Button neverAskAgainCheck
           
private  java.lang.String title
           
private  int type
           
static int TYPE_BLOGROLL
          Confirm dialog for the deletion of a blogroll
static int TYPE_CATEGORY
          Confirm dialog for the deletion of a category
static int TYPE_FAVORITE
          Confirm dialog for the deletion of a favorite
 
Fields inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
DLG_IMG_TITLE_BANNER, DLG_IMG_TITLE_ERROR, INFO_MESSAGE, WARNING_MESSAGE
 
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
ConfirmDeleteDialog(Shell parentShell, java.lang.String title, java.lang.String dialogHeaderMessage, java.lang.String dialogMessage, int type)
          Instantiate a new ConfirmDeleteDialog
 
Method Summary
protected  void buttonPressed(int buttonId)
           
 boolean close()
           
protected  void configureShell(Shell shell)
           
protected  void createButtonsForButtonBar(Composite parent)
           
protected  Control createDialogArea(Composite parent)
           
protected  int getShellStyle()
           
protected  void initializeBounds()
           
protected  void setButtonLayoutData(Button button)
          Set the layout data of the button to a GridData with appropriate widths This method was slightly modified so that it is not setting a heightHint.
 
Methods inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
createContents, getInitialSize, getTitleArea, getTitleImageLabel, setErrorMessage, setMessage, setMessage, setTitle, setTitleAreaColor, setTitleImage
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getImage, getOKButton, initializeDialogUnits, okPressed, setBlockedHandler, setButtonLayoutFormData, shortenText
 
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getInitialLocation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, 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

TYPE_BLOGROLL

public static final int TYPE_BLOGROLL
Confirm dialog for the deletion of a blogroll

See Also:
Constant Field Values

TYPE_CATEGORY

public static final int TYPE_CATEGORY
Confirm dialog for the deletion of a category

See Also:
Constant Field Values

TYPE_FAVORITE

public static final int TYPE_FAVORITE
Confirm dialog for the deletion of a favorite

See Also:
Constant Field Values

dialogMinWidth

private static final int dialogMinWidth
Min. width of the dialog in DLUs

See Also:
Constant Field Values

dialogHeaderMessage

private java.lang.String dialogHeaderMessage

dialogMessage

private java.lang.String dialogMessage

neverAskAgainCheck

private Button neverAskAgainCheck

title

private java.lang.String title

type

private int type
Constructor Detail

ConfirmDeleteDialog

public ConfirmDeleteDialog(Shell parentShell,
                           java.lang.String title,
                           java.lang.String dialogHeaderMessage,
                           java.lang.String dialogMessage,
                           int type)
Instantiate a new ConfirmDeleteDialog

Parameters:
parentShell - The parent shell
title - The title of the dialog
dialogHeaderMessage - The info message
dialogMessage - The dialog message
type - The type of the deletion
Method Detail

close

public boolean close()
Overrides:
close in class org.eclipse.jface.dialogs.Dialog
See Also:
Dialog.close()

buttonPressed

protected void buttonPressed(int buttonId)
Overrides:
buttonPressed in class org.eclipse.jface.dialogs.Dialog
See Also:
Dialog.buttonPressed(int)

configureShell

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

createButtonsForButtonBar

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

createDialogArea

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

getShellStyle

protected int getShellStyle()
Overrides:
getShellStyle in class org.eclipse.jface.window.Window
See Also:
Window.getShellStyle()

initializeBounds

protected void initializeBounds()
Overrides:
initializeBounds in class org.eclipse.jface.dialogs.Dialog
See Also:
Dialog.initializeBounds()

setButtonLayoutData

protected void setButtonLayoutData(Button button)
Set the layout data of the button to a GridData with appropriate widths This method was slightly modified so that it is not setting a heightHint.

Overrides:
setButtonLayoutData in class org.eclipse.jface.dialogs.Dialog
Parameters:
button - The button to layout


RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo