|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.esdihumboldt.hale.ui.io.source.AbstractSource<P>
eu.esdihumboldt.hale.ui.io.source.AbstractProviderSource<P>
P
- the supported IOProvider
typepublic abstract class AbstractProviderSource<P extends ImportProvider>
Abstract ImportSource
implementation offering provider selection.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface eu.esdihumboldt.hale.ui.io.ImportSource |
---|
ImportSource.SourceConfiguration<P extends ImportProvider> |
Constructor Summary | |
---|---|
AbstractProviderSource()
|
Method Summary | |
---|---|
protected org.eclipse.jface.viewers.ComboViewer |
createProviders(org.eclipse.swt.widgets.Composite parent)
Create the provider selector combo viewer. |
protected org.eclipse.jface.viewers.ComboViewer |
getProviders()
Get the provider selector combo viewer. |
protected abstract LocatableInputSupplier<? extends InputStream> |
getSource()
Get the source to configure the import provider with. |
protected abstract boolean |
isValidSource()
Determines if the current page state will result in a valid source for the import provider. |
protected void |
onProviderSelectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
Called when the provider selection changes. |
boolean |
updateConfiguration(P provider)
Configures the provider with the input supplier obtained using getSource() as source. |
protected void |
updateContentType()
Update the content type. The default implementation only calls updateProvider() . |
protected void |
updateProvider()
Update the provider selector when the content type has changed. |
protected void |
updateState(boolean updateContentType)
Update the page state. |
Methods inherited from class eu.esdihumboldt.hale.ui.io.source.AbstractSource |
---|
dispose, getConfiguration, getPage, onActivate, setConfiguration, setPage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface eu.esdihumboldt.hale.ui.io.ImportSource |
---|
createControls |
Constructor Detail |
---|
public AbstractProviderSource()
Method Detail |
---|
protected org.eclipse.jface.viewers.ComboViewer createProviders(org.eclipse.swt.widgets.Composite parent)
getProviders()
. This should be called in
ImportSource.createControls(Composite)
.
parent
- the parent composite
protected void onProviderSelectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
event
- the selection changed eventprotected org.eclipse.jface.viewers.ComboViewer getProviders()
protected void updateProvider()
protected void updateState(boolean updateContentType)
ImportSource.createControls(Composite)
to initialize
the page state.
updateContentType
- if true
the content type and the
supported providers will be updated before updating the page
stateprotected void updateContentType()
updateProvider()
.
Subclasses may add logic to change the content type in the source
configuration.
public boolean updateConfiguration(P provider)
getSource()
as source.
updateConfiguration
in interface ImportSource<P extends ImportProvider>
updateConfiguration
in class AbstractSource<P extends ImportProvider>
provider
- the I/O provider to update
AbstractSource.updateConfiguration(ImportProvider)
,
getSource()
protected abstract LocatableInputSupplier<? extends InputStream> getSource()
null
if no valid source can be createdisValidSource()
protected abstract boolean isValidSource()
getSource()
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |