net.refractions.udig.catalog.ui
Class FileConnectionPage

java.lang.Object
  extended by WizardPage
      extended by net.refractions.udig.catalog.ui.workflow.WorkflowWizardPage
          extended by net.refractions.udig.catalog.ui.FileConnectionPage
All Implemented Interfaces:
UDIGConnectionPage

public class FileConnectionPage
extends WorkflowWizardPage
implements UDIGConnectionPage

A wizard page that opens a file dialog and closes the wizard when dialog is closed.

Since:
0.9.0
Author:
jeichar

Constructor Summary
FileConnectionPage()
          Construct OpenFilePage.
 
Method Summary
 boolean canFlipToNextPage()
          This method returns true if there are more states in the workflow, and the current page is complete.
 void createControl(Composite parent)
           
 FileDialog getFileDialog()
           
 java.lang.String getId()
           
 java.util.Map<java.lang.String,java.io.Serializable> getParams()
          Returns the connection parameters stored by the connection page.
 java.util.Set<java.net.URL> getURLs()
           
protected  boolean hasOneResource(SubProgressMonitor monitor, java.util.List<IService> services)
           
 void pageChanged(PageChangedEvent event)
           
 void setCanFlipToNextPage(boolean value)
           
 
Methods inherited from class net.refractions.udig.catalog.ui.workflow.WorkflowWizardPage
getState, getWizard, setState, shown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.refractions.udig.catalog.ui.UDIGConnectionPage
setErrorMessage
 

Constructor Detail

FileConnectionPage

public FileConnectionPage()
Construct OpenFilePage.

Method Detail

getId

public java.lang.String getId()

hasOneResource

protected boolean hasOneResource(SubProgressMonitor monitor,
                                 java.util.List<IService> services)
                          throws java.io.IOException
Throws:
java.io.IOException

pageChanged

public void pageChanged(PageChangedEvent event)

canFlipToNextPage

public boolean canFlipToNextPage()
Description copied from class: WorkflowWizardPage
This method returns true if there are more states in the workflow, and the current page is complete. Subclasses should extend this method in the following way.
 
 public boolean canFlipToNextPage() {
   boolean flip = super.canFlipToNextPage();
   if (flip) {
        //validate user input (usually checking state of ui)
        if (...) {
                return true;
        }
   }
 
   return false;
 }
 
 

Overrides:
canFlipToNextPage in class WorkflowWizardPage
See Also:
org.eclipse.jface.wizard.WizardPage#canFlipToNextPage()

setCanFlipToNextPage

public void setCanFlipToNextPage(boolean value)
See Also:
net.refractions.udig.ui.UDIGImportPage#setCanFlipToNextPage(boolean)

createControl

public void createControl(Composite parent)
See Also:
org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)

getFileDialog

public FileDialog getFileDialog()

getURLs

public java.util.Set<java.net.URL> getURLs()

getParams

public java.util.Map<java.lang.String,java.io.Serializable> getParams()
Description copied from interface: UDIGConnectionPage
Returns the connection parameters stored by the connection page. If this is not the final page in the sequence of pages null(or anything else) may be returned.

Specified by:
getParams in interface UDIGConnectionPage
Returns:
A map of connection parameters.