## com.ibm.lab.soln.editor.ui
Class MiniSpreadsheetEditor

    java.lang.Object
      |
      +--org.eclipse.ui.part.WorkbenchPart
            |
            +--org.eclipse.ui.part.EditorPart
                  |
                  +--com.ibm.lab.soln.editor.ui.MiniSpreadsheetEditor

All Implemented Interfaces:
  java.util.EventListener, org.eclipse.core.runtime.IAdaptable, org.eclipse.ui.IEditorPart, org.eclipse.core.runtime.IExecutableExtension, IMiniSpreadsheetListener, org.eclipse.core.resources.IResourceChangeListener, org.eclipse.ui.IWorkbenchPart

public class MiniSpreadsheetEditor
extends org.eclipse.ui.part.EditorPart
implements IMiniSpreadsheetListener, org.eclipse.core.resources.IResourceChangeListener

Field Summary

Fields inherited from interface org.eclipse.ui.IEditorPart
`PROP_DIRTY, PROP_INPUT`

Fields inherited from interface org.eclipse.ui.IWorkbenchPart
`PROP_TITLE`

Constructor Summary
`MiniSpreadsheetEditor()`

Method Summary
`void` | `createPartControl(org.eclipse.swt.widgets.Composite parent)`
`void` | `dispose()`
`void` | `doSave(org.eclipse.core.runtime.IProgressMonitor monitor)`
`void` | `doSaveAs()`
`int` | `getDefaultAlignment()`
`MiniSpreadsheet` | `getMiniSpreadsheet()` Returns the editor's model, the miniSpreadsheet.
`void` | `gotoMarker(org.eclipse.core.resources.IMarker marker)`
`void` | `init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput editorInput)`
`protected void` | `init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IStorageEditorInput editorInput)`
`void` | `initializeTableLayout(org.eclipse.swt.widgets.Composite parent)`
`boolean` | `isDirty()`
`boolean` | `isSaveAsAllowed()`
`void` | `resourceChanged(org.eclipse.core.resources.IResourceChangeEvent event)` This editor is a resource change listener in order to detect "special" situations.
`void` | `rowsChanged(MiniSpreadsheet miniSpreadsheet)` Notification of a rows modification; the change is significant enough that a delta is not included in the notification, i.e., the receiver should assume that all rows may have changed.
`void` | `setAlignment(int alignment)` Set alignment for all the columns.
`protected void` | `setContents(org.eclipse.ui.IStorageEditorInput sei)`
`void` | `setFocus()` Passing the focus request to the viewer's control.
`protected void` | `setIsDirty(boolean isDirty)`
`void` | `valueChanged(MiniSpreadsheet miniSpreadsheet, int row, int column, java.lang.String newValue)` Notification of a cell modification.

Methods inherited from class org.eclipse.ui.part.EditorPart
`getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setInput`

Methods inherited from class org.eclipse.ui.part.WorkbenchPart
`addPropertyListener, firePropertyChange, getAdapter, getConfigurationElement, getDefaultImage, getSite, getTitle, getTitleImage, removePropertyListener, setInitializationData, setSite, setTitle, setTitleImage, setTitleToolTip`

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, removePropertyListener`

Methods inherited from interface org.eclipse.core.runtime.IAdaptable
`getAdapter`

Constructor Detail

### MiniSpreadsheetEditor

    public MiniSpreadsheetEditor()

Method Detail

### 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:
    `IWorkbenchPart.createPartControl(Composite)`

### dispose

    public void dispose()

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

### doSave

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

  Specified by:
    `doSave` in interface `org.eclipse.ui.IEditorPart`
  Specified by:
    `doSave` in class `org.eclipse.ui.part.EditorPart`
  See Also:
    `IEditorPart.doSave(IProgressMonitor)`

### doSaveAs

    public void doSaveAs()

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

### getDefaultAlignment

    public int getDefaultAlignment()

### getMiniSpreadsheet

    public MiniSpreadsheet getMiniSpreadsheet()

  Returns the editor's model, the miniSpreadsheet.

  Returns:
    MiniSpreadsheet

### gotoMarker

    public void gotoMarker(org.eclipse.core.resources.IMarker marker)

  Specified by:
    `gotoMarker` in interface `org.eclipse.ui.IEditorPart`
  Specified by:
    `gotoMarker` in class `org.eclipse.ui.part.EditorPart`
  See Also:
    `IEditorPart.gotoMarker(IMarker)`

### init

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

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

### init

    protected void init(org.eclipse.ui.IEditorSite site,
                        org.eclipse.ui.IStorageEditorInput editorInput)
                 throws org.eclipse.ui.PartInitException

    `org.eclipse.ui.PartInitException`

### initializeTableLayout

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

### isDirty

    public boolean isDirty()

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

### isSaveAsAllowed

    public boolean isSaveAsAllowed()

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

### resourceChanged

    public void resourceChanged(org.eclipse.core.resources.IResourceChangeEvent event)

  This editor is a resource change listener in order to detect "special" situations. Specifically:
  - Resource is deleted while editor is open (action: mark as dirty, permit only "Save As...")
  - Resource is replaced by local history, modified by another means (view), or modified outside Eclipse and then user selects "Refresh" (action: update contents of editor)
  This editor supports both file-based and stream-based inputs. Note that the editor input can become file-based if the user chooses "Save As...".

  Specified by:
    `resourceChanged` in interface `org.eclipse.core.resources.IResourceChangeListener`
  See Also:
    `IResourceChangeListener.resourceChanged(IResourceChangeEvent)`

### rowsChanged

    public void rowsChanged(MiniSpreadsheet miniSpreadsheet)

  Description copied from interface: `IMiniSpreadsheetListener`
  Notification of a rows modification; the change is significant enough that a delta is not included in the notification, i.e., the receiver should assume that all rows may have changed.

  Specified by:
    `rowsChanged` in interface `IMiniSpreadsheetListener`
  See Also:
    `IMiniSpreadsheetListener.rowsChanged(MiniSpreadsheet)`

### setAlignment

    public void setAlignment(int alignment)

  Set alignment for all the columns.

  Parameters:
    `alignment` - SWT.LEFT, SWT.RIGHT, SWT.CENTER.

### setContents

    protected void setContents(org.eclipse.ui.IStorageEditorInput sei)
                        throws org.eclipse.core.runtime.CoreException

    `org.eclipse.core.runtime.CoreException`

### setFocus

    public void setFocus()

  Passing the focus request to the viewer's control.

  Specified by:
    `setFocus` in interface `org.eclipse.ui.IWorkbenchPart`
  Specified by:
    `setFocus` in class `org.eclipse.ui.part.WorkbenchPart`

### setIsDirty

    protected void setIsDirty(boolean isDirty)

### valueChanged

    public void valueChanged(MiniSpreadsheet miniSpreadsheet,
                             int row,
                             int column,
                             java.lang.String newValue)

  Description copied from interface: `IMiniSpreadsheetListener`
  Notification of a cell modification.

  Specified by:
    `valueChanged` in interface `IMiniSpreadsheetListener`
  Parameters:
    `miniSpreadsheet` - changed `MiniSpreadsheet`
    `row` - row index (0-based)
    `column` - column index (0-based)
    `newValue` - new string value of changed cell
  See Also:
    `IMiniSpreadsheetListener.valueChanged(MiniSpreadsheet, int, int, String)`