RSE
Release 1.0

org.eclipse.rse.files.ui.wizards
Class SystemNewFileWizardMainPage

java.lang.Object
  extended byorg.eclipse.jface.dialogs.DialogPage
      extended byorg.eclipse.jface.wizard.WizardPage
          extended byorg.eclipse.rse.ui.wizards.AbstractSystemWizardPage
              extended byorg.eclipse.rse.files.ui.wizards.SystemNewFileWizardMainPage
All Implemented Interfaces:
IDialogPage, IMessageProvider, ISystemMessageLine, ISystemWizardPage, IWizardPage

public class SystemNewFileWizardMainPage
extends AbstractSystemWizardPage

Default main page of the "New File" wizard. This page asks for the following information:


Field Summary
 String[] allnames
           
protected  Text connectionName
           
protected  SystemMessage errorMessage
           
protected  Text fileName
           
protected  String fileNameStr
           
protected  Text folderName
           
protected  Combo folderNames
           
protected  ISystemMessageLine msgLine
           
protected  ISystemValidator nameValidator
           
protected  IRemoteFile[] parentFolders
           
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
SystemNewFileWizardMainPage(Wizard wizard, IRemoteFile[] parentFolders)
          Constructor.
 
Method Summary
 Control createContents(Composite parent)
          CreateContents is the one method that must be overridden from the parent class.
 String getfileName()
          Return user-entered new file name.
protected  Control getInitialFocusControl()
          Return the Control to be given initial focus.
 IRemoteFile getParentFolder()
          Return the parent folder selected by the user
protected  void initializeInput()
          Init values using input data
 boolean isPageComplete()
          Return true if the page is complete, so to enable Finish.
 boolean performFinish()
          Completes processing of the wizard.
protected  SystemMessage validateNameInput()
          This hook method is called whenever the text changes in the input field.
 
Methods inherited from class org.eclipse.rse.ui.wizards.AbstractSystemWizardPage
addFillerLine, addGrowableFillerLine, addSeparatorLine, applyMnemonics, clearErrorMessage, clearMessage, createControl, getHelpContextId, getInputObject, getMessageLine, getSystemErrorMessage, setBusyCursor, setErrorMessage, setErrorMessage, setErrorMessage, setFocus, setHelp, setHelp, setInputObject, setMessage, setMessage, setVisible
 
Methods inherited from class org.eclipse.jface.wizard.WizardPage
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, setDescription, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.rse.ui.messages.ISystemMessageLine
getErrorMessage, getMessage
 
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp
 

Field Detail

fileNameStr

protected String fileNameStr

folderName

protected Text folderName

connectionName

protected Text connectionName

fileName

protected Text fileName

folderNames

protected Combo folderNames

errorMessage

protected SystemMessage errorMessage

nameValidator

protected ISystemValidator nameValidator

parentFolders

protected IRemoteFile[] parentFolders

msgLine

protected ISystemMessageLine msgLine

allnames

public String[] allnames
Constructor Detail

SystemNewFileWizardMainPage

public SystemNewFileWizardMainPage(Wizard wizard,
                                   IRemoteFile[] parentFolders)
Constructor.

Method Detail

createContents

public Control createContents(Composite parent)
CreateContents is the one method that must be overridden from the parent class. In this method, we populate an SWT container with widgets and return the container to the caller (JFace). This is used as the contents of this page.

Specified by:
createContents in class AbstractSystemWizardPage
See Also:
SystemWidgetHelpers

getInitialFocusControl

protected Control getInitialFocusControl()
Return the Control to be given initial focus. Override from parent. Return control to be given initial focus.

Specified by:
getInitialFocusControl in class AbstractSystemWizardPage

initializeInput

protected void initializeInput()
Init values using input data


validateNameInput

protected SystemMessage validateNameInput()
This hook method is called whenever the text changes in the input field. The default implementation delegates the request to an ISystemValidator object. If the ISystemValidator reports an error the error message is displayed in the Dialog's message line.


performFinish

public boolean performFinish()
Completes processing of the wizard. If this method returns true, the wizard will close; otherwise, it will stay active. This method is an override from the parent Wizard class.

Specified by:
performFinish in interface ISystemWizardPage
Specified by:
performFinish in class AbstractSystemWizardPage
Returns:
whether the wizard finished successfully

getfileName

public String getfileName()
Return user-entered new file name. Call this after finish ends successfully.


getParentFolder

public IRemoteFile getParentFolder()
Return the parent folder selected by the user


isPageComplete

public boolean isPageComplete()
Return true if the page is complete, so to enable Finish. Called by wizard framework.


RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.