pl.edu.agh.cast.dataview.ui.editor
Class DataTableEditor

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.EditorPart
              extended by pl.edu.agh.cast.dataview.ui.editor.DataTableEditor
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IEditorPart, org.eclipse.ui.ISaveablePart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation

public class DataTableEditor
extends org.eclipse.ui.part.EditorPart

Data View Editor. Shows input data as table.

Author:
AGH CAST Team

Field Summary
static String ID
          data-view editor ID.
protected  org.eclipse.jface.viewers.TableViewer viewer
          Tree viewer which is used by this view.
 
Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
DataTableEditor()
           
 
Method Summary
 void createPartControl(org.eclipse.swt.widgets.Composite parent)
          
 void doSave(org.eclipse.core.runtime.IProgressMonitor arg0)
          
 void doSaveAs()
          
 void enableFiltering(boolean enabled)
          Enables column filtering on viewed table.
 IGeneralDataSet<IGeneralElement> getDataSet()
           
 String getPartName()
           
 void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input)
          
 boolean isDirty()
          Always returns false - user cannot modify data.
 boolean isFilteringEnabled()
           
 boolean isSaveAsAllowed()
          No modifications allowed so save is not allowed.
 void setFocus()
          
 
Methods inherited from class org.eclipse.ui.part.EditorPart
checkSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, dispose, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, 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, dispose, getSite, getTitle, getTitleImage, removePropertyListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

ID

public static final String ID
data-view editor ID.

See Also:
Constant Field Values

viewer

protected org.eclipse.jface.viewers.TableViewer viewer
Tree viewer which is used by this view.

Constructor Detail

DataTableEditor

public DataTableEditor()
Method Detail

init

public void init(org.eclipse.ui.IEditorSite site,
                 org.eclipse.ui.IEditorInput input)
          throws org.eclipse.ui.PartInitException

Specified by:
init in interface org.eclipse.ui.IEditorPart
Specified by:
init in class org.eclipse.ui.part.EditorPart
Throws:
org.eclipse.ui.PartInitException
See Also:
EditorPart.init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)

createPartControl

public void createPartControl(org.eclipse.swt.widgets.Composite parent)

Specified by:
createPartControl in interface org.eclipse.ui.IWorkbenchPart
Specified by:
createPartControl in class org.eclipse.ui.part.WorkbenchPart
See Also:
WorkbenchPart.createPartControl(org.eclipse.swt.widgets.Composite)

enableFiltering

public void enableFiltering(boolean enabled)
Enables column filtering on viewed table.

Parameters:
enabled - If filtering should be enabled.

isFilteringEnabled

public boolean isFilteringEnabled()

getDataSet

public IGeneralDataSet<IGeneralElement> getDataSet()

getPartName

public String getPartName()
Specified by:
getPartName in interface org.eclipse.ui.IWorkbenchPart2
Overrides:
getPartName in class org.eclipse.ui.part.WorkbenchPart

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()

isDirty

public boolean isDirty()
Always returns false - user cannot modify data.

Specified by:
isDirty in interface org.eclipse.ui.ISaveablePart
Specified by:
isDirty in class org.eclipse.ui.part.EditorPart
See Also:
EditorPart.isDirty()

isSaveAsAllowed

public boolean isSaveAsAllowed()
No modifications allowed so save is not allowed.

Specified by:
isSaveAsAllowed in interface org.eclipse.ui.ISaveablePart
Specified by:
isSaveAsAllowed in class org.eclipse.ui.part.EditorPart
See Also:
EditorPart.isSaveAsAllowed()

doSave

public void doSave(org.eclipse.core.runtime.IProgressMonitor arg0)

Specified by:
doSave in interface org.eclipse.ui.ISaveablePart
Specified by:
doSave in class org.eclipse.ui.part.EditorPart
See Also:
EditorPart.doSave(org.eclipse.core.runtime.IProgressMonitor)

doSaveAs

public void doSaveAs()

Specified by:
doSaveAs in interface org.eclipse.ui.ISaveablePart
Specified by:
doSaveAs in class org.eclipse.ui.part.EditorPart
See Also:
EditorPart.doSaveAs()


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.