|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.mailster.gui.crypto.CertificateDialog
public class CertificateDialog
---
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
---
CertificateDialog.java - A dialog that shows informations about certificates.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.jface.window.Window |
|---|
org.eclipse.jface.window.Window.IExceptionHandler |
| Field Summary | |
|---|---|
private java.security.cert.Certificate[] |
chain
The certificate chain to display. |
private javax.mail.internet.MimeMessage |
message
The message that contains the certificate to display. |
private boolean |
showValidationMessages
true if validation messages should be shown. |
| 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 | |
|---|---|
CertificateDialog(org.eclipse.swt.widgets.Shell shell,
java.security.cert.Certificate[] chain)
Creates a new CertificateDialog instance. |
|
CertificateDialog(org.eclipse.swt.widgets.Shell shell,
javax.mail.internet.MimeMessage msg)
Creates a new CertificateDialog instance. |
|
| Method Summary | |
|---|---|
private void |
addCertificateFieldLabel(org.eclipse.swt.widgets.Composite composite,
java.lang.String label,
java.lang.String value)
|
protected void |
configureShell(org.eclipse.swt.widgets.Shell shell)
Configures the Shell representing this
CertificateDialog. |
protected void |
createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
Adds the buttons to this CertificateDialog's button bar. |
protected org.eclipse.swt.widgets.Control |
createContents(org.eclipse.swt.widgets.Composite parent)
Creates the contents of this CertificateDialog. |
private void |
createDetailTabItem(org.eclipse.swt.custom.CTabFolder folder,
org.eclipse.swt.custom.CTabItem item)
|
protected org.eclipse.swt.widgets.Control |
createDialogArea(org.eclipse.swt.widgets.Composite parent)
Creates and returns the contents of the upper part of this CertificateDialog (above the button bar). |
private void |
createGeneralTabItem(org.eclipse.swt.custom.CTabFolder folder,
org.eclipse.swt.custom.CTabItem item)
|
private java.lang.String |
formatDate(java.util.Date d)
|
private void |
generateCertificateChainTree(org.eclipse.swt.widgets.TreeItem root,
java.security.cert.Certificate[] certs)
|
private void |
generateCertificateChainTree(org.eclipse.swt.widgets.Tree tree,
org.eclipse.swt.widgets.Tree details,
org.eclipse.swt.widgets.Text valueText)
|
private void |
generateCertificateStructureTree(org.eclipse.swt.widgets.Tree tree,
org.eclipse.swt.widgets.Text valueText,
java.security.cert.Certificate selected)
|
private void |
generateExtensionNode(org.eclipse.swt.widgets.TreeItem parent,
java.security.cert.X509Certificate cert,
org.bouncycastle.asn1.x509.X509Extensions extensions,
java.lang.String oid)
|
private org.eclipse.swt.widgets.TreeItem |
generateNode(org.eclipse.swt.widgets.TreeItem parent,
java.lang.String childName,
java.lang.Object data)
|
private java.security.cert.X509Certificate |
getSubjectCertificate()
|
private void |
parseCertificateChains(org.eclipse.swt.widgets.TreeItem root)
|
private java.lang.Object[] |
reverseArray(java.lang.Object[] array)
|
| Methods inherited from class org.eclipse.jface.dialogs.Dialog |
|---|
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, dialogFontIsDefault, getBlockedHandler, getButton, 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, 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 |
|---|
private javax.mail.internet.MimeMessage message
private java.security.cert.Certificate[] chain
private boolean showValidationMessages
true if validation messages should be shown.
| Constructor Detail |
|---|
public CertificateDialog(org.eclipse.swt.widgets.Shell shell,
javax.mail.internet.MimeMessage msg)
CertificateDialog instance.
shell - the parent shell
public CertificateDialog(org.eclipse.swt.widgets.Shell shell,
java.security.cert.Certificate[] chain)
CertificateDialog instance.
shell - the parent shell| Method Detail |
|---|
protected void configureShell(org.eclipse.swt.widgets.Shell shell)
Shell representing this
CertificateDialog.
configureShell in class org.eclipse.jface.window.Windowshell - theShell to configureprotected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
CertificateDialog.
createContents in class org.eclipse.jface.dialogs.Dialogparent - the parent Composite in which to embed the
created contentsprotected void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
CertificateDialog's button bar.
createButtonsForButtonBar in class org.eclipse.jface.dialogs.Dialogparent - the button bar CompositeDialog.createButtonsForButtonBar(Composite)protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
CertificateDialog (above the button bar).
createDialogArea in class org.eclipse.jface.dialogs.Dialogparent - the parent Composite to contain
the dialog area
private void addCertificateFieldLabel(org.eclipse.swt.widgets.Composite composite,
java.lang.String label,
java.lang.String value)
private java.security.cert.X509Certificate getSubjectCertificate()
private java.lang.Object[] reverseArray(java.lang.Object[] array)
private void parseCertificateChains(org.eclipse.swt.widgets.TreeItem root)
private void createGeneralTabItem(org.eclipse.swt.custom.CTabFolder folder,
org.eclipse.swt.custom.CTabItem item)
private void createDetailTabItem(org.eclipse.swt.custom.CTabFolder folder,
org.eclipse.swt.custom.CTabItem item)
private void generateCertificateChainTree(org.eclipse.swt.widgets.TreeItem root,
java.security.cert.Certificate[] certs)
private void generateCertificateChainTree(org.eclipse.swt.widgets.Tree tree,
org.eclipse.swt.widgets.Tree details,
org.eclipse.swt.widgets.Text valueText)
throws java.lang.Exception
java.lang.Exception
private org.eclipse.swt.widgets.TreeItem generateNode(org.eclipse.swt.widgets.TreeItem parent,
java.lang.String childName,
java.lang.Object data)
private void generateExtensionNode(org.eclipse.swt.widgets.TreeItem parent,
java.security.cert.X509Certificate cert,
org.bouncycastle.asn1.x509.X509Extensions extensions,
java.lang.String oid)
private java.lang.String formatDate(java.util.Date d)
private void generateCertificateStructureTree(org.eclipse.swt.widgets.Tree tree,
org.eclipse.swt.widgets.Text valueText,
java.security.cert.Certificate selected)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||