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

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.InputAttachmentSourcePage
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage

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

A wizard to input the source of the attachment. This is a modified version of org.eclipse.compare.internal.InputPatchPage.

Author:
Jeff Pound

Nested Class Summary
(package private)  class InputAttachmentSourcePage.ActivationListener
           
 
Field Summary
private  InputAttachmentSourcePage.ActivationListener activationListener
           
protected static int CLIPBOARD
           
static java.lang.String CLIPBOARD_LABEL
           
private  java.lang.String clipboardContents
           
protected static int COMBO_HISTORY_LENGTH
           
protected static int FILE
           
private  org.eclipse.swt.widgets.Button fileBrowseButton
           
private  org.eclipse.swt.widgets.Combo fileNameField
           
private  boolean initUseClipboard
           
(package private) static char SEPARATOR
           
private  boolean showError
           
protected static int SIZING_TEXT_FIELD_WIDTH
           
private  org.eclipse.jface.viewers.TreeViewer treeViewer
           
private  org.eclipse.swt.widgets.Button useClipboardButton
           
private  org.eclipse.swt.widgets.Button useFileButton
           
private  org.eclipse.swt.widgets.Button useWorkspaceButton
           
private  NewAttachmentWizard wizard
           
protected static int WORKSPACE
           
private  org.eclipse.swt.widgets.Label workspaceSelectLabel
           
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
InputAttachmentSourcePage(NewAttachmentWizard wizard)
           
 
Method Summary
private  void addWorkspaceControls(org.eclipse.swt.widgets.Composite composite)
           
private  void buildAttachmentFileGroup(org.eclipse.swt.widgets.Composite parent)
           
 boolean canFlipToNextPage()
           
private  void clearErrorMessage()
           
 void createControl(org.eclipse.swt.widgets.Composite parent)
           
 java.lang.String getAbsoluteAttachmentPath()
           
private  java.lang.String getAttachmentFilePath()
           
 java.lang.String getAttachmentName()
           
 java.lang.String getClipboardContents()
           
protected  int getInputMethod()
           
 org.eclipse.jface.wizard.IWizardPage getNextPage()
           
protected  org.eclipse.core.runtime.IPath getPathFromText(org.eclipse.swt.widgets.Text textField)
           
static org.eclipse.core.resources.IResource[] getResources(org.eclipse.jface.viewers.ISelection selection)
           
 void setClipboardContents(java.lang.String attachContents)
           
private  void setEnableAttachmentFile(boolean enable)
           
private  void setEnableWorkspaceAttachment(boolean enable)
           
protected  void setSourceName(java.lang.String path)
          Sets the source name of the import to be the supplied path.
 void setUseClipboard(boolean b)
           
private  void storeClipboardContents()
           
private  void updateWidgetEnablements()
          Updates the enable state of this page's controls.
 
Methods inherited from class org.eclipse.jface.wizard.WizardPage
getContainer, getDialogSettings, getImage, getName, 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

SIZING_TEXT_FIELD_WIDTH

protected static final int SIZING_TEXT_FIELD_WIDTH
See Also:
Constant Field Values

COMBO_HISTORY_LENGTH

protected static final int COMBO_HISTORY_LENGTH
See Also:
Constant Field Values

CLIPBOARD_LABEL

public static final java.lang.String CLIPBOARD_LABEL
See Also:
Constant Field Values

CLIPBOARD

protected static final int CLIPBOARD
See Also:
Constant Field Values

FILE

protected static final int FILE
See Also:
Constant Field Values

WORKSPACE

protected static final int WORKSPACE
See Also:
Constant Field Values

SEPARATOR

static final char SEPARATOR

showError

private boolean showError

activationListener

private InputAttachmentSourcePage.ActivationListener activationListener

useClipboardButton

private org.eclipse.swt.widgets.Button useClipboardButton

fileNameField

private org.eclipse.swt.widgets.Combo fileNameField

fileBrowseButton

private org.eclipse.swt.widgets.Button fileBrowseButton

useFileButton

private org.eclipse.swt.widgets.Button useFileButton

useWorkspaceButton

private org.eclipse.swt.widgets.Button useWorkspaceButton

workspaceSelectLabel

private org.eclipse.swt.widgets.Label workspaceSelectLabel

treeViewer

private org.eclipse.jface.viewers.TreeViewer treeViewer

wizard

private NewAttachmentWizard wizard

clipboardContents

private java.lang.String clipboardContents

initUseClipboard

private boolean initUseClipboard
Constructor Detail

InputAttachmentSourcePage

public InputAttachmentSourcePage(NewAttachmentWizard wizard)
Method Detail

getPathFromText

protected org.eclipse.core.runtime.IPath getPathFromText(org.eclipse.swt.widgets.Text textField)

getAttachmentName

public java.lang.String getAttachmentName()

createControl

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

getNextPage

public org.eclipse.jface.wizard.IWizardPage getNextPage()
Specified by:
getNextPage in interface org.eclipse.jface.wizard.IWizardPage
Overrides:
getNextPage in class org.eclipse.jface.wizard.WizardPage

canFlipToNextPage

public boolean canFlipToNextPage()
Specified by:
canFlipToNextPage in interface org.eclipse.jface.wizard.IWizardPage
Overrides:
canFlipToNextPage in class org.eclipse.jface.wizard.WizardPage

setEnableAttachmentFile

private void setEnableAttachmentFile(boolean enable)

setEnableWorkspaceAttachment

private void setEnableWorkspaceAttachment(boolean enable)

buildAttachmentFileGroup

private void buildAttachmentFileGroup(org.eclipse.swt.widgets.Composite parent)

addWorkspaceControls

private void addWorkspaceControls(org.eclipse.swt.widgets.Composite composite)

updateWidgetEnablements

private void updateWidgetEnablements()
Updates the enable state of this page's controls.


setSourceName

protected void setSourceName(java.lang.String path)
Sets the source name of the import to be the supplied path. Adds the name of the path to the list of items in the source combo and selects it.

Parameters:
path - the path to be added

clearErrorMessage

private void clearErrorMessage()

getInputMethod

protected int getInputMethod()

getAttachmentFilePath

private java.lang.String getAttachmentFilePath()

getAbsoluteAttachmentPath

public java.lang.String getAbsoluteAttachmentPath()

getResources

public static org.eclipse.core.resources.IResource[] getResources(org.eclipse.jface.viewers.ISelection selection)

storeClipboardContents

private void storeClipboardContents()

getClipboardContents

public java.lang.String getClipboardContents()

setClipboardContents

public void setClipboardContents(java.lang.String attachContents)

setUseClipboard

public void setUseClipboard(boolean b)