Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.io.source
Class FileSource<P extends ImportProvider>

java.lang.Object
  extended by eu.esdihumboldt.hale.ui.io.source.AbstractSource<P>
      extended by eu.esdihumboldt.hale.ui.io.source.AbstractProviderSource<P>
          extended by eu.esdihumboldt.hale.ui.io.source.FileSource<P>
Type Parameters:
P - the supported IOProvider type
All Implemented Interfaces:
ImportSource<P>

public class FileSource<P extends ImportProvider>
extends AbstractProviderSource<P>

File import source

Since:
2.5
Author:
Simon Templer

Nested Class Summary
 
Nested classes/interfaces inherited from interface eu.esdihumboldt.hale.ui.io.ImportSource
ImportSource.SourceConfiguration<P extends ImportProvider>
 
Constructor Summary
FileSource()
           
 
Method Summary
 void createControls(org.eclipse.swt.widgets.Composite parent)
          Create the controls that enable the user to define the import source.
protected  LocatableInputSupplier<? extends InputStream> getSource()
          Get the source to configure the import provider with.
protected  boolean isValidSource()
          Determines if the current page state will result in a valid source for the import provider.
 void onActivate()
          Method that is called when the source page is activated.
protected  void updateContentType()
          Update the content type.

The default implementation only calls AbstractProviderSource.updateProvider().
 
Methods inherited from class eu.esdihumboldt.hale.ui.io.source.AbstractProviderSource
createProviders, getProviders, onProviderSelectionChanged, updateConfiguration, updateProvider, updateState
 
Methods inherited from class eu.esdihumboldt.hale.ui.io.source.AbstractSource
dispose, getConfiguration, getPage, setConfiguration, setPage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSource

public FileSource()
Method Detail

createControls

public void createControls(org.eclipse.swt.widgets.Composite parent)
Description copied from interface: ImportSource
Create the controls that enable the user to define the import source. ImportSource.setPage(WizardPage) and ImportSource.setConfiguration(SourceConfiguration) must have been called before calling this method.

Parameters:
parent - the parent composite, implementors may assign a custom layout to this composite
See Also:
ImportSource.createControls(Composite)

updateContentType

protected void updateContentType()
Description copied from class: AbstractProviderSource
Update the content type.

The default implementation only calls AbstractProviderSource.updateProvider(). Subclasses may add logic to change the content type in the source configuration.

Overrides:
updateContentType in class AbstractProviderSource<P extends ImportProvider>
See Also:
AbstractProviderSource.updateContentType()

isValidSource

protected boolean isValidSource()
Description copied from class: AbstractProviderSource
Determines if the current page state will result in a valid source for the import provider. Used among others to determine the complete state of the wizard page.

Specified by:
isValidSource in class AbstractProviderSource<P extends ImportProvider>
Returns:
if the source is valid
See Also:
AbstractProviderSource.isValidSource()

getSource

protected LocatableInputSupplier<? extends InputStream> getSource()
Description copied from class: AbstractProviderSource
Get the source to configure the import provider with.

Specified by:
getSource in class AbstractProviderSource<P extends ImportProvider>
Returns:
the input supplier as source for the import provider or null if no valid source can be created
See Also:
AbstractProviderSource.getSource()

onActivate

public void onActivate()
Description copied from class: AbstractSource
Method that is called when the source page is activated.

The default implementation does nothing, override to to react on activation of the source page.

Specified by:
onActivate in interface ImportSource<P extends ImportProvider>
Overrides:
onActivate in class AbstractSource<P extends ImportProvider>
See Also:
AbstractSource.onActivate()

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d