de.cau.cs.kieler.kaom.importer.ptolemy.wizards
Class ImportDiagramSourceFilePage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.wizard.WizardPage
          extended by de.cau.cs.kieler.kaom.importer.ptolemy.wizards.ImportDiagramSourceFilePage
All Implemented Interfaces:
IDialogPage, IMessageProvider, IWizardPage

public class ImportDiagramSourceFilePage
extends WizardPage

Source file page in the ImportDiagramWizard. Allows the user to select the file to import from.

Rating red

Field Summary
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
protected ImportDiagramSourceFilePage(IStructuredSelection theSelection)
          Constructs a new source file wizard page.
 
Method Summary
 void createControl(Composite parent)
          
 File getExternalFile()
          Returns the chosen external file, if any.
 IFile getWorkspaceFile()
          Returns the chosen workspace-internal file, if any.
 boolean isExternalFileSelected()
          Returns whether the user wants to import an external file or a workspace-local file.
 void storeSettings()
          Saves the current settings.
 
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
 

Constructor Detail

ImportDiagramSourceFilePage

protected ImportDiagramSourceFilePage(IStructuredSelection theSelection)
Constructs a new source file wizard page.

Parameters:
theSelection - the selection the wizard was called on.
Method Detail

isExternalFileSelected

public boolean isExternalFileSelected()
Returns whether the user wants to import an external file or a workspace-local file. If the former is true, use getExternalFile() to get the actual file. Otherwise, use getWorkspaceFile().

Returns:
true if the user wants to import an external file, false otherwise.

getExternalFile

public File getExternalFile()
Returns the chosen external file, if any.

Returns:
the chosen external file or null if the user didn't actually select an external file.

getWorkspaceFile

public IFile getWorkspaceFile()
Returns the chosen workspace-internal file, if any.

Returns:
the chosen workspace-internal file or null if the user didn't actually select a workspace-internal file.

createControl

public void createControl(Composite parent)


storeSettings

public void storeSettings()
Saves the current settings.