net.refractions.udig.ui
Class FeatureTypeEditorDialog

java.lang.Object
  extended by Dialog
      extended by net.refractions.udig.ui.FeatureTypeEditorDialog

public class FeatureTypeEditorDialog
extends Dialog

Opens a dialog that allows a FeatureType to be defined.

Since:
1.1.0
Author:
Jesse

Nested Class Summary
static interface FeatureTypeEditorDialog.ValidateFeatureTypeBuilder
          Validates the feature type to determine whether it is acceptable and can be created.
 
Constructor Summary
FeatureTypeEditorDialog(Shell parentShell, FeatureTypeEditorDialog.ValidateFeatureTypeBuilder strategy)
           
 
Method Summary
 boolean close()
           
protected  Control createDialogArea(Composite parent)
           
 FeatureTypeBuilder getDefaultBuilder()
           
 FeatureTypeEditor getEditor()
           
 FeatureType getFeatureType(boolean checkForDuplicateFeatureType)
          Returns the feature type defined by user or null if it is not a legal feature type for the setDataStore.
protected  Point getInitialSize()
           
protected  void okPressed()
           
 int open()
           
 void setDataStore(DataStore dataStore)
           
 void setDefaultBuilder(FeatureTypeBuilder defaultBuilder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureTypeEditorDialog

public FeatureTypeEditorDialog(Shell parentShell,
                               FeatureTypeEditorDialog.ValidateFeatureTypeBuilder strategy)
Method Detail

createDialogArea

protected Control createDialogArea(Composite parent)

getInitialSize

protected Point getInitialSize()

close

public boolean close()

setDataStore

public void setDataStore(DataStore dataStore)

okPressed

protected void okPressed()

getEditor

public FeatureTypeEditor getEditor()

open

public int open()

getFeatureType

public FeatureType getFeatureType(boolean checkForDuplicateFeatureType)
Returns the feature type defined by user or null if it is not a legal feature type for the setDataStore. If setDataStore has previously been called then the feature typename will be checked to determine if the typename already exists. If it does then null is returned and the dialog should be opened a second time.

Parameters:
checkForDuplicateFeatureType - If true null will be returned if the datastore has a feature type with the same feature type name.
Returns:

getDefaultBuilder

public FeatureTypeBuilder getDefaultBuilder()

setDefaultBuilder

public void setDefaultBuilder(FeatureTypeBuilder defaultBuilder)