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 SimpleFeatureType to be defined.

Since:
1.1.0
Author:
Jesse, Andrea Antonello (www.hydrologis.com)

Nested Class Summary
static interface FeatureTypeEditorDialog.ValidateFeatureType
          Validates the feature type to determine whether it is acceptable and can be created.
 
Constructor Summary
FeatureTypeEditorDialog(Shell parentShell, FeatureTypeEditorDialog.ValidateFeatureType strategy)
           
 
Method Summary
 boolean close()
           
protected  Control createDialogArea(Composite parent)
           
 SimpleFeatureTypeBuilder getDefaultBuilder()
           
 FeatureTypeEditor getEditor()
           
 SimpleFeatureType 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 setDefaultFeatureType(SimpleFeatureType defaultFeatureType)
           
 
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.ValidateFeatureType 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 SimpleFeatureType 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:
the feature type defined by user

getDefaultBuilder

public SimpleFeatureTypeBuilder getDefaultBuilder()

setDefaultFeatureType

public void setDefaultFeatureType(SimpleFeatureType defaultFeatureType)