TPTP 4.2.0 Platform Project
Internal API Specification

org.eclipse.tptp.platform.report.birt.ui.internal
Class LocationPage

java.lang.Object
  extended byorg.eclipse.jface.dialogs.DialogPage
      extended byorg.eclipse.jface.wizard.WizardPage
          extended byorg.eclipse.ui.dialogs.WizardNewFileCreationPage
              extended byorg.eclipse.tptp.platform.report.birt.ui.internal.LocationPage
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage, org.eclipse.swt.widgets.Listener

public class LocationPage
extends org.eclipse.ui.dialogs.WizardNewFileCreationPage

Extension of WizardNewFileCreationPage that allows the definition of a required file extension to be used.

Since:
0.0.1

Field Summary
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
LocationPage(java.lang.String pageName, org.eclipse.jface.viewers.IStructuredSelection selection)
          Constructor for LocationPage
 
Method Summary
 boolean allowOverwrite()
           
protected  void createAdvancedControls(org.eclipse.swt.widgets.Composite parent)
           
 java.lang.String getFileExtension()
          Returns the required file extension.
 java.lang.String getFileName()
           
 java.lang.String getItemName()
          Returns the text displayed in the Name field.
protected  java.lang.String getNewFileLabel()
           
 void setAllowOverwrite(boolean allowOverwrite)
           
 void setFileExtension(java.lang.String fileExtension)
          Sets the required file extension.
protected  org.eclipse.core.runtime.IStatus validateLinkedResource()
           
static java.lang.String validateOSFileName(java.lang.String valueStr)
          This method validates the file name to determine if it conforms to OS file name restrictions.
protected  boolean validatePage()
           
 
Methods inherited from class org.eclipse.ui.dialogs.WizardNewFileCreationPage
createControl, createFile, createFileHandle, createLinkTarget, createNewFile, createRule, getContainerFullPath, getInitialContents, handleAdvancedButtonSelect, handleEvent, initialPopulateContainerNameField, setContainerFullPath, setFileName, setVisible
 
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
 
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
 

Constructor Detail

LocationPage

public LocationPage(java.lang.String pageName,
                    org.eclipse.jface.viewers.IStructuredSelection selection)
Constructor for LocationPage

Parameters:
pageName -
selection -
Method Detail

setAllowOverwrite

public void setAllowOverwrite(boolean allowOverwrite)

allowOverwrite

public boolean allowOverwrite()

setFileExtension

public void setFileExtension(java.lang.String fileExtension)
Sets the required file extension.

Parameters:
fileExtension -

getFileExtension

public java.lang.String getFileExtension()
Returns the required file extension.

Returns:
Sting

validatePage

protected boolean validatePage()
See Also:
WizardNewFileCreationPage.validatePage()

createAdvancedControls

protected void createAdvancedControls(org.eclipse.swt.widgets.Composite parent)
See Also:
WizardNewFileCreationPage.createAdvancedControls(org.eclipse.swt.widgets.Composite)

getNewFileLabel

protected java.lang.String getNewFileLabel()
See Also:
WizardNewFileCreationPage.getNewFileLabel()

validateLinkedResource

protected org.eclipse.core.runtime.IStatus validateLinkedResource()
See Also:
WizardNewFileCreationPage.validateLinkedResource()

getFileName

public java.lang.String getFileName()
See Also:
WizardNewFileCreationPage.getFileName()

getItemName

public java.lang.String getItemName()
Returns the text displayed in the Name field.


validateOSFileName

public static java.lang.String validateOSFileName(java.lang.String valueStr)
This method validates the file name to determine if it conforms to OS file name restrictions. At this point we are testing for valid file names on Windows and Linux systems only. In the future more system restrictions may need to be added.

Parameters:
valueStr - The file name string being passed in
Returns:
The invalid character or null

TPTP 4.2.0 Platform Project
Internal API Specification