Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.views.data
Class AbstractDataView

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.ViewPart
              extended by eu.esdihumboldt.hale.ui.views.properties.PropertiesViewPart
                  extended by eu.esdihumboldt.hale.ui.views.data.AbstractDataView
All Implemented Interfaces:
InstanceSelectionListener, org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IPersistable, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation, org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor
Direct Known Subclasses:
SourceDataView, TransformedDataView

public abstract class AbstractDataView
extends PropertiesViewPart
implements InstanceSelectionListener

Table view that shows information about certain features

Author:
Thorsten Reitz, Simon Templer
Partner:
01 / Fraunhofer Institute for Computer Graphics Research

Nested Class Summary
 class AbstractDataView.ToggleProvideSelectionAction
          Action for toggling if an instance selection is provided by the view.
 
Field Summary
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
AbstractDataView(InstanceSelector instanceSelector, SchemaSpaceID schemaSpace, String controllerPreferenceKey)
          Creates a table view
 
Method Summary
 void createViewControl(org.eclipse.swt.widgets.Composite parent)
          Since createPartControl does an important job this is used for subclasses.
 void dispose()
           
 InstanceSelector getDefaultInstanceSelector()
          Get the default instance selector.
 InstanceSelector getInstanceSelector()
           
protected  void onSelectionChange(Iterable<Instance> selection)
          Called when the selection has changed
protected  void provideCustomControls(org.eclipse.swt.widgets.Composite parent)
          Add custom controls.
 void selectionChanged(TypeDefinition type, Iterable<Instance> selection)
          Called when the selection changed
 void setFocus()
           
 void setInstanceSelector(InstanceSelector instanceSelector)
          Set the current instance selector.
protected  void updateSelectionProvider()
          Update the selection provider when either the instance viewer or instance selector have changed.
 
Methods inherited from class eu.esdihumboldt.hale.ui.views.properties.PropertiesViewPart
createPartControl, getAdapter, getContributorId, getViewContext
 
Methods inherited from class org.eclipse.ui.part.ViewPart
checkSite, getViewSite, init, init, saveState, setContentDescription, setInitializationData, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
 

Constructor Detail

AbstractDataView

public AbstractDataView(InstanceSelector instanceSelector,
                        SchemaSpaceID schemaSpace,
                        String controllerPreferenceKey)
Creates a table view

Parameters:
instanceSelector - the feature selector
schemaSpace - the represented schema space
controllerPreferenceKey - the preference key for storing the instance view controller configuration
Method Detail

getDefaultInstanceSelector

public InstanceSelector getDefaultInstanceSelector()
Get the default instance selector.

Returns:
the default instance selector

createViewControl

public void createViewControl(org.eclipse.swt.widgets.Composite parent)
Description copied from class: PropertiesViewPart
Since createPartControl does an important job this is used for subclasses.

Specified by:
createViewControl in class PropertiesViewPart
Parameters:
parent - the parent control
See Also:
PropertiesViewPart.createViewControl(org.eclipse.swt.widgets.Composite)

updateSelectionProvider

protected void updateSelectionProvider()
Update the selection provider when either the instance viewer or instance selector have changed.


provideCustomControls

protected void provideCustomControls(org.eclipse.swt.widgets.Composite parent)
Add custom controls. Override this method to add custom controls

Parameters:
parent - the parent composite

setFocus

public void setFocus()
Specified by:
setFocus in interface org.eclipse.ui.IWorkbenchPart
Specified by:
setFocus in class org.eclipse.ui.part.WorkbenchPart
See Also:
WorkbenchPart.setFocus()

getInstanceSelector

public InstanceSelector getInstanceSelector()
Returns:
the instance selector

setInstanceSelector

public void setInstanceSelector(InstanceSelector instanceSelector)
Set the current instance selector.

Parameters:
instanceSelector - the instance selector to set

selectionChanged

public void selectionChanged(TypeDefinition type,
                             Iterable<Instance> selection)
Description copied from interface: InstanceSelectionListener
Called when the selection changed

Specified by:
selectionChanged in interface InstanceSelectionListener
Parameters:
type - the definition
selection - the selected features

onSelectionChange

protected void onSelectionChange(Iterable<Instance> selection)
Called when the selection has changed

Parameters:
selection - the current selection

dispose

public void dispose()
Specified by:
dispose in interface org.eclipse.ui.IWorkbenchPart
Overrides:
dispose in class org.eclipse.ui.part.WorkbenchPart
See Also:
WorkbenchPart.dispose()

Humboldt Alignment Editor 2.5.0

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