org.eclipse.mylar.internal.tasks.ui.wizards
Class PreviewAttachmentPage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.wizard.WizardPage
          extended by org.eclipse.mylar.internal.tasks.ui.wizards.PreviewAttachmentPage
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage

public class PreviewAttachmentPage
extends org.eclipse.jface.wizard.WizardPage

Shows a preview of a LocalAttachment.

Author:
Jeff Pound

Field Summary
private  LocalAttachment attachment
           
private static java.util.HashMap<java.lang.String,java.lang.String> imageTypes
           
private static java.lang.String PAGE_DESCRIPTION
           
private static java.lang.String PAGE_NAME
           
private static java.util.HashMap<java.lang.String,java.lang.String> textTypes
           
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
protected PreviewAttachmentPage(LocalAttachment attachment)
           
 
Method Summary
 void createControl(org.eclipse.swt.widgets.Composite parent)
           
private  void createErrorPreview(org.eclipse.swt.widgets.Composite composite, java.lang.String message)
           
private  void createGenericPreview(org.eclipse.swt.widgets.Composite composite, LocalAttachment attachment)
           
private  void createImagePreview(org.eclipse.swt.widgets.Composite composite, LocalAttachment attachment)
           
private  void createTextPreview(org.eclipse.swt.widgets.Composite composite, LocalAttachment attachment)
           
private  void createTextPreview(org.eclipse.swt.widgets.Composite composite, java.lang.String contents)
           
private static boolean isImageAttachment(java.lang.String contentType)
           
private static boolean isTextAttachment(java.lang.String contentType)
           
 
Methods inherited from class org.eclipse.jface.wizard.WizardPage
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
 
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisible
 

Field Detail

PAGE_NAME

private static final java.lang.String PAGE_NAME
See Also:
Constant Field Values

PAGE_DESCRIPTION

private static final java.lang.String PAGE_DESCRIPTION
See Also:
Constant Field Values

attachment

private LocalAttachment attachment

textTypes

private static java.util.HashMap<java.lang.String,java.lang.String> textTypes

imageTypes

private static java.util.HashMap<java.lang.String,java.lang.String> imageTypes
Constructor Detail

PreviewAttachmentPage

protected PreviewAttachmentPage(LocalAttachment attachment)
Method Detail

isTextAttachment

private static boolean isTextAttachment(java.lang.String contentType)

isImageAttachment

private static boolean isImageAttachment(java.lang.String contentType)

createControl

public void createControl(org.eclipse.swt.widgets.Composite parent)

createTextPreview

private void createTextPreview(org.eclipse.swt.widgets.Composite composite,
                               java.lang.String contents)

createTextPreview

private void createTextPreview(org.eclipse.swt.widgets.Composite composite,
                               LocalAttachment attachment)

createImagePreview

private void createImagePreview(org.eclipse.swt.widgets.Composite composite,
                                LocalAttachment attachment)

createGenericPreview

private void createGenericPreview(org.eclipse.swt.widgets.Composite composite,
                                  LocalAttachment attachment)

createErrorPreview

private void createErrorPreview(org.eclipse.swt.widgets.Composite composite,
                                java.lang.String message)