org.eclipse.datatools.sqltools.data.internal.ui.editor
Class TableDataEditor
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
org.eclipse.datatools.sqltools.data.internal.ui.editor.TableDataEditor
- All Implemented Interfaces:
- org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, ITableDataEditor, 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 TableDataEditor
- extends org.eclipse.ui.part.EditorPart
- implements ITableDataEditor
This editor allows borwsing and editing the data stored in a SQL table.
The logic for accessing and altering the data is implemented in TableDataImpl.
- Author:
- groux
| Fields inherited from interface org.eclipse.ui.IEditorPart |
PROP_DIRTY, PROP_INPUT |
| Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
| Methods inherited from class org.eclipse.ui.part.EditorPart |
getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setInitializationData |
| Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
addPartPropertyListener, addPropertyListener, getAdapter, getContentDescription, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, showBusy |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.ui.IEditorPart |
getEditorInput, getEditorSite |
| Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
| Methods inherited from interface org.eclipse.ui.ISaveablePart |
isSaveOnCloseNeeded |
TableDataEditor
public TableDataEditor()
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
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
dispose
public void dispose()
- Specified by:
dispose in interface org.eclipse.ui.IWorkbenchPart- Overrides:
dispose in class org.eclipse.ui.part.WorkbenchPart
doSave
public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
- Specified by:
doSave in interface org.eclipse.ui.ISaveablePart- Specified by:
doSave in class org.eclipse.ui.part.EditorPart
isSaveAsAllowed
public boolean isSaveAsAllowed()
- Specified by:
isSaveAsAllowed in interface org.eclipse.ui.ISaveablePart- Specified by:
isSaveAsAllowed in class org.eclipse.ui.part.EditorPart
doSaveAs
public void doSaveAs()
- Specified by:
doSaveAs in interface org.eclipse.ui.ISaveablePart- Specified by:
doSaveAs in class org.eclipse.ui.part.EditorPart
isDirty
public boolean isDirty()
- Specified by:
isDirty in interface org.eclipse.ui.ISaveablePart- Specified by:
isDirty in class org.eclipse.ui.part.EditorPart
setDirty
public void setDirty(boolean value)
- Specified by:
setDirty in interface ITableDataEditor
doRevert
public void doRevert()
- Specified by:
doRevert in interface ITableDataEditor
doRefresh
public void doRefresh()
- Specified by:
doRefresh in interface ITableDataEditor
getRow
public IRowData getRow()
- Specified by:
getRow in interface ITableDataEditor
getOrCreateRow
public IRowData getOrCreateRow()
- Specified by:
getOrCreateRow in interface ITableDataEditor
doInsertRow
public void doInsertRow()
- Specified by:
doInsertRow in interface ITableDataEditor
doUpdateValue
public void doUpdateValue()
- Specified by:
doUpdateValue in interface ITableDataEditor
doSetNull
public void doSetNull()
- Specified by:
doSetNull in interface ITableDataEditor
doDelete
public void doDelete()
- Specified by:
doDelete in interface ITableDataEditor
setFocus
public void setFocus()
- Specified by:
setFocus in interface org.eclipse.ui.IWorkbenchPart- Specified by:
setFocus in class org.eclipse.ui.part.WorkbenchPart
getTableData
public ITableData getTableData()
- Specified by:
getTableData in interface ITableDataEditor
getSqlTable
public Table getSqlTable()
- Specified by:
getSqlTable in interface ITableDataEditor
getCursor
public TableDataTableCursor getCursor()
- Specified by:
getCursor in interface ITableDataEditor
isReadonly
public boolean isReadonly()
- Specified by:
isReadonly in interface ITableDataEditor
getSelectionProvider
public TableDataEditorSelectionProvider getSelectionProvider()
- Specified by:
getSelectionProvider in interface ITableDataEditor
setDirtyBackground
public void setDirtyBackground(int columnIndex,
org.eclipse.swt.widgets.TableItem item)
- Marks the background of the table item and column to indicate that it is dirty
- Specified by:
setDirtyBackground in interface ITableDataEditor
- Parameters:
columnIndex - the index of column to change coloritem - the TableItem to change the background color
removeDirtyBackground
public void removeDirtyBackground(int columnIndex,
org.eclipse.swt.widgets.TableItem item)
- Removes the dirty indicator by reseting the background color to white
- Parameters:
columnIndex - the index of the column to change coloritem - the TableItem to reset the background color
getTableViewer
public org.eclipse.jface.viewers.TableViewer getTableViewer()
- Specified by:
getTableViewer in interface ITableDataEditor