net.refractions.udig.catalog.ui
Class AbstractUDIGImportPage

java.lang.Object
  extended by WizardPage
      extended by net.refractions.udig.catalog.ui.AbstractUDIGImportPage
All Implemented Interfaces:
UDIGConnectionPage
Direct Known Subclasses:
DataStoreWizardPage

public abstract class AbstractUDIGImportPage
extends WizardPage
implements UDIGConnectionPage

Abstract implementation of UDIGImportPage.

Author:
jdeolive

Constructor Summary
AbstractUDIGImportPage(java.lang.String pageName)
           
 
Method Summary
 IWizardPage getNextPage()
           
 boolean leavingPage()
          Called by framework as the page is about to be left.
protected  void popErrorMessage()
          Removes the current error message and replaces it with the previously visible error message.
protected  void popMessage()
          Removes the current message and replaces it with the previously visible message.
 void setErrorMessage(java.lang.String newMessage)
          Sets the error Message on the wizard page.
 void setMessage(java.lang.String newMessage, int newType)
          Sets a Message on the wizard page.
 
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
getParams
 

Constructor Detail

AbstractUDIGImportPage

public AbstractUDIGImportPage(java.lang.String pageName)
Method Detail

setMessage

public void setMessage(java.lang.String newMessage,
                       int newType)
Sets a Message on the wizard page. Since these pages are decorated by a connection page the default implementation Fails


setErrorMessage

public void setErrorMessage(java.lang.String newMessage)
Sets the error Message on the wizard page. Since these pages are decorated by a connection page the default implementation Fails to display the error.

Specified by:
setErrorMessage in interface UDIGConnectionPage
Parameters:
newMessage - the message, or null to clear the error message

popErrorMessage

protected void popErrorMessage()
Removes the current error message and replaces it with the previously visible error message.


popMessage

protected void popMessage()
Removes the current message and replaces it with the previously visible message.


getNextPage

public final IWizardPage getNextPage()

leavingPage

public boolean leavingPage()
Called by framework as the page is about to be left.

There are two main use cases for this method. The first is to save settings for the next time the wizard is visited. The other is to perform some checks or do some loading that is too expensive to do every time isPageComplete() is called. For example a database wizard page might try to connect to the database in this method rather than isPageComplete() because it is such an expensive method to call.

If an expensive method is called make sure to run it in the container:

getContainer().run(true, cancelable, runnable);

Returns:
true if it is acceptable to leave the page false if the page must not be left