net.refractions.udig.catalog.ui.preferences
Class AbstractProprietaryJarPreferencePage

java.lang.Object
  extended by PreferencePage
      extended by net.refractions.udig.catalog.ui.preferences.AbstractProprietaryJarPreferencePage

public abstract class AbstractProprietaryJarPreferencePage
extends PreferencePage

An abstract class that simplifies making a PreferencePage for obtaining a 3rd party proprietary jar required for a plugin.

An example of this is the Oracle Spatial JDBC Driver jar. It cannot be shipped with uDig because of licensing so it has a preference page that allows the user to easily install the jar into uDig

Since:
1.1.0
Author:
Jesse
See Also:
OracleSpatialPreferences

Nested Class Summary
protected static class AbstractProprietaryJarPreferencePage.UI
           
 
Constructor Summary
AbstractProprietaryJarPreferencePage()
           
AbstractProprietaryJarPreferencePage(java.lang.String title)
           
AbstractProprietaryJarPreferencePage(java.lang.String title, ImageDescriptor desc)
           
 
Method Summary
protected  Control createContents(Composite parent)
           
 void dispose()
           
protected  IPreferenceStore doGetPreferenceStore()
           
protected abstract  java.lang.String getDefaultJarName(int jarIndex)
          Returns a default name for the jar to import.
protected abstract  java.lang.String getDriverLabel(int jarIndex)
          The label beside the text area that indicates what type of file the user needs to add.
protected abstract  java.net.URL getLibsURL()
           
protected abstract  int getRequiredJarsCount()
          Returns the number of jars required to be imported.
 Shell getShell()
           
 void init(IWorkbench workbench)
           
protected abstract  boolean installed()
          Returns true if the Correct driver is installed.
 void performDefaults()
           
 boolean performOk()
           
 void setListener(Listener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractProprietaryJarPreferencePage

public AbstractProprietaryJarPreferencePage()

AbstractProprietaryJarPreferencePage

public AbstractProprietaryJarPreferencePage(java.lang.String title)

AbstractProprietaryJarPreferencePage

public AbstractProprietaryJarPreferencePage(java.lang.String title,
                                            ImageDescriptor desc)
Method Detail

getLibsURL

protected abstract java.net.URL getLibsURL()

installed

protected abstract boolean installed()
Returns true if the Correct driver is installed.

Returns:

createContents

protected Control createContents(Composite parent)

getRequiredJarsCount

protected abstract int getRequiredJarsCount()
Returns the number of jars required to be imported.

Returns:
the number of jars required to be imported.

getDriverLabel

protected abstract java.lang.String getDriverLabel(int jarIndex)
The label beside the text area that indicates what type of file the user needs to add.

Parameters:
jarIndex - the jar input area being created.
Returns:
The label beside the text area that indicates what type of file the user needs to add.
See Also:
getRequiredJarsCount()

getDefaultJarName

protected abstract java.lang.String getDefaultJarName(int jarIndex)
Returns a default name for the jar to import. It will appear in the text area as a hint to the user for what type of file they should be looking for.

Parameters:
jarIndex - the jar input area being created.
Returns:
a default name for the jar to import.
See Also:
getRequiredJarsCount(), getDriverLabel(int)

performDefaults

public void performDefaults()

performOk

public boolean performOk()

getShell

public Shell getShell()

dispose

public void dispose()

init

public void init(IWorkbench workbench)

setListener

public void setListener(Listener listener)

doGetPreferenceStore

protected IPreferenceStore doGetPreferenceStore()