org.mailster.gui.crypto
Class TrustDialog
java.lang.Object
org.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.eclipse.jface.dialogs.IconAndMessageDialog
org.eclipse.jface.dialogs.MessageDialog
org.mailster.gui.crypto.TrustDialog
- All Implemented Interfaces:
- org.eclipse.jface.window.IShellProvider
public class TrustDialog
- extends org.eclipse.jface.dialogs.MessageDialog
---
Mailster (C) 2007-2009 De Oliveira Edouard
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 675 Mass
Ave, Cambridge, MA 02139, USA.
See Mailster
Web Site
---
TrustDialog.java - A dialog that asks for trusting degree against a certificate.
- Version:
- $Revision: 1.3 $, $Date: 2008/12/06 13:57:17 $
- Author:
- Edouard De Oliveira
| Nested classes/interfaces inherited from class org.eclipse.jface.window.Window |
org.eclipse.jface.window.Window.IExceptionHandler |
| Fields inherited from class org.eclipse.jface.dialogs.MessageDialog |
ERROR, INFORMATION, NONE, QUESTION, WARNING |
| Fields inherited from class org.eclipse.jface.dialogs.IconAndMessageDialog |
imageLabel, message, messageLabel |
| Fields inherited from class org.eclipse.jface.dialogs.Dialog |
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, 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 |
TrustDialog(org.eclipse.swt.widgets.Shell shell,
java.security.cert.Certificate[] chain)
Creates a new TrustDialog instance. |
| Methods inherited from class org.eclipse.jface.dialogs.MessageDialog |
buttonPressed, createButton, createButtonsForButtonBar, createDialogArea, customShouldTakeFocus, getButton, getButtonLabels, getDefaultButtonIndex, getImage, getMinimumMessageWidth, handleShellCloseEvent, openConfirm, openError, openInformation, openQuestion, openWarning, setButtonLabels, setButtons |
| 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, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, dialogFontIsDefault, getBlockedHandler, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText |
| Methods inherited from class org.eclipse.jface.window.Window |
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, 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 |
ACCEPT_CERTIFICATE_CHAIN
public static final int ACCEPT_CERTIFICATE_CHAIN
- See Also:
- Constant Field Values
TEMPORARY_ACCEPT_CERTIFICATE_CHAIN
public static final int TEMPORARY_ACCEPT_CERTIFICATE_CHAIN
- See Also:
- Constant Field Values
REJECT_CERTIFICATE_CHAIN
public static final int REJECT_CERTIFICATE_CHAIN
- See Also:
- Constant Field Values
chain
private java.security.cert.Certificate[] chain
- The certificate chain to display.
chainAcceptationReturnCode
private int chainAcceptationReturnCode
- The return code indicating if the certificate chain is accepted.
TrustDialog
public TrustDialog(org.eclipse.swt.widgets.Shell shell,
java.security.cert.Certificate[] chain)
- Creates a new
TrustDialog instance.
- Parameters:
shell - the parent shell
buildMessage
private static java.lang.String buildMessage(java.security.cert.Certificate[] chain)
configureShell
protected void configureShell(org.eclipse.swt.widgets.Shell shell)
- Configures the
Shell representing this
TrustDialog.
- Overrides:
configureShell in class org.eclipse.jface.dialogs.MessageDialog
- Parameters:
shell - theShell to configure
create
public void create()
- Overrides:
create in class org.eclipse.jface.dialogs.Dialog
createCustomArea
protected org.eclipse.swt.widgets.Control createCustomArea(org.eclipse.swt.widgets.Composite parent)
- Overrides:
createCustomArea in class org.eclipse.jface.dialogs.MessageDialog
getChainAcceptationReturnCode
public int getChainAcceptationReturnCode()